Train classifier on balanced dataset and apply on imbalanced dataset?2019 Community Moderator ElectionSklearn: How to adjust data set proportion during training, but not testingPython : How to use Multinomial Logistic Regression using SKlearnSklearn Random Forest Prediction Correlation IssueBinary Classification on small dataset < 200 samplesTraining XGBoost sequentiallyCreating categorical variable, without knowing true categories (through binning time series data)?How to add noise to supervised (binary-classifier)?Unbalanced multi-class : distribution might change as more data come inIs there any way how to make samples balanced?Create an API from EDA or ML outcome?
Maximum likelihood parameters deviate from posterior distributions
What does it mean to describe someone as a butt steak?
How is it possible to have an ability score that is less than 3?
"to be prejudice towards/against someone" vs "to be prejudiced against/towards someone"
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Can I make popcorn with any corn?
Can divisibility rules for digits be generalized to sum of digits
What are the differences between the usage of 'it' and 'they'?
The use of multiple foreign keys on same column in SQL Server
Python: next in for loop
strToHex ( string to its hex representation as string)
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
Problem of parity - Can we draw a closed path made up of 20 line segments...
Mage Armor with Defense fighting style (for Adventurers League bladeslinger)
Is it unprofessional to ask if a job posting on GlassDoor is real?
Why was the small council so happy for Tyrion to become the Master of Coin?
What are these boxed doors outside store fronts in New York?
How could an uplifted falcon's brain work?
Dragon forelimb placement
Is it legal for company to use my work email to pretend I still work there?
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
What's the point of deactivating Num Lock on login screens?
Train classifier on balanced dataset and apply on imbalanced dataset?
2019 Community Moderator ElectionSklearn: How to adjust data set proportion during training, but not testingPython : How to use Multinomial Logistic Regression using SKlearnSklearn Random Forest Prediction Correlation IssueBinary Classification on small dataset < 200 samplesTraining XGBoost sequentiallyCreating categorical variable, without knowing true categories (through binning time series data)?How to add noise to supervised (binary-classifier)?Unbalanced multi-class : distribution might change as more data come inIs there any way how to make samples balanced?Create an API from EDA or ML outcome?
$begingroup$
I have a labelled training dataset DS1 with 1000 entries. The targets (True/False) are nearly balanced. With sklearn, I have tried several algorithms, of which the GradientBoostingClassifier works best with F-Score ~0.83.
Now, I have to apply the trained classifier on an unlabelled dataset DS2 with ~ 5 million entries (and same features). However, for DS2, the target distribution is expected to be highly unbalanced.
Is this a problem? Will the model reproduce the trained target distribution from DS1 when applied on DS2?
If yes, would another algorithm be more robust?
All the best,
Greg
python scikit-learn data ml
$endgroup$
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
$begingroup$
I have a labelled training dataset DS1 with 1000 entries. The targets (True/False) are nearly balanced. With sklearn, I have tried several algorithms, of which the GradientBoostingClassifier works best with F-Score ~0.83.
Now, I have to apply the trained classifier on an unlabelled dataset DS2 with ~ 5 million entries (and same features). However, for DS2, the target distribution is expected to be highly unbalanced.
Is this a problem? Will the model reproduce the trained target distribution from DS1 when applied on DS2?
If yes, would another algorithm be more robust?
All the best,
Greg
python scikit-learn data ml
$endgroup$
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
$begingroup$
I think this may depend quite a bit on why your training data was balanced but your test data is not.
$endgroup$
– Ben Reiniger
Mar 5 at 22:07
$begingroup$
@BenReiniger, could you elaborate on that?
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
If you know the real distribution (or have an idea of it) you can use it weight training samples. (You could try using an Inner Product Detector or a Kernel Inner Product Detector if you have the probabilities of the classes, I can provide you with the module but I never used it outside of Computer Vision applications, actually no one ever did, KIPD was published 3 months ago)
$endgroup$
– Pedro Henrique Monforte
3 hours ago
add a comment |
$begingroup$
I have a labelled training dataset DS1 with 1000 entries. The targets (True/False) are nearly balanced. With sklearn, I have tried several algorithms, of which the GradientBoostingClassifier works best with F-Score ~0.83.
Now, I have to apply the trained classifier on an unlabelled dataset DS2 with ~ 5 million entries (and same features). However, for DS2, the target distribution is expected to be highly unbalanced.
Is this a problem? Will the model reproduce the trained target distribution from DS1 when applied on DS2?
If yes, would another algorithm be more robust?
All the best,
Greg
python scikit-learn data ml
$endgroup$
I have a labelled training dataset DS1 with 1000 entries. The targets (True/False) are nearly balanced. With sklearn, I have tried several algorithms, of which the GradientBoostingClassifier works best with F-Score ~0.83.
Now, I have to apply the trained classifier on an unlabelled dataset DS2 with ~ 5 million entries (and same features). However, for DS2, the target distribution is expected to be highly unbalanced.
Is this a problem? Will the model reproduce the trained target distribution from DS1 when applied on DS2?
If yes, would another algorithm be more robust?
All the best,
Greg
python scikit-learn data ml
python scikit-learn data ml
asked Mar 5 at 16:10
user3240855user3240855
111
111
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
$begingroup$
I think this may depend quite a bit on why your training data was balanced but your test data is not.
$endgroup$
– Ben Reiniger
Mar 5 at 22:07
$begingroup$
@BenReiniger, could you elaborate on that?
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
If you know the real distribution (or have an idea of it) you can use it weight training samples. (You could try using an Inner Product Detector or a Kernel Inner Product Detector if you have the probabilities of the classes, I can provide you with the module but I never used it outside of Computer Vision applications, actually no one ever did, KIPD was published 3 months ago)
$endgroup$
– Pedro Henrique Monforte
3 hours ago
add a comment |
1
$begingroup$
I think this may depend quite a bit on why your training data was balanced but your test data is not.
$endgroup$
– Ben Reiniger
Mar 5 at 22:07
$begingroup$
@BenReiniger, could you elaborate on that?
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
If you know the real distribution (or have an idea of it) you can use it weight training samples. (You could try using an Inner Product Detector or a Kernel Inner Product Detector if you have the probabilities of the classes, I can provide you with the module but I never used it outside of Computer Vision applications, actually no one ever did, KIPD was published 3 months ago)
$endgroup$
– Pedro Henrique Monforte
3 hours ago
1
1
$begingroup$
I think this may depend quite a bit on why your training data was balanced but your test data is not.
$endgroup$
– Ben Reiniger
Mar 5 at 22:07
$begingroup$
I think this may depend quite a bit on why your training data was balanced but your test data is not.
$endgroup$
– Ben Reiniger
Mar 5 at 22:07
$begingroup$
@BenReiniger, could you elaborate on that?
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
@BenReiniger, could you elaborate on that?
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
If you know the real distribution (or have an idea of it) you can use it weight training samples. (You could try using an Inner Product Detector or a Kernel Inner Product Detector if you have the probabilities of the classes, I can provide you with the module but I never used it outside of Computer Vision applications, actually no one ever did, KIPD was published 3 months ago)
$endgroup$
– Pedro Henrique Monforte
3 hours ago
$begingroup$
If you know the real distribution (or have an idea of it) you can use it weight training samples. (You could try using an Inner Product Detector or a Kernel Inner Product Detector if you have the probabilities of the classes, I can provide you with the module but I never used it outside of Computer Vision applications, actually no one ever did, KIPD was published 3 months ago)
$endgroup$
– Pedro Henrique Monforte
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
For prediction, the GradientBoostingClassifier will only take those features in account that you fed it during training and it will then classify each observation on its own. That means that usually you don't have to worry about the target-distribution of your prediction-dataset, as long you trained your model on a sufficiently extensive training dataset.
$endgroup$
1
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier withfeature_importances_
.
$endgroup$
– georg_un
Mar 7 at 11:26
add a comment |
$begingroup$
A GBM will ultimately try to split your data into rectangular regions and assign each one a constant predicted probability, the proportion of positive training examples in that region. So yes, on the whole the model has baked in the training sample's average response rate.
I think that effect will be lessened if your data is particularly cleanly separable: if each rectangular region is pure, and your test data just happens to be more heavily inclined toward the negative regions, then it will naturally get closer to "the right" answer.
I'm not sure about other models that would be more robust in this way...an SVM probably, not being naturally probabilistic in the first place.
If your context is downsampling, logistic regression has a well-known adjustment for exactly this problem. The same adjustment (to log-odds) seems likely to help in the GBM context as well, though I'm not aware of any analysis to back it up.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46709%2ftrain-classifier-on-balanced-dataset-and-apply-on-imbalanced-dataset%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
For prediction, the GradientBoostingClassifier will only take those features in account that you fed it during training and it will then classify each observation on its own. That means that usually you don't have to worry about the target-distribution of your prediction-dataset, as long you trained your model on a sufficiently extensive training dataset.
$endgroup$
1
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier withfeature_importances_
.
$endgroup$
– georg_un
Mar 7 at 11:26
add a comment |
$begingroup$
For prediction, the GradientBoostingClassifier will only take those features in account that you fed it during training and it will then classify each observation on its own. That means that usually you don't have to worry about the target-distribution of your prediction-dataset, as long you trained your model on a sufficiently extensive training dataset.
$endgroup$
1
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier withfeature_importances_
.
$endgroup$
– georg_un
Mar 7 at 11:26
add a comment |
$begingroup$
For prediction, the GradientBoostingClassifier will only take those features in account that you fed it during training and it will then classify each observation on its own. That means that usually you don't have to worry about the target-distribution of your prediction-dataset, as long you trained your model on a sufficiently extensive training dataset.
$endgroup$
For prediction, the GradientBoostingClassifier will only take those features in account that you fed it during training and it will then classify each observation on its own. That means that usually you don't have to worry about the target-distribution of your prediction-dataset, as long you trained your model on a sufficiently extensive training dataset.
answered Mar 5 at 17:21
georg_ungeorg_un
836
836
1
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier withfeature_importances_
.
$endgroup$
– georg_un
Mar 7 at 11:26
add a comment |
1
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier withfeature_importances_
.
$endgroup$
– georg_un
Mar 7 at 11:26
1
1
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
Hm, my training data has 35% positive target ratio. If applied to DS2, the model finds ~35% positive ratio there as well, even though I'd expect it to be <5% ...
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
A balanced training dataset has a more or less equal distribution of the contained classes. In your case, this would be a distribution of about 50% positive. There are a lot of methods of how to generate an equal distribution by downsampling or oversampling (see this link)
$endgroup$
– georg_un
Mar 7 at 11:25
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier with
feature_importances_
.$endgroup$
– georg_un
Mar 7 at 11:26
$begingroup$
At the moment there are two possibilities: either your expectation regarding the prediction data set is wrong or the classifier is inaccurate. For this reason, it is common practice to divide the labeled data into a training and a test data set (e.g. in the ratio 70:30 or 80:20) and to examine the performance of the classifier on the test data set. I would recommend doing so and then investigating your results further. Don't forget that you can print out feature importances of the GradientBoostingClassifier with
feature_importances_
.$endgroup$
– georg_un
Mar 7 at 11:26
add a comment |
$begingroup$
A GBM will ultimately try to split your data into rectangular regions and assign each one a constant predicted probability, the proportion of positive training examples in that region. So yes, on the whole the model has baked in the training sample's average response rate.
I think that effect will be lessened if your data is particularly cleanly separable: if each rectangular region is pure, and your test data just happens to be more heavily inclined toward the negative regions, then it will naturally get closer to "the right" answer.
I'm not sure about other models that would be more robust in this way...an SVM probably, not being naturally probabilistic in the first place.
If your context is downsampling, logistic regression has a well-known adjustment for exactly this problem. The same adjustment (to log-odds) seems likely to help in the GBM context as well, though I'm not aware of any analysis to back it up.
$endgroup$
add a comment |
$begingroup$
A GBM will ultimately try to split your data into rectangular regions and assign each one a constant predicted probability, the proportion of positive training examples in that region. So yes, on the whole the model has baked in the training sample's average response rate.
I think that effect will be lessened if your data is particularly cleanly separable: if each rectangular region is pure, and your test data just happens to be more heavily inclined toward the negative regions, then it will naturally get closer to "the right" answer.
I'm not sure about other models that would be more robust in this way...an SVM probably, not being naturally probabilistic in the first place.
If your context is downsampling, logistic regression has a well-known adjustment for exactly this problem. The same adjustment (to log-odds) seems likely to help in the GBM context as well, though I'm not aware of any analysis to back it up.
$endgroup$
add a comment |
$begingroup$
A GBM will ultimately try to split your data into rectangular regions and assign each one a constant predicted probability, the proportion of positive training examples in that region. So yes, on the whole the model has baked in the training sample's average response rate.
I think that effect will be lessened if your data is particularly cleanly separable: if each rectangular region is pure, and your test data just happens to be more heavily inclined toward the negative regions, then it will naturally get closer to "the right" answer.
I'm not sure about other models that would be more robust in this way...an SVM probably, not being naturally probabilistic in the first place.
If your context is downsampling, logistic regression has a well-known adjustment for exactly this problem. The same adjustment (to log-odds) seems likely to help in the GBM context as well, though I'm not aware of any analysis to back it up.
$endgroup$
A GBM will ultimately try to split your data into rectangular regions and assign each one a constant predicted probability, the proportion of positive training examples in that region. So yes, on the whole the model has baked in the training sample's average response rate.
I think that effect will be lessened if your data is particularly cleanly separable: if each rectangular region is pure, and your test data just happens to be more heavily inclined toward the negative regions, then it will naturally get closer to "the right" answer.
I'm not sure about other models that would be more robust in this way...an SVM probably, not being naturally probabilistic in the first place.
If your context is downsampling, logistic regression has a well-known adjustment for exactly this problem. The same adjustment (to log-odds) seems likely to help in the GBM context as well, though I'm not aware of any analysis to back it up.
answered Mar 7 at 21:23
Ben ReinigerBen Reiniger
343210
343210
add a comment |
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46709%2ftrain-classifier-on-balanced-dataset-and-apply-on-imbalanced-dataset%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
I think this may depend quite a bit on why your training data was balanced but your test data is not.
$endgroup$
– Ben Reiniger
Mar 5 at 22:07
$begingroup$
@BenReiniger, could you elaborate on that?
$endgroup$
– user3240855
Mar 7 at 6:58
$begingroup$
If you know the real distribution (or have an idea of it) you can use it weight training samples. (You could try using an Inner Product Detector or a Kernel Inner Product Detector if you have the probabilities of the classes, I can provide you with the module but I never used it outside of Computer Vision applications, actually no one ever did, KIPD was published 3 months ago)
$endgroup$
– Pedro Henrique Monforte
3 hours ago