INNER CODE UNIT · Python

X

Mohitkr95/best-data-science-resources · Python ML Algorithms Implementation/Part 10 - Model Selection _ Boosting/Section 48 - Model Selection/Python/grid_search.py:10

X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values

# Splitting the dataset into the Training set and Test set
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)

# Feature Scaling
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.transform(X_test)

# Training the Kernel SVM model on the Training set
from sklearn.svm import SVC
classifier = SVC(kernel = 'rbf', random_state = 0)
classifier.fit(X_train, y_train)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…