I need to multiply a Vector by a RowVector to get a Matrix as the result. But the F# libraries do not have such an implementation for the * operator. How can I do this?
//wj(t+1)=wj(t) - a * (yk-dk)* xjk
let weightsDeltaRule (w : matrix, x : vector, y : vector, d : vector) (a : float) =
let delta = y - d
w - a * (Vector.transpose x) * delta
UPD:
vector<'T> * rowvec<'T> -> matrix<'T>
rowvec<'T> * vector<'T> -> 'T
Why do you think the powerpack doesn't implement Vector * RowVector = Matrix
?
Taken from matrix.fsi
/// Multiply a column vector and a row vector to produce a matrix
static member ( * ) : Vector<'T> * RowVector<'T> -> Matrix<'T>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.