From 2e4516e93882a07a66385f687dd83fdf15651184 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Thu, 27 Jul 2023 13:59:46 +0200 Subject: [PATCH 1/2] docs: fix refs in code to make them work --- julearn/api.py | 10 +++++----- julearn/prepare.py | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/julearn/api.py b/julearn/api.py index e812ba7da..33af1a3b8 100644 --- a/julearn/api.py +++ b/julearn/api.py @@ -49,10 +49,10 @@ def run_cross_validation( ---------- X : str, list(str) or numpy.array The features to use. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. y : str or numpy.array The targets to predict. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. model : str or scikit-learn compatible model. If string, it will use one of the available models. X_types : dict[str, list of str] @@ -60,7 +60,7 @@ def run_cross_validation( columns of this column type as a list of str. data : pandas.DataFrame | None DataFrame with the data (optional). - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. problem_type : str The kind of problem to model. @@ -108,7 +108,7 @@ def run_cross_validation( groups : str or numpy.array | None The grouping labels in case a Group CV is used. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. scoring : ScorerLike, optional The scoring metric to use. See https://scikit-learn.org/stable/modules/model_evaluation.html for @@ -141,7 +141,7 @@ def run_cross_validation( * 'scoring': If a searcher is going to be used, the scoring metric to evaluate the performance. - See https://juaml.github.io/julearn/hyperparameters.html for details. + See :ref:`hp_tuning` for details. seed : int | None If not None, set the random seed before any operation. Useful for reproducibility. diff --git a/julearn/prepare.py b/julearn/prepare.py index 6031c0c05..7ff760b87 100644 --- a/julearn/prepare.py +++ b/julearn/prepare.py @@ -38,15 +38,15 @@ def _validate_input_data_df( ---------- X : str, list(str) The features to use. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. y : str The targets to predict. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. df : pandas.DataFrame with the data. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. groups : str | None The grouping labels in case a Group CV is used. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. Raises ------ @@ -78,15 +78,15 @@ def _validate_input_data_df_ext( ---------- X : str, list(str) The features to use. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. y : str The targets to predict. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. df : pandas.DataFrame with the data. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. groups : str | None The grouping labels in case a Group CV is used. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. Raises ------ @@ -217,18 +217,18 @@ def prepare_input_data( ---------- X : str, list(str) The features to use. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. y : str The targets to predict. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. df : pandas.DataFrame with the data. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. pos_labels : str, int, float or list | None The labels to interpret as positive. If not None, every element from y will be converted to 1 if is equal or in pos_labels and to 0 if not. groups : str | None The grouping labels in case a Group CV is used. - See https://juaml.github.io/julearn/input.html for details. + See :ref:`data_usage` for details. X_types : dict | None A dictionary containing keys with column type as a str and the columns of this column type as a list of str. From 5667e9358c566d8eac5af0e2121d33bd06d6fcb8 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Fri, 28 Jul 2023 06:51:30 +0200 Subject: [PATCH 2/2] chore: add changelog 168.doc --- docs/changes/newsfragments/168.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/changes/newsfragments/168.doc diff --git a/docs/changes/newsfragments/168.doc b/docs/changes/newsfragments/168.doc new file mode 100644 index 000000000..cee5f204d --- /dev/null +++ b/docs/changes/newsfragments/168.doc @@ -0,0 +1 @@ +Fix cross-referencing links in documentation by `Synchon Mandal`_ \ No newline at end of file