Python3 Here is a snippet of my Python code. Why am I getting a from sklearn imp
ID: 3890302 • Letter: P
Question
Python3
Here is a snippet of my Python code. Why am I getting a
from sklearn import svm
X = []
Y = []
X = np.array(x3)
Y = np.array(y3)
validation_size = 0.20
seed = 7
X.reshape(-1, 1)
Y.reshape(-1, 1)
X_train, X_validation, Y_train, Y_validation = model_selection.train_test_split(X, Y, test_size=validation_size, random_state=seed)
cmap_light = ListedColormap(['#AAAAFF', '#FFAAAA'])
cmap_bold = ListedColormap(['#0000FF', '#FF0000'])
svm_clf= svm.SVC()
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovo', degree=3, gamma='auto', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)
svm_clf.fit(X_train,Y_train)
Explanation / Answer
X = []
Y = []
X = np.array(x3)
Y = np.array(y3)
validation_size = 0.20
seed = 7
X.reshape(-1, 1)
Y.reshape(-1, 1)
X_train, X_validation,
Y_train, Y_validation = model_selection.train_test_split(X, Y, test_size=validation_size, random_state=seed)
cmap_light = ListedColormap(['#AAAAFF', '#FFAAAA'])
cmap_bold = ListedColormap(['#0000FF', '#FF0000'])
svm_clf= svm.SVC()
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovo',
degree=3, gamma='auto', kernel='rbf',
max_iter=-1, probability=False,
random_state=None, shrinking=True,
tol=0.001, verbose=False)
svm_clf.fit(X_train,Y_train)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.