mathurinm / andersoncd

This code is no longer maintained. The codebase has been moved to https://github.com/scikit-learn-contrib/skglm. This repository only serves to reproduce the results of the AISTATS 2021 paper "Anderson acceleration of coordinate descent" by Quentin Bertrand and Mathurin Massias.
BSD 3-Clause "New" or "Revised" License
18 stars 6 forks source link

ENH : benchmark against sklearn and celer #49

Open mathurinm opened 3 years ago

mathurinm commented 3 years ago

A priori we should get timings similar to celer, and improve upon sklearn. With my current benchmark (https://github.com/mathurinm/benchmark_lasso/tree/anderson) we are slower than both :

Some possible reasons :

Feel free to edit/add stuff @QB3 @agramfort

image image image

agramfort commented 3 years ago

do you actually simulate sparse data?

mathurinm commented 3 years ago

Yes it's benchopt's make_correlated_data : https://benchopt.github.io/generated/benchopt.datasets.simulated.make_correlated_data.html#benchopt.datasets.simulated.make_correlated_data

agramfort commented 3 years ago

tu as pris un w_true sparse?

mathurinm commented 3 years ago

Approximately, benchopt's density is 0.2 so w_true has 1_000 nnz

I just pushed https://github.com/mathurinm/andersoncd/blob/master/andersoncd/tests/benchmark.py to play faster with the code, so far we are never faster than sklearn while celer is when alpha becomes small (alpha_max / 100).

Sometimes it gets quite bad:

################################################################################
Setup:
    X: (2000, 10000)
    alpha_max / 100
    nnz in sol: 1933
    nnz in tru: 1000
us: 24.3889 s, kkt: 3.26e-05, obj: 29.4207366036
sk:  8.0396 s, kkt: 1.70e-04, obj: 29.4213767252
cr:  5.9640 s, kkt: 9.63e-05, obj: 29.4209978211