Skip to main content

Wrappers that combat bias in data for machine learning models

Project description

Bias Wrappers

Wrappers for standard multioutput machine learning models that apply progressive calibration to training to produce better testing results, with a bias factor. Used mainly to combat bias on seemingly random/biased data. Default models are Linear Regression with Gradient Descent (for regression) and a standard Naive Bayes (for classification), however, you can input your own machine learning models with the model param.

Fixes

Added a get_params function and switched default ml algs to sklearn framework to help with sklearn compatibility issues; therefore removing _models.py.

Instructions

  1. Install the package with pip:
pip install biaswrappers
  1. Python Quickstart:
# Import Classifier/Regressor
from biaswrappers import classifier, regressor
from biaswrappers.baseline_tests import test_classification, test_regression

# Initialize classifier/regressor and...
# Specify a model class with a fit and predict method as a param.
my_clf = classifier.BiasClassifier() 
my_regressor = regressor.BiasRegressor()

# Use the baseline_tests module for comparable results
test_classification(model=my_regressor) # No return values, just prints results
test_regression(model=my_regressor) # No return values, just prints results

Project details


Download files

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

Source Distribution

biaswrappers-0.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biaswrappers-0.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file biaswrappers-0.3.tar.gz.

File metadata

  • Download URL: biaswrappers-0.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

File hashes

Hashes for biaswrappers-0.3.tar.gz
Algorithm Hash digest
SHA256 90ab81b7154ccf97d2fcc7ec64d74a1b40e0f8357b6832f8a97fab3f043c3145
MD5 0a258ff4b0b7870075b5da1d48092d24
BLAKE2b-256 5319f7e1af8abb875aa5a1a067fcffb25e4e57f62aebccb3e8540e5c123ff4b1

See more details on using hashes here.

File details

Details for the file biaswrappers-0.3-py3-none-any.whl.

File metadata

  • Download URL: biaswrappers-0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

File hashes

Hashes for biaswrappers-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88c3de0c9e538c7f9dd4936d9c082532daf08f907c4c94512bc535f80a8aba0d
MD5 43c2362f1d3bbec0331d861390ff6e06
BLAKE2b-256 24b0b1dfcea013b38b1ce2a1884ef1c5d3ea7028e1bfe7694f8f32b7b72d65fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page