IOSD / learn-em-all

A project of IOSD Summer of Code 2019, a machine learning framework (python library) with basic support for ML algorithms
10 stars 26 forks source link

Implement Logistic Regression Class for binary classification #5

Open dabasajay opened 5 years ago

dabasajay commented 5 years ago

Implement the LogisticRegression Class for binary classification problems.

LogisticRegression class should have these methods:

Note:

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())
JARVVVIS commented 5 years ago

I want to claim this issue

Ayush789 commented 5 years ago

I want to claim this issue

Issue Assigned