课程: Spark for Machine Learning & AI
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Naive Bayes classification
- [Instructor] Now it's time to work with the Naive Bayes classifier. Now we're starting from where we left off in the previous video, and as you may recall, we have a data frame, which has the indexed and vectorized iris data, and I called that ivirs _df. Let's just take a look at the first row just to familiarize ourselves again with the data structure. So, we have our raw data from the file which includes sepal length, sepal width, petal length, petal width. We have the species, then we have our feature vector, which has some numeric measures, and we have label, which in this case just shows a 0, but labels are 0, 1, or 2 in this data set, depending on which species that particular row applies to. So, we're working with Naive Bayes, so let's import some code to support that, so we'll start by importing the Naive Bayes classifier. Now let's import a tool that'll help us evaluate the accuracy of our model. Now we have imported Naive Bayes and we've imported a classification…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。