Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary classifier notebook documentation update #10

Merged
1 change: 1 addition & 0 deletions changelog/8.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added documentation to the Example Notebooks section.
37 changes: 37 additions & 0 deletions docs/example_notebooks/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,42 @@
Example Notebooks
=================

Example notebooks and corresponding :ref:`notebook-config` are available at `Example Notebooks <https://github.com/epic-open-source/seismometer/tree/main/example-notebooks>`_.

Directory Structure
-------------------

To run the notebook, we assume the existence of the following files in the same
directory as the notebook: configuration files and the data directory.

.. _notebook-config:

Configuration Files
~~~~~~~~~~~~~~~~~~~

The following configuration files are required to be in the same directory as the notebook:

- ``config.yml``,
- ``usage_config.yml``,
- ``data/metadata.json``.

.. seealso::
:ref:`config-files` for more information on configuration files.


Data
~~~~

The first code cell in the notebook downloads the required data and data dictionary from
`seismometer-data <https://github.com/epic-open-source/seismometer-data>`_
repository and creates the following files in the notebook directory:

- ``data/predictions.parquet``,
- ``data/events.parquet``,
- ``dictionary.yml``.

To use your own data, simply remove the first code cell and place your own data
following the schema mentioned above.

.. nbgallery::
notebooks/binary-classifier/classifier_bin
4 changes: 3 additions & 1 deletion example-notebooks/binary-classifier/classifier_bin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
"DATASET_SOURCE = \"https://raw.githubusercontent.com/epic-open-source/seismometer-data/main\"\n",
"_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/predictions.parquet\", \"data/predictions.parquet\")\n",
"_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/events.parquet\", \"data/events.parquet\")\n",
"_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/data_dictionary.yml\", \"dictionary.yml\")"
"_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/data_dictionary.yml\", \"dictionary.yml\")",
"\n",
"# We assume the existence of the following files in the same directory as the notebook: config.yml, usage_config.yml and data/metadata.json"
]
},
{
Expand Down