Skip to content

Instantly share code, notes, and snippets.

View samyumobi's full-sized avatar
🍇
__/\__ Namaste ! Vanakam

Samyuktha samyumobi

🍇
__/\__ Namaste ! Vanakam
View GitHub Profile
from sklearn.model_selection import train_test_split
# Creating the training and testing data
X_train, X_test, Y_train, Y_test = train_test_split(X, y, test_size=0.33)
# Initializing an logistic regression object
clf = LogisticRegression()
# Fit the model to training and test sets
clf.fit(X_train,Y_train)
@samyumobi
samyumobi / Logistic regression.py
Created October 5, 2021 11:57
Sklearn Logistic regression code snippet
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
X, y = load_iris()
clf = LogisticRegression(random_state = 0).fit(X,y)
clf.predict(X[:2,:])
clf.predict_proba(X[:2,:])
clf.score(X,y)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samyumobi
samyumobi / dog_classifier.ipynb
Created March 15, 2021 02:37
Dog_Classifier.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.