Bag classifier

In the task of classifying two classes, is there any method for choosing the number of positive and negative training instances that will be selected when using the standard package classifier in Python?

logreg = BaggingClassifier(linear_model.LogisticRegression(C=1e3),max_samples=1, max_features=1);

Sometimes the Bagging algorithm selects only positive samples, and the code gives a runtime error.

+4
source share
1 answer

Looking at the source code ( https://github.com/scikit-learn/scikit-learn/blob/51a765a/sklearn/ensemble/bagging.py#L361 ), there is no way to do this.

, 1 ( ) max_samples max_features. , , Bagging FEATURE . , 1.0.

, , .

+1

All Articles