└── train /train: -------------------------------------------------------------------------------- 1 | from linnea.algebra.expression import Matrix, Vector, Equal, Times, Inverse, Transpose 2 | from linnea.algebra.equations import Equations 3 | from linnea.algebra.properties import Property 4 | 5 | n = 1500 6 | m = 1000 7 | 8 | X = Matrix("X", (n, m)) 9 | X.set_property(Property.FULL_RANK) 10 | y = Vector("y", (n, 1)) 11 | b = Vector("b", (m, 1)) 12 | 13 | # b = (X^T X)^-1 X^T y 14 | equations = Equations(Equal(b, Times(Inverse(Times(Transpose(X), X)), Transpose(X), y))) 15 | --------------------------------------------------------------------------------