We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the LogisticRegression Class for binary classification problems.
LogisticRegression
LogisticRegression class should have these methods:
.fit(X,y)
.predict(X)
.predict_proba(X)
Note:
.predict()
.predict_proba()
Test your model on IRIS dataset using 2 classes(instead of 3 classes of IRIS) available in the library and check how well it performs. Example code
from learnemall.datasets import iris from learnemall.linear import LogisticRegression model = LogisticRegression() X,y = iris.load_dataset() # Take 2 classes only X = X [ : , :-2] y = (y!=0)*1 # train the model model.fit(X,y) # predict using model y_pred = model.predict(X) # Evaluate print((y_pred == y).mean())
The text was updated successfully, but these errors were encountered:
I want to claim this issue
Sorry, something went wrong.
Issue Assigned
No branches or pull requests
Implement the
LogisticRegression
Class for binary classification problems.LogisticRegression
class should have these methods:.fit(X,y)
:- it takes in features(X) and targets(y) and trains the model..predict(X)
:- it takes features(X) as input and outputs the predicted targets/labels(y).predict_proba(X)
:- it takes features(X) as input and outputs the predicted probabilities of targets/labels(y)Note:
.predict()
can internally call.predict_proba()
and then change probabilities to labels based on threshold(default to 0.5)Test your model on IRIS dataset using 2 classes(instead of 3 classes of IRIS) available in the library and check how well it performs.
Example code
The text was updated successfully, but these errors were encountered: