added tests for std, variance

This commit is contained in:
Margarita 2022-03-22 21:51:45 +03:00 committed by margarita0303
parent a241d5dc92
commit 99d0cfb384

View File

@ -299,4 +299,14 @@ internal class TestDoubleAnalyticTensorAlgebra {
doubleArrayOf(1.5, 0.5) doubleArrayOf(1.5, 0.5)
)} )}
} }
@Test
fun testStd() = DoubleTensorAlgebra {
assertTrue { floor(tensor5.std() * 10000 ) / 10000 == 2.9439 }
}
@Test
fun testVariance() = DoubleTensorAlgebra {
assertTrue { floor(tensor5.variance() * 10000 ) / 10000 == 8.6666 }
}
} }