8000 [WIP] Adding Implementation of SAG by dsullivan7 · Pull Request #3814 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[WIP] Adding Implementation of SAG #3814

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

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
079bd64
adding a test for sag and a first step in implementation, note that t…
dsullivan7 Oct 30, 2014
ae5814a
adding parameter for sag that can be set through the api
dsullivan7 Oct 30, 2014
6529c5c
adding sag class file
dsullivan7 Oct 31, 2014
8a53e55
adding class file for sag
dsullivan7 Nov 5, 2014
c52ffd3
reverting changes to stochastic gradient descent
dsullivan7 Nov 6, 2014
53d6337
small fixes
dsullivan7 Nov 6, 2014
ffc6a1d
actually reverting sgd changes
dsullivan7 Nov 6, 2014
95394d8
adding multiclass implementation to classifier
dsullivan7 Nov 6, 2014
aacb481
adding joblib parallelization
dsullivan7 Nov 6, 2014
b08ed70
adding regressor to sag
dsullivan7 Nov 6, 2014
98d6688
adding random sampling to seq dataset, putting sag in sag_fast.pyx, s…
dsullivan7 Nov 12, 2014
11e680c
adding sparse implementation test
dsullivan7 Nov 13, 2014
aeaf569
adding sparse implementation of sag, need to refactor so that only sp…
dsullivan7 Nov 13, 2014
1de11c5
adding test just for sag
dsullivan7 Nov 17, 2014
f4cf2d7
using ndarrays instead of malloc
dsullivan7 Nov 17, 2014
ffe50c3
adding multiclass test for sag
dsullivan7 Nov 18, 2014
3b93c35
taking out unused parameters
dsullivan7 Nov 18, 2014
bf6083c
adding auto eta
dsullivan7 Nov 18, 2014
f3ca673
updating example
dsullivan7 Nov 18, 2014
b03b8ab
removing dependency on sgd
dsullivan7 Nov 18, 2014
7b21f86
adding warmstart for regressor and binary classifier, next up multi-c…
dsullivan7 Nov 19, 2014
6a9501e
adding multiclass warmstart
dsullivan7 Nov 19, 2014
3886098
adding documentation
dsullivan7 Nov 19, 2014
0502e13
adding check for overflow/underflow and making doctest work
dsullivan7 Nov 19, 2014
76d74ee
making top classes BaseEstimators
dsullivan7 Nov 19, 2014
b19202e
converting y to a float
dsullivan7 Nov 19, 2014
3715bb6
adding classweighting
dsullivan7 Nov 20, 2014
0a6c05e
adding check for single class and adding test
dsullivan7 Nov 20, 2014
5e9df60
Merge branch 'master' into sag
dsullivan7 Nov 20, 2014
26b7872
classifier tests now pass
dsullivan7 Nov 20, 2014
782dbd2
all tests pass locally
dsullivan7 Nov 20, 2014
65c2bc9
adding different tests that don't depend on c rng seeding
dsullivan7 Nov 20, 2014
40f7e3d
adding trick to get multiclass parallel working
dsullivan7 Nov 21, 2014
4a695f4
adding sparse decay
dsullivan7 Nov 21, 2014
7c2c716
updated plot sag comparison example
dsullivan7 Nov 21, 2014
587fc69
changing title of example
dsullivan7 Nov 21, 2014
c82efd6
adding wscale
Nov 24, 2014
0a525be
adding non-sparse implementation
dsullivan7 Nov 26, 2014
6dc8840
removing plain sag implementation
dsullivan7 Nov 26, 2014
f4d18ce
fixing merge conflicts
dsullivan7 Nov 26, 2014
c48cf63
adding tol parameter
dsullivan7 Nov 27, 2014
2fc8eed
adding message that works
dsullivan7 Nov 27, 2014
e53e46f
adding tol and logging number of iterations and convergence time
dsullivan7 Nov 28, 2014
575a89a
reseting cumulative sums after each epoch
dsullivan7 Dec 1, 2014
f24e9ed
getting about half of the tests to pass
dsullivan7 Dec 1, 2014
f8b7b7f
adding documentation and adding fix to tests that weren't working
dsullivan7 Dec 2, 2014
51753ff
changes to a test case
dsullivan7 Dec 2, 2014
da2ae09
removing precision of test
dsullivan7 Dec 2, 2014
64989eb
adding max_iter sag, needs to be removed
dsullivan7 Dec 9, 2014
62ef6b7
making tests single methods instead of classes, still need to make th…
dsullivan7 Dec 10, 2014
8d91b59
adding sparse tests
dsullivan7 Dec 10, 2014
4bd3177
pep8 corrections and adding a test comparison for lr
dsullivan7 Dec 10, 2014
aeef04c
adding test for ridge comparison
dsullivan7 Dec 10, 2014
4558505
sparse, standard and cython implementation all match to 1- decimal pl…
dsullivan7 Dec 11, 2014
0f04f84
all tests pass with intercept
dsullivan7 Dec 11, 2014
9553570
adding important note about scaling
dsullivan7 Dec 11, 2014
c16c5f9
fixing merge conflicts
dsullivan7 Dec 12, 2014
3fee7d4
trying to fix sag tests
dsullivan7 Dec 12, 2014
e9974f1
decreasing default tol
dsullivan7 Dec 12, 2014
612ba28
removing plot_sag_comparison and putting it into plot_sgd_comparison
dsullivan7 Dec 12, 2014
e14d1cd
removing baseregressor and baseclassifier classes
dsullivan7 Dec 12, 2014
d31d29f
moving loss functions into sag file
dsullivan7 Dec 18, 2014
f0deceb
fixing merge conflicts
dsullivan7 Apr 7, 2015
c4963cf
removing assumption of self.coef_
dsullivan7 Apr 8, 2015
082bd63
fixing merge conflicts
dsullivan7 May 4, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
4 changes: 3 additions & 1 deletion examples/linear_model/plot_sgd_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from sklearn import datasets

from sklearn.cross_validation import train_test_split
from sklearn.linear_model import SGDClassifier, Perceptron
from sklearn.linear_model import SGDClassifier, Perceptron, SAGClassifier
from sklearn.linear_model import PassiveAggressiveClassifier

heldout = [0.95, 0.90, 0.75, 0.50, 0.01]
Expand All @@ -31,11 +31,13 @@
C=1.0)),
("Passive-Aggressive II", PassiveAggressiveClassifier(loss='squared_hinge',
C=1.0)),
("SAGClassifier", SAGClassifier(random_state=77, tol=.1))
]

xx = 1. - np.array(heldout)

for name, clf in classifiers:
print("training %s" % name)
rng = np.random.RandomState(42)
yy = []
for i in heldout:
Expand Down
3 changes: 3 additions & 0 deletions sklearn/linear_model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
lasso_path, enet_path, MultiTaskLasso,
MultiTaskElasticNet, MultiTaskElasticNetCV,
MultiTaskLassoCV)
from .sag import SAGClassifier, SAGRegressor
from .sgd_fast import Hinge, Log, ModifiedHuber, SquaredLoss, Huber
from .stochastic_gradient import SGDClassifier, SGDRegressor
from .ridge import (Ridge, RidgeCV, RidgeClassifier, RidgeClassifierCV,
Expand Down Expand Up @@ -67,6 +68,8 @@
'RidgeCV',
'RidgeClassifier',
'RidgeClassifierCV',
'SAGClassifier',
'SAGRegressor',
'SGDClassifier',
'SGDRegressor',
'SquaredLoss',
Expand Down
Loading
0