Skip to content

Instantly share code, notes, and snippets.

@EdsonAvelar
Created May 22, 2019 00:11
Show Gist options
  • Select an option

  • Save EdsonAvelar/1c2c05bcf2ddee6c5e3829eac470f53c to your computer and use it in GitHub Desktop.

Select an option

Save EdsonAvelar/1c2c05bcf2ddee6c5e3829eac470f53c to your computer and use it in GitHub Desktop.
# Carregando Breast Cancer Dataset
breast_cancer = load_breast_cancer()
X = breast_cancer.data
y = breast_cancer.target
# Separando o Dataset
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.33, random_state=44)
# Criando um modelo
clf = LogisticRegression(penalty='l2', C=0.1)
clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment