Calculate the weighted inner product of A and B with the weight W. This result is useful in Logistic Regression.
weight_matrix(A, W, B)
the left matrix
the weight
the right matrix
the wighted inner product, noticing it can be vector when A or B is 2 dimension.
# NOT RUN {
#data generation
A <- matrix(rnorm(200),100,2)
W <- rnorm(100)
B <- matrix(rnorm(100),100,1)
weighted <- weight_matrix(A,W,B)
# }
Run the code above in your browser using DataLab