From 53c6459f2be8b7526616ba35a709f855995ddddf Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 19 Jun 2016 11:37:24 -0700 Subject: [PATCH] start getting started --- .gitignore | 3 ++ docs/getting_started.rst | 70 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d26dbea..4ab0da3 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ MANIFEST # vim *.swp + +#Notebooks +.ipynb_checkpoints diff --git a/docs/getting_started.rst b/docs/getting_started.rst index c3ce665..7505e29 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -1,2 +1,70 @@ + Getting Started -=============== \ No newline at end of file +=============== + +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 `__ 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 `__ +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