-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Carlos Hernandez
committed
Jun 22, 2016
1 parent
f04f2a6
commit 53c6459
Showing
2 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,6 @@ MANIFEST | |
|
||
# vim | ||
*.swp | ||
|
||
#Notebooks | ||
.ipynb_checkpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,70 @@ | ||
|
||
Getting Started | ||
=============== | ||
=============== | ||
|
||
Getting started with Osprey is as easy as setting up a single ``YAML`` | ||
configuration file. This configuration file will contain your model | ||
estimators (``estimator``), hyperparameter search strategy | ||
(``strategy``), hyperparameter search space (``search_space``), dataset | ||
information (``dataset_loader``), cross-validation strategy (``cv``), | ||
and a path to a ``SQL``-like database (``trials``). This page will go | ||
over how to set up a basic Osprey toy project and then a more realistic | ||
example for a `molecular | ||
dynamics <https://en.wikipedia.org/wiki/Molecular_dynamics>`__ dataset. | ||
|
||
First, we'll begin with a simple C-Support Vector Classification example | ||
using ``sklearn`` to introduce the basic ``YAML`` fields for Osprey. To | ||
tell Osprey that we want to use ``sklearn``'s ``SVC`` as our estimator, | ||
we can type: | ||
|
||
.. code:: yaml | ||
estimator: | ||
entry_point: sklearn.svm.SVC | ||
If we want to use `gaussian process | ||
prediction <https://en.wikipedia.org/wiki/Gaussian_process#Gaussian_process_prediction.2C_or_kriging>`__ | ||
to decide where to search in hyperparameter space, we can add: | ||
|
||
.. code:: yaml | ||
strategy: | ||
name: gp | ||
params: | ||
seeds: 5 | ||
The search space can be defined for any hyperparameter available in the | ||
``estimator`` class. Here we can adjust the value range of the ``C`` and | ||
``gamma`` hyperparamters. We'll search over a range of 0.1 to 10 for | ||
``C`` and over 1E-5 to 1 in log-space (note: ``warp: log``) for | ||
``gamma``. | ||
|
||
.. code:: yaml | ||
search_space: | ||
C: | ||
min: 0.1 | ||
max: 10 | ||
type: float | ||
gamma: | ||
min: 1e-5 | ||
max: 1 | ||
warp: log | ||
type: float | ||
.. code:: yaml | ||
cv: 5 | ||
.. code:: yaml | ||
dataset_loader: | ||
name: sklearn_dataset | ||
params: | ||
method: load_digits | ||
.. code:: yaml | ||
trials: | ||
uri: sqlite:///osprey-trials.db |