Created
November 13, 2022 14:33
-
-
Save diego898/43255549485fa581ff3daad27175ae6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn import svm, datasets | |
from sklearn.model_selection import StratifiedKFold | |
from sklearn.metrics import confusion_matrix, classification_report, RocCurveDisplay, ConfusionMatrixDisplay, auc | |
# Import some data to play with | |
iris = datasets.load_iris() | |
X = iris.data | |
y = iris.target | |
target_names = iris.target_names[:2] | |
X, y = X[y != 2], y[y != 2] | |
n_samples, n_features = X.shape | |
# Add 'noisy' features to make problem harder | |
noise_val = 15 | |
X += np.random.random(X.shape)*noise_val |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment