Commit c7c2af5
authored
Add generic
* feat: add linfa-residual-sequence crate
Implements ResidualSequence Struct and StackWith trait for composing regression
models in a boosting / residual-stacking pattern. The second (and any
further) model trains on the residuals left by the previous one;
predictions are summed.
Docs and tests were written with AI assistance.
* remove doc link
* move to composing/ module in linfa main crate
* update docs
* implement PredictInplace instead
* remove unused param error
* use one struct to implement stacking
* add deep chain test
* Rename to ResidualChain
Implement Shrinkage
implement paramguard for shrinkage
* satisfy zola
* can only shrink by if target has the same float type
* work with predict inplace only
* zola fix
* add link in docs
* simplify comparison
* rename to residual_chain as consistent with struct
* implement copy trait
* add method `chain` which just chains self with an unshrunk corrector.
rename stack_with -> chain_shrunk
* add docResidualChain composing method (#430)1 parent b1f9ddb commit c7c2af5
3 files changed
Lines changed: 590 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
0 commit comments