We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ca3cce commit 1267949Copy full SHA for 1267949
src/main/scala/statistics.scala
@@ -38,8 +38,6 @@ object Statistics:
38
def geomean(x: Vec): Double = math.exp(x.map(math.log).sum / x.length)
39
40
def linearregression(x: Mat, y: Vec): Vec =
41
- val n = x.length
42
- val m = x(0).length
43
val xtx = Matrix.mul(x.transpose, x)
44
val xty = Matrix.mul(x.transpose, Matrix.makeRowMatrix(y))
45
val beta = Matrix.mul(Matrix.inverse(xtx), xty)
0 commit comments