November 2019
Intermediate to advanced
346 pages
9h 36m
English
import picklefile = open('CTU13Scenario1flowData.pickle', 'rb')botnet_dataset = pickle.load(file)
X_train, y_train, X_test, y_test = ( botnet_dataset[0], botnet_dataset[1], botnet_dataset[2], botnet_dataset[3],)
from sklearn.tree import *clf = DecisionTreeClassifier()
clf.fit(X_train, y_train)
clf.score(X_test, y_test)
The following is the output:
0.9991001799640072