Question: Write a function log _ prob that takes the numpy arrays train _ features, y , y , and l o g p y as
Write a function logprob that takes the numpy arrays trainfeatures, and as input, and outputs the following matrix with the shape where is the number of training data points. is the training data point. Try and avoid the utilization of loops as much as possible. No loops are necessary. stored using the common standards.
In : def logprobtrainfeatures, muy sigmay logpy:
trainfeatures. shape
# your code here
# Add the log probability of
logpxy logpyreshape
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
