`_.
Step 2 - Create a new virtual environment
diff --git a/examples/01_skpro_intro.ipynb b/examples/01_skpro_intro.ipynb
index ae2471fc2..b8de395b3 100644
--- a/examples/01_skpro_intro.ipynb
+++ b/examples/01_skpro_intro.ipynb
@@ -2487,7 +2487,7 @@
" capability:survival | \n",
" regressor_proba | \n",
" bool | \n",
- " whether estimator can use censoring informatio... | \n",
+ " whether estimator can use censoring information... | \n",
" \n",
" \n",
" 5 | \n",
@@ -2514,7 +2514,7 @@
"1 which machine type(s) is the internal _fit/_pr... \n",
"2 whether estimator supports missing values \n",
"3 whether estimator supports multioutput regression \n",
- "4 whether estimator can use censoring informatio... \n",
+ "4 whether estimator can use censoring information... \n",
"5 which machine type(s) is the internal _fit/_pr... "
]
},
@@ -4423,7 +4423,7 @@
"* predicting variance equal to training residual variance - `ResidualDouble` with standard settings\n",
" * or other unconditional distribution estimate for residuals\n",
"* \"squaring the residual\" two-step prediction - `ResidualDouble`\n",
- "* boostrap prediction intervals - `BootstrapRegressor`\n",
+ "* bootstrap prediction intervals - `BootstrapRegressor`\n",
"* MAPIE model agnostic prediction intervals - `MapieRegressor` (from `mapie` package)\n",
"* natural gradient boosting aka NGBoost - `NGBoostRegressor` (from `ngboost` package)"
]
@@ -5095,7 +5095,7 @@
"1. Read through the [probabilistic regression extension template](https://github.com/sktime/skpro/blob/main/extension_templates/regression.py) - this is a `python` file with `todo` blocks that mark the places in which changes need to be added.\n",
"2. Copy the proba regressor extension template to a local folder in your own repository (local/private extension), or to a suitable location in your clone of the `skpro` or affiliated repository (if contributed extension), inside `skpro.regression`; rename the file and update the file docstring appropriately.\n",
"3. Address the \"todo\" parts. Usually, this means: changing the name of the class, setting the tag values, specifying hyper-parameters, filling in `__init__`, `_fit`, and at least one of the probabilistic prediction methods, preferably `_predict_proba` (for details see the extension template). You can add private methods as long as they do not override the default public interface. For more details, see the extension template.\n",
- "4. To test your estimator manually: import your estimator and run it in the worfklows in Section 1; then use it in the compositors in Section 3.\n",
+ "4. To test your estimator manually: import your estimator and run it in the workflows in Section 1; then use it in the compositors in Section 3.\n",
"5. To test your estimator automatically: call `skpro.utils.check_estimator` on your estimator. You can call this on a class or object instance. Ensure you have specified test parameters in the `get_test_params` method, according to the extension template.\n",
"\n",
"In case of direct contribution to `skpro` or one of its affiliated packages, additionally:\n",
diff --git a/examples/02_skpro_survival.ipynb b/examples/02_skpro_survival.ipynb
index 011564c06..582a41581 100644
--- a/examples/02_skpro_survival.ipynb
+++ b/examples/02_skpro_survival.ipynb
@@ -30,7 +30,7 @@
"source": [
"`skpro` provides a unified interface to time-to-event prediction models, also known as survival prediction models.\n",
"\n",
- "**Time-to-event prediction** is a form of probabilistic regression where **labels can be \"censored\"**, i.e., of the form \"time is t or later\" instead of exat observations.\n",
+ "**Time-to-event prediction** is a form of probabilistic regression where **labels can be \"censored\"**, i.e., of the form \"time is t or later\" instead of exact observations.\n",
"\n",
"**Section 1** provides an overview of the basic **time-to-event prediction workflows** supported by `skpro`.\n",
"\n",
@@ -103,7 +103,7 @@
"metadata": {},
"outputs": [],
"source": [
- "# simulated toy datset, lung cancer survival times\n",
+ "# simulated toy dataset, lung cancer survival times\n",
"import numpy as np\n",
"\n",
"# demographics - age and smoker yes/no\n",
@@ -567,7 +567,7 @@
}
],
"source": [
- "# plotting survival funtions in one figure, smokers in red\n",
+ "# plotting survival functions in one figure, smokers in red\n",
"from matplotlib.pyplot import subplots\n",
"\n",
"_, ax = subplots()\n",
@@ -636,7 +636,7 @@
}
],
"source": [
- "# plotting survival funtions in one figure, smokers in red\n",
+ "# plotting survival functions in one figure, smokers in red\n",
"from matplotlib.pyplot import subplots\n",
"\n",
"_, ax = subplots()\n",
@@ -705,7 +705,7 @@
}
],
"source": [
- "# plotting survival funtions in one figure, smokers in red\n",
+ "# plotting survival functions in one figure, smokers in red\n",
"from matplotlib.pyplot import subplots\n",
"\n",
"_, ax = subplots()\n",
@@ -954,7 +954,7 @@
"* metrics will compare probabilistic prediction to tabular ground truth and\n",
" censoring indicator\n",
"* the metric needs to be of a compatible type, e.g., for distribution predictions\n",
- "* special survival metrics are avaliable to take into account censoring;\n",
+ "* special survival metrics are available to take into account censoring;\n",
" if a non-survival metric is used, the censoring indicator will be ignored"
]
},
@@ -1296,7 +1296,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "the three main reduction stratgies to create survival regressors:\n",
+ "the three main reduction strategies to create survival regressors:\n",
"\n",
"1. adding the capability to handle censoring information to a probabilistic supervised regressor\n",
"2. the above, combined with any strategy to create a probabilistic regressor from an `sklearn` (non-probabilistic) regressors\n",
@@ -1757,7 +1757,7 @@
"1. Read through the [survival regression extension template](https://github.com/sktime/skpro/blob/main/extension_templates/survival.py) - this is a `python` file with `todo` blocks that mark the places in which changes need to be added.\n",
"2. Copy the proba regressor extension template to a local folder in your own repository (local/private extension), or to a suitable location in your clone of the `skpro` or affiliated repository (if contributed extension), inside `skpro.survival`; rename the file and update the file docstring appropriately.\n",
"3. Address the \"todo\" parts. Usually, this means: changing the name of the class, setting the tag values, specifying hyper-parameters, filling in `__init__`, `_fit`, and at least one of the probabilistic prediction methods, preferably `_predict_proba` (for details see the extension template). You can add private methods as long as they do not override the default public interface. For more details, see the extension template.\n",
- "4. To test your estimator manually: import your estimator and run it in the worfklows in Section 1; then use it in the compositors in Section 3.\n",
+ "4. To test your estimator manually: import your estimator and run it in the workflows in Section 1; then use it in the compositors in Section 3.\n",
"5. To test your estimator automatically: call `skpro.utils.check_estimator` on your estimator. You can call this on a class or object instance. Ensure you have specified test parameters in the `get_test_params` method, according to the extension template.\n",
"\n",
"In case of direct contribution to `skpro` or one of its affiliated packages, additionally:\n",
diff --git a/examples/03_skpro_distributions.ipynb b/examples/03_skpro_distributions.ipynb
index bfffc87a5..027d3d7f4 100644
--- a/examples/03_skpro_distributions.ipynb
+++ b/examples/03_skpro_distributions.ipynb
@@ -1196,7 +1196,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "at construction, all (simple) probabilty distributions broadcast parameters:\n",
+ "at construction, all (simple) probability distributions broadcast parameters:\n",
"\n",
"* if `index` or `columns` are passed, always broadcasts to 2D\n",
"* 1D iterables are interpreted as row vectors, i.e., of shape (1, n)\n",
@@ -1375,7 +1375,7 @@
"\n",
"n = Normal(mu=[[1, 2], [2, 3]], sigma=2)\n",
"# results in a shape (2, 2) distribution\n",
- "# sigma is broadcast ot the shape of mu\n",
+ "# sigma is broadcast to the shape of mu\n",
"# index, columns are RangeIndex, i.e., [0, 1]\n",
"n.shape"
]
@@ -1463,7 +1463,7 @@
"n = Normal(mu=[1, 2, 3], sigma=2)\n",
"# results in a shape (1, 3) distribution\n",
"# mu is interpreted as (1, 3) row vector\n",
- "# sigma is broadcast ot the shape of mu\n",
+ "# sigma is broadcast to the shape of mu\n",
"# index, columns are RangeIndex, i.e., index=[0] and columns=[0, 1, 2]\n",
"n.shape"
]
@@ -1537,7 +1537,7 @@
"source": [
"as first-class citizens, all objects in `skpro` are indexed via the `registry` utility `all_objects`.\n",
"\n",
- "To find probabilisty distirbutions, use `all_objects` with the type `distribution`:"
+ "To find probabilisty distributions, use `all_objects` with the type `distribution`:"
]
},
{
@@ -2447,7 +2447,7 @@
],
"source": [
"# dataframe distributions convert to a DataFrame\n",
- "# with column MultiIndex (variable, parmaeter)\n",
+ "# with column MultiIndex (variable, parameter)\n",
"d = Normal(mu=[[1, 2], [3, 4], [5, 6]], sigma=2, columns=[\"var1\", \"var2\"])\n",
"d.to_df()"
]
@@ -2648,10 +2648,10 @@
"* Follow the [\"implementing estimator\" developer guide](https://skpro.readthedocs.io/en/stable/developer_guide/add_estimators.html)\n",
"* Use the [probabilistic regressor template](https://github.com/sktime/skpro/blob/main/extension_templates/regression.py) to get started\n",
"\n",
- "1. Read through the [probability distibution extension template](https://github.com/sktime/skpro/blob/main/extension_templates/distributions.py) - this is a `python` file with `todo` blocks that mark the places in which changes need to be added.\n",
+ "1. Read through the [probability distribution extension template](https://github.com/sktime/skpro/blob/main/extension_templates/distributions.py) - this is a `python` file with `todo` blocks that mark the places in which changes need to be added.\n",
"2. Copy the distribution extension template to a local folder in your own repository (local/private extension), or to a suitable location in your clone of the `skpro` or affiliated repository (if contributed extension), inside `skpro.distributions`; rename the file and update the file docstring appropriately.\n",
"3. Address the \"todo\" parts. Usually, this means: changing the name of the class, setting the tag values, specifying hyper-parameters, filling in `__init__`, and as many methods as possible, most importantly `_ppf`, and possibly other common methods such as `_pdf` or `_pmf`, `_cdf`. You can add private methods as long as they do not override the default public interface. For more details, see the extension template.\n",
- "4. To test your estimator manually: import your estimator and run it in the worfklows in Section 1; then use it in the compositors in Section 3.\n",
+ "4. To test your estimator manually: import your estimator and run it in the workflows in Section 1; then use it in the compositors in Section 3.\n",
"5. To test your estimator automatically: call `skpro.utils.check_estimator` on your estimator. You can call this on a class or object instance. Ensure you have specified test parameters in the `get_test_params` method, according to the extension template.\n",
"\n",
"In case of direct contribution to `skpro` or one of its affiliated packages, additionally:\n",
@@ -2670,7 +2670,7 @@
"\n",
"* `skpro` provides a unified interface for probability distributions, with an interface inspired by `scikit-learn` and `pandas`\n",
"\n",
- "* `skpro` distributions are parametric first class objects. They are symbolic representations of probability distibution, and come with methods such as `pdf`, `cdf`, `sample`, `plot`, etc\n",
+ "* `skpro` distributions are parametric first class objects. They are symbolic representations of probability distribution, and come with methods such as `pdf`, `cdf`, `sample`, `plot`, etc\n",
"\n",
"* `skpro` distributions can be scalar-valued, or data frame valued. The latter broadcast parameters and arguments of methods to 2D, and are returned by `skpro` probabilistic regressors or survival regressors `predict_proba`\n",
"\n",
diff --git a/extension_templates/regression.py b/extension_templates/regression.py
index 00151ff5b..5d987c4d3 100644
--- a/extension_templates/regression.py
+++ b/extension_templates/regression.py
@@ -70,7 +70,7 @@ class ClassName(BaseProbaRegressor):
# parameter checks can go after super call
def __init__(self, paramname, paramname2="paramname2default"):
# estimators should precede parameters
- # if estimators have default values, set None and initalize below
+ # if estimators have default values, set None and initialize below
# todo: write any hyper-parameters and components to self
self.paramname = paramname
diff --git a/extension_templates/survival.py b/extension_templates/survival.py
index f270761db..5447c60bb 100644
--- a/extension_templates/survival.py
+++ b/extension_templates/survival.py
@@ -49,7 +49,7 @@ class ClassName(BaseSurvReg):
# parameter checks can go after super call
def __init__(self, paramname, paramname2="paramname2default"):
# estimators should precede parameters
- # if estimators have default values, set None and initalize below
+ # if estimators have default values, set None and initialize below
# todo: write any hyper-parameters and components to self
self.paramname = paramname
diff --git a/skpro/datatypes/_convert.py b/skpro/datatypes/_convert.py
index 27d920e04..f823b47c4 100644
--- a/skpro/datatypes/_convert.py
+++ b/skpro/datatypes/_convert.py
@@ -4,7 +4,7 @@
Exports
-------
convert_to(obj, to_type: str, as_scitype: str, store=None)
- converts object "obj" to type "to_type", considerd as "as_scitype"
+ converts object "obj" to type "to_type", considered as "as_scitype"
convert(obj, from_type: str, to_type: str, as_scitype: str, store=None)
same as convert_to, without automatic identification of "from_type"
@@ -159,7 +159,7 @@ def convert(
pass
else:
raise ValueError(
- "bug: unrechable condition error, store_behaviour has unexpected value"
+ "bug: unreachable condition error, store_behaviour has unexpected value"
)
converted_obj = convert_dict[key](obj, store=store)
@@ -167,7 +167,7 @@ def convert(
return converted_obj
-# conversion based on queriable type to specified target
+# conversion based on queryable type to specified target
def convert_to(
obj,
to_type: str,
diff --git a/skpro/datatypes/_convert_utils/_convert.py b/skpro/datatypes/_convert_utils/_convert.py
index 7e6ac8dbe..4bb0066b5 100644
--- a/skpro/datatypes/_convert_utils/_convert.py
+++ b/skpro/datatypes/_convert_utils/_convert.py
@@ -52,12 +52,12 @@ def _extend_conversions(mtype, anchor_mtype, convert_dict, mtype_universe=None):
anchor_mtype : mtype string in convert_dict
convert_dict : conversion dictionary with entries of converter signature
see docstring of datatypes._convert
- mtype_universe : iterable of mtype strings in convert_dict, coercable to list or set
+ mtype_universe : iterable of mtype strings in convert_dict, coercible to list or set
Returns
-------
reference to convert_dict
- CAVEAT: convert_dict passed to this function gets mutated, this is a referene
+ CAVEAT: convert_dict passed to this function gets mutated, this is a reference
"""
keys = convert_dict.keys()
scitype = list(keys)[0][2]
diff --git a/skpro/datatypes/tests/test_convert_to.py b/skpro/datatypes/tests/test_convert_to.py
index 84d6390e3..fb133e026 100644
--- a/skpro/datatypes/tests/test_convert_to.py
+++ b/skpro/datatypes/tests/test_convert_to.py
@@ -1,4 +1,4 @@
-"""Testing machine type converters for scitypes - covert_to utility."""
+"""Testing machine type converters for scitypes - convert_to utility."""
__author__ = ["fkiraly"]
diff --git a/skpro/distributions/base/_base.py b/skpro/distributions/base/_base.py
index 5fa03dd89..933985f32 100644
--- a/skpro/distributions/base/_base.py
+++ b/skpro/distributions/base/_base.py
@@ -67,7 +67,7 @@ def _init_shape_bc(self, index=None, columns=None):
default broadcasting and pre-initialization is not desired or applicable,
e.g., distribution parameters are not array-like.
- If overriden, must set ``self._shape``: this should be an empty tuple
+ If overridden, must set ``self._shape``: this should be an empty tuple
if the distribution is scalar, or a pair of integers otherwise.
"""
if self.get_tags()["broadcast_init"] == "off":
@@ -1572,7 +1572,7 @@ def get_ax(ax, i, j, shape):
fig.supxlabel(f"{x_argname}")
return fig, ax
- # for now, all plots default ot this function
+ # for now, all plots default to this function
# but this could be changed to a dispatch mechanism
# e.g., using this line instead
# plot_fun_name = f"_plot_{fun}"
diff --git a/skpro/distributions/delta.py b/skpro/distributions/delta.py
index f0efb4662..002de8883 100644
--- a/skpro/distributions/delta.py
+++ b/skpro/distributions/delta.py
@@ -10,7 +10,7 @@
class Delta(BaseDistribution):
- r"""Delta distribution aka constant distibution aka certain distribution.
+ r"""Delta distribution aka constant distribution aka certain distribution.
This distribution always produces the same value when sampling - ``c``.
It it useful to represent a constant value as a distribution, e.g., as a baseline
diff --git a/skpro/distributions/empirical.py b/skpro/distributions/empirical.py
index 13a4c18d8..8d8ecb3ff 100644
--- a/skpro/distributions/empirical.py
+++ b/skpro/distributions/empirical.py
@@ -193,7 +193,7 @@ def _apply_per_ix(self, func, params, x=None):
def _slice_ix(self, obj, ix):
"""Slice obj by index ix, applied to MultiIndex levels 1 ... last.
- obj is assumed to have MultiIndex, and slicing occurrs on the
+ obj is assumed to have MultiIndex, and slicing occurs on the
last levels, 1 ... last.
ix can be a simple index or MultiIndex,
diff --git a/skpro/metrics/base.py b/skpro/metrics/base.py
index 17f4b6271..18350fa37 100644
--- a/skpro/metrics/base.py
+++ b/skpro/metrics/base.py
@@ -343,7 +343,7 @@ def _check_alpha(self, alpha):
return alpha
def _handle_multioutput(self, loss, multioutput):
- """Specificies how multivariate outputs should be handled.
+ """Handle output according to multioutput parameter.
Parameters
----------
diff --git a/skpro/regression/cyclic_boosting.py b/skpro/regression/cyclic_boosting.py
index ad4bf836a..39c2ce0ad 100644
--- a/skpro/regression/cyclic_boosting.py
+++ b/skpro/regression/cyclic_boosting.py
@@ -70,7 +70,7 @@ class CyclicBoosting(BaseProbaRegressor):
lower : float, default=None
lower bound of predictive distribution support.
If ``None`` (default), ``upper`` should also be ``None``, and the
- predictive distibution will have unbounded support, i.e., the entire reals.
+ predictive distribution will have unbounded support, i.e., the entire reals.
If a float, and ``upper`` is ``None``, prediction will be of
semi-bounded support, with support between ``lower`` and infinity.
If a float, and ``upper`` is also a float, prediction will be on a bounded
@@ -84,7 +84,7 @@ class CyclicBoosting(BaseProbaRegressor):
maximal_iterations : int, default=10
maximum number of iterations for the cyclic boosting algorithm
dist_type: str, one of ``'normal'`` (default), ``'logistic'``
- inner base distirbution to use for the Johnson QPD, i.e., before
+ inner base distribution to use for the Johnson QPD, i.e., before
arcosh and similar transformations.
Available options are ``'normal'`` (default), ``'logistic'``,
or ``'sinhlogistic'``.
diff --git a/skpro/regression/density.py b/skpro/regression/density.py
index 6383db0bf..c4d5f6837 100644
--- a/skpro/regression/density.py
+++ b/skpro/regression/density.py
@@ -53,7 +53,7 @@ def func(x):
class DensityAdapter(BaseEstimator, metaclass=abc.ABCMeta):
"""
- Abtract base class for density adapter
+ Abstract base class for density adapter
that transform an input into an
density cdf/pdf interface
"""
diff --git a/skpro/regression/tests/test_cyclic_boosting.py b/skpro/regression/tests/test_cyclic_boosting.py
index 3731850c3..ae01071e2 100644
--- a/skpro/regression/tests/test_cyclic_boosting.py
+++ b/skpro/regression/tests/test_cyclic_boosting.py
@@ -33,8 +33,8 @@ def test_cyclic_boosting_simple_use():
not run_test_for_class(CyclicBoosting),
reason="run test only if softdeps are present and incrementally (if requested)",
)
-def test_cyclic_boosting_with_manual_paramaters():
- """Test use of cyclic boosting regressor with_manual_paramaters."""
+def test_cyclic_boosting_with_manual_parameters():
+ """Test use of cyclic boosting regressor with_manual_parameters."""
from cyclic_boosting import flags
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split
diff --git a/skpro/survival/ensemble/_survforest_sksurv.py b/skpro/survival/ensemble/_survforest_sksurv.py
index 2afcc602d..de7a860e7 100644
--- a/skpro/survival/ensemble/_survforest_sksurv.py
+++ b/skpro/survival/ensemble/_survforest_sksurv.py
@@ -81,7 +81,7 @@ class SurvivalForestSkSurv(_SksurvAdapter, BaseSurvReg):
bootstrap : boolean, optional, default: True
Whether bootstrap samples are used when building trees. If False, the
- whole datset is used to build each tree.
+ whole dataset is used to build each tree.
oob_score : bool, default: False
Whether to use out-of-bag samples to estimate
@@ -293,7 +293,7 @@ class SurvivalForestXtraSkSurv(_SksurvAdapter, BaseSurvReg):
bootstrap : boolean, optional, default: True
Whether bootstrap samples are used when building trees. If False, the
- whole datset is used to build each tree.
+ whole dataset is used to build each tree.
oob_score : bool, default: False
Whether to use out-of-bag samples to estimate
diff --git a/skpro/tests/scenarios/scenarios_getter.py b/skpro/tests/scenarios/scenarios_getter.py
index a867fafdb..0ac490ca0 100644
--- a/skpro/tests/scenarios/scenarios_getter.py
+++ b/skpro/tests/scenarios/scenarios_getter.py
@@ -27,7 +27,7 @@ def retrieve_scenarios(obj, filter_tags=None):
If string(s), must be in registry.BASE_CLASS_REGISTER (first col)
for instance 'classifier', 'regressor', 'transformer', 'forecaster'
filter_tags: dict of (str or list of str), default=None
- subsets the returned objectss as follows:
+ subsets the returned objects as follows:
each key/value pair is statement in "and"/conjunction
key is tag name to sub-set on
value str or list of string are tag values
@@ -85,7 +85,7 @@ def _check_tag_cond(obj, filter_tags=None):
----------
obj: object inheriting from sktime BaseObject
filter_tags: dict of (str or list of str), default=None
- subsets the returned objectss as follows:
+ subsets the returned objects as follows:
each key/value pair is statement in "and"/conjunction
key is tag name to sub-set on
value str or list of string are tag values
diff --git a/skpro/utils/_maint/tests/test_show_versions.py b/skpro/utils/_maint/tests/test_show_versions.py
index 2e7944d1c..928017df1 100644
--- a/skpro/utils/_maint/tests/test_show_versions.py
+++ b/skpro/utils/_maint/tests/test_show_versions.py
@@ -9,7 +9,7 @@
def test_show_versions_runs():
- """Test that show_versions runs without exeptions."""
+ """Test that show_versions runs without exceptions."""
# only prints, should return None
assert show_versions() is None
diff --git a/skpro/utils/numpy.py b/skpro/utils/numpy.py
index 2d39189d3..c16ecdaec 100644
--- a/skpro/utils/numpy.py
+++ b/skpro/utils/numpy.py
@@ -15,7 +15,7 @@ def flatten_to_1D_if_colvector(y):
-------
y_flat : numpy array
1D flattened array if y was 2D column vector, or 1D already
- otherwise, returne y unchanged
+ otherwise, return y unchanged
"""
if len(y.shape) == 2 and y.shape[1] == 1:
y_flat = y.flatten()