Question: Prerequisites In this assignment you will implement the Naive Bayes Classifier. Before starting this assignment, make sure you understand the concepts discussed in the videos

Prerequisites In this assignment you will implement the Naive Bayes Classifier. Before starting this assignment, make sure you understand the concepts discussed in the videos in Week 2 about Naive Bayes. You can also find it useful to read Chapter 1 of the textbook. Also, make sure that you are familiar with the numpy.ndarray class of python's numpy library and that you are able to answer the following questions: Let's assume a is a numpy array. What is an array's shape (e.g., what is the meaning of a.shape)? What is numpy's reshaping operation? How much computational over-head would it induce? What is numpy's transpose operation, and how it is different from reshaping? Does it cause computation overhead? What is the meaning of the commands a.reshape(-1, 1) and a.reshape(-1)? Would happens to the variable a after we call b = a.reshape(-1)? Does any of the attributes of a change? How do assignments in python and numpy work in general? Does the b=a statement use copying by value? Or is it copying by reference? Would the answer to the previous question change depending on whether a is a numpy array or a scalar value? You can answer all of these questions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!