Skip to content

Commit

Permalink
writing and updating some doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvaincom committed Oct 16, 2024
1 parent ec9ad2f commit 4302fd0
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 67 deletions.
5 changes: 2 additions & 3 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
API
===

This page lists all the public functions and classes of the `skore`
package:

.. currentmodule:: skore

This page lists all the public functions and classes of the ``skore``
package.

Project
-------
Expand Down
36 changes: 36 additions & 0 deletions doc/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.. _getting_started:

Getting started
===============

.. currentmodule:: skore

From your shell, initialize a skore project, here named ``project.skore``, that
will be in your current working directory:

.. code:: console
python -m skore create "project.skore"
Then, from your Python code (in the same directory), load the project and store
an integer for example:

.. code-block:: python
from skore import load
project = load("project.skore")
project.put("my_int", 3)
Finally, from your shell (in the same directory), start the UI locally:

.. code:: console
python -m skore launch project.skore
This will automatically open a browser at the UI's location:

#. On the top left, create a new ``View``.
#. From the ``Elements`` section on the bottom left, you can add stored items to this view, either by double-cliking on them or by doing drag-and-drop.

.. image:: https://raw.githubusercontent.com/sylvaincom/sylvaincom.github.io/master/files/probabl/skore/2024_10_14_skore_demo.gif
:alt: Getting started with ``skore`` demo
57 changes: 21 additions & 36 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,59 +1,44 @@
.. You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
skore
=====
Welcome to ``skore``
====================

Gradient-boosting survival analysis
-----------------------------------
#OwnYourDataScience
-------------------

.. container:: index-features

* survival and competing risks
* track and visualize your objects from a user-friendly dashboard

* scikit-learn compatible

* scalable gradient boosting
With ``skore``, data scientists can:

A scalable **time-to-event and competing risk prediction model**
implemented in Python.
#. Store objects of different types from their Python code: python lists, ``scikit-learn`` fitted pipelines, ``plotly`` figures, and more.
#. **Track** and **visualize** these stored objects on a user-friendly dashboard.
#. Export the dashboard to a HTML file.

.. container:: index-box sd-card
These are only the first features: skore is a work in progress and aims to be
an end-to-end library for data scientists.
Stay tuned!

**Competing risks settings**

Predicting which event will happen first, and when, from data where some
events have not yet been observed:

The model is **a gradient-boosting variant**, that offers prediction for
survival and competing risks settings, fully compatible with
`scikit-learn <https://scikit-learn.org>`_. It can be used with
scikit-learn tools such as pipelines, column transformers,
cross-validation, hyper-parameter search tools, etc.

.. This package will also offer neural network based estimators by leveraging
`PyTorch <https://pytorch.org>`_ and `skorch
<https://skorch.readthedocs.io/>`_.
This library puts a focus on predictive accuracy rather than on inference.
Quantifying the statistical association or causal effect of covariates with/on
the cumulated event incidence or instantaneous hazard rate is not in the scope
of this library at this time.

The theory behind the model is described in `this paper
<https://arxiv.org/abs/2406.14085>`_.

- License: MIT
- GitHub repository: https://github.com/soda-inria/hazardous
- Changelog: https://github.com/soda-inria/hazardous/blob/main/CHANGES.rst
- License: BSD
- GitHub repository: https://github.com/probabl-ai/skore
- Discord: http://discord.probabl.ai
- Status: under development, API is subject to change without notice.

.. image:: https://raw.githubusercontent.com/sylvaincom/sylvaincom.github.io/master/files/probabl/skore/2024_10_14_skore_demo.gif
:alt: Getting started with ``skore`` demo

.. currentmodule:: skore

.. toctree::
:maxdepth: 2
:caption: Contents:

api
install
getting_started
auto_examples/index
user_guide
api
21 changes: 21 additions & 0 deletions doc/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _install:

Install
=======

.. currentmodule:: skore

First of all, we recommend using a `virtual environment (venv) <https://docs.python.org/3/tutorial/venv.html>`_.
You need ``python>=3.9``.

Then, you can install ``skore`` by using `pip``:

.. code:: console
pip install -U skore
You can check ``skore``'s latest version on `PyPI <https://pypi.org/project/skore/>`_.

🚨 For Windows users, the encoding must be set to
`UTF-8 <https://docs.python.org/3/using/windows.html#utf-8-mode>`_:
see `PYTHONUTF8 <https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUTF8>`_.
10 changes: 5 additions & 5 deletions doc/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**00:00.681** total execution time for 2 files **from all galleries**:
**00:00.637** total execution time for 2 files **from all galleries**:

.. container::

Expand All @@ -32,9 +32,9 @@ Computation times
* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_auto_examples_plot_demo.py` (``../examples/plot_demo.py``)
- 00:00.652
* - :ref:`sphx_glr_auto_examples_plot_2_basic_usage.py` (``../examples/plot_2_basic_usage.py``)
- 00:00.610
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_demo_2.py` (``../examples/plot_demo_2.py``)
- 00:00.029
* - :ref:`sphx_glr_auto_examples_plot_1_getting_started.py` (``../examples/plot_1_getting_started.py``)
- 00:00.027
- 0.0
3 changes: 2 additions & 1 deletion doc/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ User guide

.. currentmodule:: skore

*The user guide is incoming.*
*The User Guide is currently work in progress and will be released soon, thank
you for your patience!*
3 changes: 1 addition & 2 deletions examples/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Examples
========

Below is a gallery of examples on how to use `skore` for predictive
competitive risk analysis problems.
Below is a gallery of examples on how to use ``skore``.
33 changes: 33 additions & 0 deletions examples/plot_1_getting_started.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""
==========================
Getting started with skore
==========================
`This is work in progress.`
This guide provides a quick start to ``skore``, an open-source package that aims to enable data scientists to:
1. Store objects of different types from their Python code: python lists, `scikit-learn` fitted pipelines, `plotly` figures, and more.
2. Track and visualize these stored objects on a user-friendly dashboard.
3. Export the dashboard to a HTML file.
.. prompt:: bash
twine upload dist/*
"""

# %%
# From your shell, initialize a skore project, here named project.skore, that will be in your current working directory:
# ```
# python -m skore create "project.skore"
# ```


# %%
import sklearn
import matplotlib.pyplot as plt

# %%
sklearn.__version__
plt.plot([0, 1, 2, 3], [0, 1, 2, 3])
plt.show()
8 changes: 4 additions & 4 deletions examples/plot_demo.py → examples/plot_2_basic_usage.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
======
blabla
======
====================
Basic usage of skore
====================
blabla
This is work in progress.
"""

# %%
Expand Down
16 changes: 0 additions & 16 deletions examples/plot_demo_2.py

This file was deleted.

0 comments on commit 4302fd0

Please sign in to comment.