Skip to main content

Bias Wrappers Logo

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 calculate a penalty to add to data, to prevent overfitting or underfitting due to noise via bias (explicit regularization).

BiasRegressorC2 uses another regression model to fit on incorrect predictions and correct answers, to identify patterns of overfitting or underfitting and arrive at a more correct answer (implicit regularization).

Fixes

0.5.1.3

Added the logo!

0.5.1.2

Small changes to the regressors to allow for continuity with the research paper!

0.5.1.1

Moved split_size parameter to the constructor to change it easier.

0.5.1

Redid a lot more of the C1 method to allow for more subtle changes in the right direction: it now closely matches the FakeWrapper but is a lil different. Also, removed features from the postModel of C2 to allow for more pure error learning. Also, renamed FakeWrapper to RandomWrapper.

0.5.0

Redid most of the C1 method to allow multi-output and specialized penalties through regularization. Also, created a "Fake Wrapper" that applies random penalties from 0 to 1 to test the C1 method fairly, proving the use of the specific penalties. Also, improved compatibility with native sklearn commands for metrics and model selection.

0.4.1

Small fixes regarding integration with some data, should work for all dimensions in the event of layered array for y_preds. Also, changed the dataset to use the default sklearn diabetes dataset instead of a Friedman problem, and rewrote some commands for clarity.

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

Release files for biaswrappers 0.5.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biaswrappers 0.5.1.3
File Size Uploaded
biaswrappers-0.5.1.3.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for biaswrappers 0.5.1.3
File Interpreter ABI Platform
biaswrappers-0.5.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / biaswrappers-0.5.1.3.tar.gz

Download URL biaswrappers-0.5.1.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9ad95957136145595c294747a6a7099916700b2e487b4ce386d86197338f77ad
BLAKE2b-256 checksum
How to use checksums
9a301ba7b74f7d9eaa7a2320a1cc2f311e68b357bb0ea0c7be2c76472e216176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.16

Release files / biaswrappers-0.5.1.3-py3-none-any.whl

Download URL biaswrappers-0.5.1.3-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3be84702179ef3306c91d4eabcb3f9e0ab101568a0b6df39603800fa77cecf71
BLAKE2b-256 checksum
How to use checksums
beff2618a9eeca3c082b19ad079cbe8a752f1f7e1d926e7ab24d7bd77ff1b5cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.16

Release history Release notifications | RSS feed

This release

0.5.1.3 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page