auto-sklearn官網html
https://automl.github.io/auto-sklearn/master/installation.htmlpython
https://automl.github.io/auto-sklearn/master/linux
auto-sklearn is an automated machine learning toolkit and a drop-in replacement for a scikit-learn estimator:git
import autosklearn.classification cls = autosklearn.classification.AutoSklearnClassifier() cls.fit(X_train, y_train) predictions = cls.predict(X_test)
auto-sklearn frees a machine learning user from algorithm selection and hyperparameter tuning. It leverages recent advantages in Bayesian optimization, meta-learning and ensemble construction. Learn more about the technology behind auto-sklearn by reading our paper published at NIPS 2015 .github
import autosklearn.classification import sklearn.model_selection import sklearn.datasets import sklearn.metrics X, y = sklearn.datasets.load_digits(return_X_y=True) X_train, X_test, y_train, y_test = \ sklearn.model_selection.train_test_split(X, y, random_state=1) automl = autosklearn.classification.AutoSklearnClassifier() automl.fit(X_train, y_train) y_hat = automl.predict(X_test) print("Accuracy score", sklearn.metrics.accuracy_score(y_test, y_hat))
This will run for one hour and should result in an accuracy above 0.98.docker
Installationshell
Manualubuntu
APIswindows
auto-sklearn is licensed the same way as scikit-learn, namely the 3-clause BSD license.
If you use auto-sklearn in a scientific publication, we would appreciate a reference to the following paper:
Efficient and Robust Automated Machine Learning, Feurer et al., Advances in Neural Information Processing Systems 28 (NIPS 2015).
Bibtex entry:
@incollection{NIPS2015_5872, title = {Efficient and Robust Automated Machine Learning}, author = {Feurer, Matthias and Klein, Aaron and Eggensperger, Katharina and Springenberg, Jost and Blum, Manuel and Hutter, Frank}, booktitle = {Advances in Neural Information Processing Systems 28}, editor = {C. Cortes and N. D. Lawrence and D. D. Lee and M. Sugiyama and R. Garnett}, pages = {2962--2970}, year = {2015}, publisher = {Curran Associates, Inc.}, url = {http://papers.nips.cc/paper/5872-efficient-and-robust-automated-machine-learning.pdf} }
We appreciate all contribution to auto-sklearn, from bug reports and documentation to new features. If you want to contribute to the code, you can pick an issue from the issue tracker which is marked with Needs contributer.
Note
To avoid spending time on duplicate work or features that are unlikely to get merged, it is highly advised that you contact the developers by opening a github issue before starting to work.
When developing new features, please create a new branch from the development branch. When to submitting a pull request, make sure that all tests are still passing.
auto-sklearn安裝官網(不支持Windows系統)
https://automl.github.io/auto-sklearn/master/installation.html
auto-sklearn has the following system requirements:
Linux operating system (for example Ubuntu) (get Linux here),
Python (>=3.5) (get Python here).
C++ compiler (with C++11 supports) (get GCC here) and
SWIG (version 3.0 or later) (get SWIG here).
For an explanation of missing Microsoft Windows and MAC OSX support please check the Section Windows/OSX compatibility.
Please install all dependencies manually with:
curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | xargs -n 1 -L 1 pip install
Then install auto-sklearn:
pip install auto-sklearn
We recommend installing auto-sklearn into a virtual environment or an Anaconda environment.
If the pip
installation command fails, make sure you have the System requirements installed correctly.
To provide a C++11 building environment and the lateste SWIG version on Ubuntu, run:
sudo apt-get install build-essential swig
Anaconda does not ship auto-sklearn, and there are no conda packages for auto-sklearn. Thus, it is easiest to install auto-sklearn as detailed in the Section Installing auto-sklearn.
A common installation problem under recent Linux distribution is the incompatibility of the compiler version used to compile the Python binary shipped by AnaConda and the compiler installed by the distribution. This can be solved by installing the gcc compiler shipped with AnaConda (as well as swig):
conda install gxx_linux-64 gcc_linux-64 swig
auto-sklearn relies heavily on the Python module resource
. resource
is part of Python’s Unix Specific Services and not available on a Windows machine. Therefore, it is not possible to run auto-sklearn on a Windows machine.
Possible solutions (not tested):
Windows 10 bash shell
virtual machine
docker image
We currently do not know if auto-sklearn works on OSX. There are at least two issues holding us back from actively supporting OSX:
The resource
module cannot enforce a memory limit on a Python process (see SMAC3/issues/115).
OSX machines on travis-ci take more than 30 minutes to spawn. This makes it impossible for us to run unit tests forauto-sklearn and its dependencies SMAC3 and ConfigSpace.
In case you’re having issues installing the pyrfr package, check out this installation suggestion on github.
Possible other solutions (not tested):
virtual machine
docker image