# Getting data | |
from sklearn.datasets import load_breast_cancer | |
cancer = load_breast_cancer() | |
classes=cancer.target_names | |
X = cancer.data | |
y = cancer.target | |
# Importing learning curve visualizer | |
from yellowbrick.model_selection import LearningCurve | |
# Importing Support Vector Classifier | |
from sklearn.svm import SVC | |
# Creating the learning curve | |
visualizer = LearningCurve(SVC(), | |
n_jobs=-1, cv=10, | |
scoring="accuracy") | |
visualizer.fit(X, y) | |
# Saving plot in PNG format | |
visualizer.show(outpath="Learning_Curve.png") |