Skip to content
New issue

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

Get rid of Scipy dependency for LogisticRegression gradient descent #1

Open
trekhleb opened this issue Dec 20, 2018 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@trekhleb
Copy link
Owner

trekhleb commented Dec 20, 2018

It may be good to provide pure Python implementation of Gradient Descent (instead of SciPy one) for Logistic Regression just for the learning purposes.

@trekhleb trekhleb added the enhancement New feature or request label Dec 27, 2018
@fpedrozam
Copy link

Error LogisticRegression


ModuleNotFoundError Traceback (most recent call last)
in
5
6 # Import custom logistic regression implementation.
----> 7 from homemade.logistic_regression import LogisticRegression

D:\Projetos\Teste Fabio\homemade-machine-learning-master\homemade\logistic_regression_init_.py in
1 """Logistic Regression Module"""
2
----> 3 from .logistic_regression import LogisticRegression

D:\Projetos\Teste Fabio\homemade-machine-learning-master\homemade\logistic_regression\logistic_regression.py in
2
3 import numpy as np
----> 4 from scipy.optimize import minimize
5 from ..utils.features import prepare_for_training
6 from ..utils.hypothesis import sigmoid

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_init_.py in
385
386 from .optimize import *
--> 387 from ._minimize import *
388 from ._root import *
389 from ._root_scalar import *

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_minimize.py in
28 from ._trustregion_krylov import _minimize_trust_krylov
29 from ._trustregion_exact import _minimize_trustregion_exact
---> 30 from ._trustregion_constr import _minimize_trustregion_constr
31
32 # constrained minimization

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_trustregion_constr_init_.py in
2
3
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
5
6 all = ['_minimize_trustregion_constr']

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_trustregion_constr\minimize_trustregion_constr.py in
2 import time
3 import numpy as np
----> 4 from scipy.sparse.linalg import LinearOperator
5 from .._differentiable_functions import VectorFunction
6 from .._constraints import (

D:\aplicativos\Anaconda3\lib\site-packages\scipy\sparse_init_.py in
228 import warnings as _warnings
229
--> 230 from .base import *
231 from .csr import *
232 from .csc import *

D:\aplicativos\Anaconda3\lib\site-packages\scipy\sparse\base.py in
7
8 from scipy._lib.six import xrange
----> 9 from scipy._lib._numpy_compat import broadcast_to
10 from .sputils import (isdense, isscalarlike, isintlike,
11 get_sum_dtype, validateaxis, check_reshape_kwargs,

ModuleNotFoundError: No module named 'scipy._lib._numpy_compat'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants