Skip to main content

a set of Regression Wrappers that combats bias in data for machine learning models through regularization

Project description

Bias Wrappers

Wrappers for standard multioutput machine learning regressors that apply regularization 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, however, you can input your own machine learning models with the model param.

BiasRegressorC1 uses a progressive regularization method to add a penalty to data, to prevent overfitting or underfitting due to noise via bias (explicit regularization).

BiasRegressorC2 uses another regression model to generate features that prevent overfitting or underfitting (implicit regularization).

Fixes

0.4.0

Made many fixes to original BiasRegressor, now BiasRegressorC1, and added a second one incorporating machine learning regularization through generated features.

0.3.1

Fixed Array/List Contradiction in regression, removed classifier for code compatibility, and removed a few print statements.

Removed classifier because the formula used only benefits regression problems.

Instructions

  1. Install the package with pip:
pip install biaswrappers
  1. Python Quickstart:
# Import one of the regressors from the package, regressor
from biaswrappers import regressor
from biaswrappers.baseline_tests import test_regression

# Initialize cregressor and...
# Specify a model class (or multiple, for C2) with a fit and predict method as a param.
my_regressor = regressor.BiasRegressorC1()

# Look at the baseline_tests module for easy tests
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.4.0.tar.gz (4.2 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.4.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: biaswrappers-0.4.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for biaswrappers-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d1b8c4ea8fe7e63ee2b2116d69ba75dbe23524cf65b55b1521748aac396c4682
MD5 37b2f8d9f139a4083108266602da1e0d
BLAKE2b-256 fac8a20240876c44430aec56fdfd261911c2ceaa3ec0f5b03eea8c834ba432df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: biaswrappers-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for biaswrappers-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 635c12e4c3d5fb10083867d23327a168e5424f5ebe6d1d4d910f3a6606d2621a
MD5 48e06e5b30412adef80677d88e2a0c19
BLAKE2b-256 a7733b80d6e64991c121f23fa3d28d5a5fddae309e179e2f06457794e10712cf

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