Created
February 21, 2019 01:03
-
-
Save gchavez2/366fb3323de925819b3388765146794a 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
import numpy as np | |
from sklearn import linear_model | |
# Load data | |
data = np.loadtxt('./heights_weights.csv', delimiter=',', skiprows=1) | |
X = data[:,0:2] | |
y = data[:,2] | |
# Fit (train) the Logistic Regression classifier | |
clf = linear_model.LogisticRegression(C=1e40, solver='newton-cg') | |
fitted_model = clf.fit(X, y) | |
# Predict | |
prediction_result = clf.predict([(70,180)]) |
I am not sure what you are referring to!!
Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
…________________________________
De: Navien2 <[email protected]>
Enviado: Saturday, December 21, 2019 6:47:34 PM
Para: gchavez2 <[email protected]>
Cc: Seeker <[email protected]>; Manual <[email protected]>
Asunto: Re: gchavez2/LogisticRegression.py
Hi,
i tried to test the above code , but could not find the csv file ??
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://gist.github.com/366fb3323de925819b3388765146794a?email_source=notifications&email_token=AIWBKJPTVJQV4NRI7Q4ZXG3QZZJDNA5CNFSM4J6IACT2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6J7M#gistcomment-3118070>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIWBKJJRX6JQTAYUH3C2JMTQZZJDNANCNFSM4J6IACTQ>.
heights_weights.csv ?? where is the file ?
I could not find it myself….
Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
…________________________________
De: Navien2 <[email protected]>
Enviado: Saturday, December 21, 2019 7:01:40 PM
Para: gchavez2 <[email protected]>
Cc: Seeker <[email protected]>; Manual <[email protected]>
Asunto: Re: gchavez2/LogisticRegression.py
heights_weights.csv ?? where is the file ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://gist.github.com/366fb3323de925819b3388765146794a?email_source=notifications&email_token=AIWBKJLDDH2AL5GTQ63ITCDQZZKYJA5CNFSM4J6IACT2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6J76#gistcomment-3118079>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIWBKJO56YSFZQI7UAVNCPDQZZKYJANCNFSM4J6IACTQ>.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i tried to test the above code , but could not find the csv file ??