Skip to content

[MRG+1] ENH add a benchmark on mnist#3562

Merged
amueller merged 3 commits intoscikit-learn:masterfrom
arjoly:bench-mnist
Jan 14, 2015
Merged

[MRG+1] ENH add a benchmark on mnist#3562
amueller merged 3 commits intoscikit-learn:masterfrom
arjoly:bench-mnist

Conversation

@arjoly
Copy link
Copy Markdown
Member

@arjoly arjoly commented Aug 14, 2014

I have extracted and improved the benchmark of #3204 on mnist.
This will be helpful whenever you want to bench and compare new algorithms (ELM, multilayer neural network, ...).

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Aug 14, 2014

Ping @IssamLaradji

@IssamLaradji
Copy link
Copy Markdown
Contributor

Thanks. Looks great. I will have mlp and elm tested here. :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet true.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right :-)

@jnothman
Copy link
Copy Markdown
Member

I know you knew I'd ask this but: should we be keeping this much duplicate code between bench_mnist and bench_covtype? I know the benchmarks already have a lot of duplicate code...

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Aug 14, 2014

Good question. My opinion is that you will always tidbit differences that will matter. For instance, you will want to give different sets of parameters for each classifier in each benchmark. Prep-processing of the dataset will be different.

I also like the fact that the benchmark is straightforward and self-contained.

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Aug 14, 2014

Travis highlights again an omp cv heisen failure.

@jnothman
Copy link
Copy Markdown
Member

I know I said +1 to the covtype changes, but in order to be particularly useful for playing with parameters, it should be usable in interactive mode. This means making a function like def main(classifiers, order='C', n_jobs=1, random_state=None), rather than having it all under if __name__ == '__main__'.

Then:

$ ipython -i benchmarks/bench_mnist.py
In [1]: main(my_classifiers)

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Aug 14, 2014

That wouldn't be hard to do. I could define an overall benchmark method which would take an estimator as parameter.

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Aug 14, 2014

What would expect as output of your main function?

@jnothman
Copy link
Copy Markdown
Member

As a main() it can just print to stdout.

On 14 August 2014 21:12, Arnaud Joly notifications@github.com wrote:

What would expect as output of your main function?


Reply to this email directly or view it on GitHub
#3562 (comment)
.

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Aug 22, 2014

@jnothman I agree that making the benchmarks more interactive would be interesting. However, I think that this is already useful as it is. And for my usecase, a static script is already pretty good.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 535d7fc on arjoly:bench-mnist into 5024503 on scikit-learn:master.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Dec 29, 2014

LGTM +1 for merge as it is. We can always improve this later (there is no public API issue for benchmark scripts).

@ogrisel ogrisel changed the title [MRG] ENH add a benchmark on mnist [MRG+1] ENH add a benchmark on mnist Dec 29, 2014
@jnothman
Copy link
Copy Markdown
Member

Did you mean to add changes to two other files?

@amueller
Copy link
Copy Markdown
Member

Did you look at the changes I did in #3939?
Gamma in the kernel approximation was buggy and needs to be changed for master. I also made the output prettier.

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Jan 12, 2015

@jnothman Yes, the modification in ``benchmarks/bench_covertype.py` solved potential bugs.

@amueller I have tried to pull your improvements.

@amueller
Copy link
Copy Markdown
Member

I think it would be nice to have the output including all algorithms in the docstring. Otherwise LGTM

@arjoly
Copy link
Copy Markdown
Member Author

arjoly commented Jan 14, 2015

@amueller I have taken into account your last remark.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 5bb3cbf on arjoly:bench-mnist into 454aee9 on scikit-learn:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 5bb3cbf on arjoly:bench-mnist into 454aee9 on scikit-learn:master.

@amueller
Copy link
Copy Markdown
Member

Thanks :)

amueller added a commit that referenced this pull request Jan 14, 2015
[MRG+1] ENH add a benchmark on mnist
@amueller amueller merged commit 9922fa9 into scikit-learn:master Jan 14, 2015
@arjoly arjoly deleted the bench-mnist branch January 15, 2015 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants