I’m trying to do just some simple stuff and having issues getting it to work. Here are some of those items. (I’m using F#)
- Transposing a Vector
- Summing all items in the resulting matrix
I’m just doing basic numerical computation using floats. Writing some ML algorithms from scratch so I learn the library and some ML while I’m at it.
let SumSquares (theta:Vector) (y:float) (trainingData:Matrix) : CostFunction =
let m = trainingData.RowCount
|> Matrix.mapRows(fun a r -> vector[ square((theta * r) - y) ])
matrix.map should have the theta transposed (I can do so before hand I suppose, but either way).
Matrix.sum should add all items. perhaps matrix.fold is correct? Not seeing good examples on how to use that guy.