October 2018
Intermediate to advanced
172 pages
4h 6m
English
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system."
A block of code is set as follows:
from sklearn.naive_bayes import GaussianNB#Initializing an NB classifiernb_classifier = GaussianNB()#Fitting the classifier into the training datanb_classifier.fit(X_train, y_train)
#Extracting the accuracy score from the NB classifiernb_classifier.score(X_test, y_test)
Read now
Unlock full access