- Machine Learning with scikit:learn Quick Start Guide
- Kevin Jolly
- 103字
- 2021-06-24 18:15:51
Conventions used
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 classifier
nb_classifier = GaussianNB()
#Fitting the classifier into the training data
nb_classifier.fit(X_train, y_train)
#Extracting the accuracy score from the NB classifier
nb_classifier.score(X_test, y_test)
Warnings or important notes appear like this.
Tips and tricks appear like this.