fix: ridge regression, formatting
This commit is contained in:
+1
-5
@@ -69,7 +69,6 @@ pub trait MatrixStats<T: RealNumber>: BaseMatrix<T> {
|
||||
|
||||
/// Computes the standard deviation along the specified axis.
|
||||
fn std(&self, axis: u8) -> Vec<T> {
|
||||
|
||||
let mut x = self.var(axis);
|
||||
|
||||
let n = match axis {
|
||||
@@ -141,10 +140,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn var() {
|
||||
let m = DenseMatrix::from_2d_array(&[
|
||||
&[1., 2., 3., 4.],
|
||||
&[5., 6., 7., 8.]
|
||||
]);
|
||||
let m = DenseMatrix::from_2d_array(&[&[1., 2., 3., 4.], &[5., 6., 7., 8.]]);
|
||||
let expected_0 = vec![4., 4., 4., 4.];
|
||||
let expected_1 = vec![1.25, 1.25];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user