Skip to content

Commit 1267949

Browse files
committed
remove unused variables in linear regression
1 parent 1ca3cce commit 1267949

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/main/scala/statistics.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ object Statistics:
3838
def geomean(x: Vec): Double = math.exp(x.map(math.log).sum / x.length)
3939

4040
def linearregression(x: Mat, y: Vec): Vec =
41-
val n = x.length
42-
val m = x(0).length
4341
val xtx = Matrix.mul(x.transpose, x)
4442
val xty = Matrix.mul(x.transpose, Matrix.makeRowMatrix(y))
4543
val beta = Matrix.mul(Matrix.inverse(xtx), xty)

0 commit comments

Comments
 (0)