File tree Expand file tree Collapse file tree
algorithms/linfa-lars/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414//! * ["Least Angle Regression", Efron et al.](https://web.stanford.edu/~hastie/Papers/LARS/LeastAngle_2002.pdf)
1515//! * [Wikipedia entry on the Least-angle regression](https://en.wikipedia.org/wiki/Least-angle_regression)
1616//! * [Scikit-Learn User Guide](https://scikit-learn.org/stable/modules/linear_model.html#least-angle-regression)
17- //!
17+ //!
1818//! # Examples
1919//! ```
2020//! use linfa::prelude::*;
2121//! use linfa_lars::Lars;
22- //!
22+ //!
2323//! // Load the Iris dataset
2424//! let dataset = linfa_datasets::diabetes();
25- //!
25+ //!
2626//! // Create a LARS model with intercept fitting enabled
2727//! let lars = Lars::params().fit_intercept(true).fit(&dataset).unwrap();
28- //!
28+ //!
2929//! // Generate predictions using the trained model and compute the R² score of the predictions
3030//! let pred = lars.predict(&dataset);
3131//! let r2 = pred.r2(&dataset).unwrap();
You can’t perform that action at this time.
0 commit comments