Skip to content

Logistic Regression #124

@Val11011

Description

@Val11011

In class LogisticRegression, this line

self.param -= self.learning_rate * -(y - y_pred).dot(X)

indicates that the gradient is calculated as -(y-y_pred).dot(X).
Apparently, a factor of 1 / n_samples is missed here.

The interesting part is that I found there is an issue about the similar problem in Regression.py.
It seems that the issue has been fixed, but only for Regression.py, not LogisticRegression.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions