Robust linear regression (Huber, LAD, RANSAC, Theil–Sen) for Orange.
Project description
Robust Regression for Orange
This Orange add-on adds two widgets for learning how regression behaves when a data set contains outliers.
Ordinary linear regression fits the line or plane that minimizes squared error. That makes large errors very influential: a few unusual rows can pull the model away from the main pattern. Robust regression methods reduce that effect in different ways.
Widgets
Robust Regression
Fits a robust linear regression learner. The widget currently includes:
- Huber: behaves like ordinary least squares for small residuals, but gives less influence to large residuals.
- Least Absolute Deviation: fits by absolute error when the quantile is
0.5, so it targets the conditional median rather than the conditional mean. You can change the quantile to fit lower or upper conditional quantiles. - RANSAC: repeatedly fits candidate models from small subsets, then keeps the model supported by the largest group of inliers.
- Theil-Sen: estimates slopes from many small subsets and combines them in a way that is resistant to outliers.
The widget outputs a learner for Test and Score and Predictions. If you connect a data set with a continuous target variable, it also outputs a fitted model, a coefficient table, and an annotated data table.
Robust Scale
Centers continuous features by the median and scales them by a quantile range, usually the interquartile range. This is useful when large values should not determine the scale of a feature.
Suggested Workflow
- Add File or Datasets.
- Add Select Columns and choose a continuous target variable.
- Add Robust Regression.
- Connect Robust Regression to Test and Score or Predictions.
- Connect the Annotated Data output to Data Table to inspect residuals.
- Connect the Coefficients output to Data Table to inspect fitted terms.
The demo workflow in docs/examples/robust-regression-demo.ows shows this
layout:
One set of widget settings looks like this:
What To Inspect
The Annotated Data output adds:
- the model prediction for each row;
- the residual, computed as actual value minus prediction;
- a RANSAC inlier flag when RANSAC is selected.
The Coefficients output lists the intercept and fitted coefficients when the selected method exposes them. These are useful for comparing robust fits with ordinary linear regression on the same data.
Notes
Do not use Robust Scale before Robust Regression if the regression widget's internal scaling checkbox is also enabled, because that scales continuous features twice.
Developer setup and release notes are in DEVELOPMENT.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orange3_robust-0.1.0.tar.gz.
File metadata
- Download URL: orange3_robust-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63cd72ef868e664cce11ec702762a03e85652e2a0568303b9cc0b77753babadf
|
|
| MD5 |
b48affaff7516d669348415f28438954
|
|
| BLAKE2b-256 |
f70ab1ab414109197642385b9c84fc1548e90ac9fe22137a4d5f4c2158f2b917
|
File details
Details for the file orange3_robust-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orange3_robust-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb3f0c7d55743e226b06af1eeebc040c376aa746bb6f1897861ea85a427a913f
|
|
| MD5 |
8c02f8143f1a5243e2adc7a499b03ecf
|
|
| BLAKE2b-256 |
e37d6de981aaf78bf3bba6bb5ae79acdb72e7acc7a692d0450f56d84f22a65b3
|