0
$\begingroup$

I am new in ML area and I want to build a model to score 100,000 people.

I wonder if it is abnormal to build (train/test/validation) the model on a dataset of the same size 100,000? Need to mention that my dataset is highly imbalanced say 95:5 and the aim is to detect the minority class.

In fact, I have observations on 100,000 people with features constructed in a period March to June, and the aim of the model is to predict in the future, say September.

The fact that the model is used to score a population that is quite the same size as the train population makes me feel like the problem is not well-defined. Isn't it? And the fact that the dataset is highly imbalanced and that I would like to learn on minority do increase this feeling.

I heard about optimal sample size in Machine Learning, could someone give me some insights or papers regarding this issue?

$\endgroup$

2 Answers 2

1
$\begingroup$

We have some different issues.

First one, I don't quite get what do you mean by "imbalanced data set". Also we don't know what do you want to predict. This is important because things change radically. Imagine that I want to predict wether a person is about to find a job or not given some variables (age, education years, marital status and so on). Now, in my 200 size dataset, I only have 10 people employed. This is a problem, as my dataset is very unbalanced, so it can't "learn" how to predict the employment "formula" as I only provided 10 cases out of 200. Sample size is always a nightmare to statisticians, but it depends on what you want to do and how to effectively know how much data you need to do something.

What is always true though (regarding another issue) is the split dataset thing you comment. That is also controversial as I don't think there's a given ratio to split number (I've read papers ranging from 90-10 to 50-50 to even 30-70). Moreover, you should be concerned about the aberration that splitting data implies. If you are "leaving out" observations, you are in fact, losing power. This means that you dataset is now not 200 observations, but let's say (as there's no magic number as we just discussed) 100. Now that's a substantially lower number! And even more if your dataset is "unbalanced", this means that either the test (never validation!) and train sets will have few of that variable, and therefore underfitting/overfittng is now more than plausible. In other words, there are no real reasons to split your data and put you model into a disadvantage, cripping out your dataset only means that you will lose information. It is not worth it to do so just for checking how good (or bad) you did. There are other methods to do this.

My recommendations are:

  1. Learn exactly what you want to predict (and why! It might not be the adequate way of doing things.)
  2. Learn about the way of doing so and get a basic theoretical foundation (assumptions, ideal scenarios, worst-case uses, red flags, etc) of such model (algorithm for the ML fans)
  3. Stay away from data splitting. There are far better (and simpler!) methods (bootstrap, cross-validation, etc.)

Hope this helped

Here, check this resource, as it contain some insight about predictions https://hbiostat.org/rmsc

Good luck

$\endgroup$
0
$\begingroup$

If you have an unbalanced dataset, you should try one of the options to handle like;

  • Under-sampling
  • Over-sampling
  • Cluster the abundant class
  • Ensemble different resampled dataset etc.

optimal training/test data split is changing based on how much data you have, for a small dataset %70 - %30 is acceptable but if you have a large dataset %99 - %1 is also well enough. The idea behind that inductive learning algorithm that you use for your task only says the output hypothesis fits your target over the training data. So you keep max the observed data to produce the best-approximated hypothesis to the target function.

$\endgroup$
5
  • 3
    $\begingroup$ You might be interested in some of the following links about class imbalance and proper scoring rules: stats.stackexchange.com/questions/357466/… fharrell.com/post/class-damage fharrell.com/post/classification stats.stackexchange.com/a/359936/247274 stats.stackexchange.com/questions/464636/… twitter.com/f2harrell/status/1062424969366462473?lang=en $\endgroup$
    – Dave
    Commented Mar 12, 2021 at 12:21
  • $\begingroup$ Thanks a lot @Mehmet Ali Özer for the explanations. But one of my concern was the fact that the constructed model is designed to score the same size model. Of course not impossible, but to me it looks like it is designed not to be accurate most of the time, and especially with unbalanced issues. $\endgroup$
    – celo
    Commented Mar 12, 2021 at 13:04
  • $\begingroup$ Thanks @Dave for the links $\endgroup$
    – celo
    Commented Mar 12, 2021 at 13:04
  • $\begingroup$ You should not consider doing any of these things until you have identified what performance criteria are important for your application. More specifically, false-positive and false-negative misclassification costs. If you have sufficient data, imbalance is not actually a problem. If misclassification costs are equal, assigning all patterns to the majority class is often the optimal solution, so if that is not acceptable, it means that the minority class is more important in some sense and you ought to build that into the evaluation. $\endgroup$ Commented Aug 27, 2022 at 12:49
  • 1
    $\begingroup$ Note that nobody has been able to provide a demonstration of a problem where e.g. resampling improves accuracy, even when a bounty was on offer ( stats.stackexchange.com/questions/559294/… ) and nobody has been able to give a diagnostic test to show when imbalance is actually a problem, again even when a bounty was offered ( stats.stackexchange.com/questions/539638/… ) $\endgroup$ Commented Aug 27, 2022 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.