Question: 7. Classification and Accuracy Bookmark this page Now we need a way to actually use our model to classify the data points. In this section,

7. Classification and Accuracy Bookmark this page Now we need a way to actually use our model to classify the data points. In this section, you will implement a way to classify the data points using your model parameters, and then measure the accuracy of your model. Classification 1 point possible (graded) Implement a classification function that uses and bo to classify a set of data points. You are given the feature matrix, 0, and bo as defined in previous sections. This function should return a numpy array of -1s and 1s. If a prediction is greater than zero, it should be considered a positive classification. Available Functions: You have access to the Numpy python library as np. Tip:: As in previous exercises, when I is a float," =0" should be checked with | <. def classify theta theta_0 a classification function that uses and o to set of data points. red args : feature_matrix numpy matrix describing the given data. each row represents single point. array linear classifier. theta_o real valued number representing offset parameter. returns: ls where kth element is predicted feature using theta_0. if prediction greater than zero it should press esc then tab or click outside code editor exit unanswered submit you have used attempts save reset>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
