Skip to main content

Bagging Classifier with Under Sampling

Project description

# USBaggingClassifier # Overview Bagging Classifier with Under Sampling. This approach is good for classification imbalanced data. You can use both of Binary or Multi-Class Classification. Methods could use looks like sci-kit learn’s APIs. Only use in python 3.x # Usage ## Parameters * base_estimator : object Classifier looks like sklearn.XXClassifier. Classifier must have methods [fit(X, y), predict(X)]. It is not nesessary predict_proba(X), but if it has this method, you could select ‘soft voting’ option and get predict probability. * n_estimators : int (default=10) The number of base estimators. * voting : str {‘hard’,’soft’} (default=’hard’) hard : use majority rule voting soft : argmax of the sums of prediction probabilities * n_jobs : int (default=1) number of jobs to run in parallel for fit. If -1, equals to number of cores. ## methods * fit(X, y) X : pandas.DataFrame y : pandas.Series return : None * predict(X) X : pandas.DataFrame return : predicted y : numpy.array * predict_proba(X) X : pandas.DataFrame return : predicted probabilities (mean of all bagged models)

# LICENSE This software is released under the MIT License, see [LICENSE](/LICENSE)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for usbclassifier, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size usbclassifier-0.1.3-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size usbclassifier-0.1.3.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page