fabianp / mord

Ordinal regression algorithms
Other
264 stars 70 forks source link

Change max iteration syntax to match scikit-learn. #1

Closed statwonk closed 8 years ago

statwonk commented 8 years ago

Somewhat unfortunately, the scikit-learn (max_iter) and scipy (maxiter) syntax for max allowed iteration differs. This makes mord's syntax consistent with scikit-learn.

statwonk commented 8 years ago

The motivation for this patch is that LogitsticAT did not converge before the max number of iterations in examples/bench.py.

Mean Absolute Error of LogisticRegression: 4.42687747036
STOP: TOTAL NO. of ITERATIONS EXCEEDS LIMIT
STOP: TOTAL NO. of ITERATIONS EXCEEDS LIMIT
Mean Absolute Error of LogisticAT 2.92885375494

However, increasing max_iter to 50k still fails to produce convergence.

STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT
STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT

I'm not familiar with the internals of scipy, but the error message occurs here.

statwonk commented 8 years ago

I'd like to add, thank you for publishing this @fabianp! I've been tinkering with mord. :)

fabianp commented 8 years ago

Hi, thanks for the patch! The project definitely needs some more love, so don't hesitate to send me all your improvements.