Skip to content

Commit

Permalink
Add documentation on code origin, clarify status.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoKeyser committed Aug 3, 2023
1 parent d82d55a commit e4dd29e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ The resulting slope and offset are the median slope and offset of the lines defi

### No toolbox required

This code is based on [Theil-Sen Robust Linear Regression](https://mathworks.com/matlabcentral/fileexchange/48294-theil-sen-robust-linear-regression), version 1.2.0.0, by Zachary Danziger.
A key modification is to use `median(X, 'omitnan')` instead of `nanmedian(X)` to avoid dependency on the (commercially licensed) [Statistics Toolbox](https://mathworks.com/products/statistics.html).
(Note that there are several other implementations on Mathworks's [File Exchange](https://mathworks.com/matlabcentral/fileexchange).
Unfortunately, most were found to depend on the Statistics Toolbox, [except one](https://mathworks.com/matlabcentral/fileexchange/43135-regression-utilities), which was judged to be slower and less versatile.)
This code is based on [Theil-Sen Robust Linear Regression](https://mathworks.com/matlabcentral/fileexchange/48294-theil-sen-robust-linear-regression), version 1.2.0.0, by Zachary Danziger (which in turn is based on [Theil–Sen estimator](https://de.mathworks.com/matlabcentral/fileexchange/34308-theil-sen-estimator), version 1.0.0.0 by Arnout Tilgenkamp).
Note that these previous versions depend on the (commercially licensed) [Statistics Toolbox](https://mathworks.com/products/statistics.html).

This version uses `median(X, 'omitnan')` instead of `nanmedian(X)` to avoid dependency on the Statistics Toolbox.

See the [changelog](#changelog) below for further modifications.

Expand All @@ -47,23 +47,24 @@ Note how a few "unlucky" outliers can bias the least squares estimate (LS), but

## Changelog

- October 2014 by Z. Danziger: Original version.
- December 2011 by A. Tilgenkamp: Release of version 1.0.0.0 on Mathworks File Exchange.
- September 2015 by Z. Danziger: Updated help, speed increase for 2D case
- March 2022 by J. Keyser: Adjusted formatting, added documentation, improved example and added plot, replaced `nanmedian(X)` with `median(X, 'omitnan')`, removed 2D special case, restructured input and output parameters.
- August 2022 by J. Keyser: Explicit omission of identical x coordinates, added coefficient of determination (unadjusted R²) as optional output.
- August 2023 by J. Keyser: Add documentation about original author of version 1.0.0.0.

## Contributing and project status

This project is relatively unmaintained.
This project is considered complete and is relatively unmaintained.
It is shared as-is in the hope to be helpful (see [license.txt](license.txt) for legal terms).

If you find a bug, feel free to let the author(s) know.
Feature requests should be directed to the original author (see below).
If you find a bug, please let the author(s) know.

## Authors

1. Zachary Danziger, original author ([Matlab profile](https://de.mathworks.com/matlabcentral/profile/authors/1044524), [lab webpage](https://anil.fiu.edu/))
2. Johannes Keyser
- Arnout Tilgenkamp ([Matlab profile](https://mathworks.com/matlabcentral/profile/authors/1561419))
- Zachary Danziger ([Matlab profile](https://de.mathworks.com/matlabcentral/profile/authors/1044524)
- Johannes Keyser ([Matlab profile](https://mathworks.com/matlabcentral/profile/authors/2267277))

## License

Expand Down

0 comments on commit e4dd29e

Please sign in to comment.