fix: ridge regression, code refactoring

This commit is contained in:
Volodymyr Orlov
2020-11-11 15:59:04 -08:00
parent 7a4fe114d8
commit c42fccdc22
3 changed files with 63 additions and 24 deletions
+2 -2
View File
@@ -154,8 +154,8 @@ impl<T: RealNumber, M: Matrix<T>> LinearRegression<T, M> {
}
/// Get estimates regression coefficients
pub fn coefficients(&self) -> M {
self.coefficients.clone()
pub fn coefficients(&self) -> &M {
&self.coefficients
}
/// Get estimate of intercept