Skip to content

Commit

Permalink
Merge branch 'develop' into feature/541-add-standard-deviation-as-a-f…
Browse files Browse the repository at this point in the history
…unction
  • Loading branch information
vnmabus authored Oct 13, 2023
2 parents bb5923d + 4fe909c commit 3115a6d
Show file tree
Hide file tree
Showing 23 changed files with 49 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9']
python-version: ['3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r ../readthedocs-requirements.txt
scikit-fda[docs]
jupytext
sphinx-gallery<=0.7.0
.
2 changes: 1 addition & 1 deletion docs/_static/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "https://fda.readthedocs.io/en/latest/"
},
{
"name": "0.8.1 (stable)",
"name": "0.9 (stable)",
"version": "stable",
"url": "https://fda.readthedocs.io/en/stable/",
"preferred": true
Expand Down
19 changes: 17 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "scikit-fda"
description = "Functional Data Analysis Python package."
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {file = "LICENSE.txt"}
keywords = [
"functional data",
Expand All @@ -20,7 +20,7 @@ classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
Expand All @@ -45,6 +45,21 @@ dependencies = [
]

[project.optional-dependencies]
docs = [
"basemap",
"basemap-data",
"basemap-data-hires",
"ipykernel",
"jupyter-sphinx",
"myst-parser",
"pillow",
"pydata-sphinx-theme",
"pytest",
"setuptools>=41.2",
"sphinx>=3",
"sphinx-gallery",
"sphinxcontrib-bibtex",
]
test = [
"pytest",
"pytest-env",
Expand Down
14 changes: 0 additions & 14 deletions readthedocs-requirements.txt

This file was deleted.

11 changes: 8 additions & 3 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
Expand All @@ -18,8 +23,8 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.8"
install:
- requirements: readthedocs-requirements.txt
- method: pip
path: .
path: .
extra_requirements:
- docs
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion skfda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
concatenate as concatenate,
)

__version__ = "0.9.dev1"
__version__ = "0.9.1.dev1"
5 changes: 2 additions & 3 deletions skfda/datasets/_real_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

import numpy as np
import pandas as pd
import rdata
from pandas import DataFrame, Series
from sklearn.utils import Bunch
from typing_extensions import Literal

import rdata

from ..representation import FDataGrid
from ..typing._numpy import NDArrayFloat, NDArrayInt

Expand Down Expand Up @@ -180,7 +179,7 @@ def fetch_ucr(
The UCR/UEA Time Series Classification repository, hosted at
www.timeseriesclassification.com includes plenty of
classification problems with univariate and multivariate time series
\ :footcite:p:`dau++_2019_ucr,bagnall++_2018_uea`.
:footcite:p:`dau++_2019_ucr,bagnall++_2018_uea`.
They are widely used in the functional data classification literature.
Args:
Expand Down
5 changes: 2 additions & 3 deletions skfda/exploratory/visualization/_boxplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from typing import Sequence, Tuple

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.axes import Axes
from matplotlib.colors import Colormap
Expand Down Expand Up @@ -376,7 +375,7 @@ def __init__(

self._fdatagrid = fdatagrid
self._prob = prob
self._colormap = plt.cm.get_cmap('RdPu')
self._colormap = matplotlib.colormaps['RdPu']
self.barcol = "blue"
self.outliercol = "red"
self.mediancol = "black"
Expand Down Expand Up @@ -701,7 +700,7 @@ def __init__(
self._non_outlying_envelope = _envelopes.compute_envelope(inliers)

self._fdatagrid = fdatagrid
self.colormap = plt.cm.get_cmap('Greys')
self.colormap = matplotlib.colormaps['Greys']
self._boxcol = 1.0
self._outcol = 0.7

Expand Down
3 changes: 1 addition & 2 deletions skfda/exploratory/visualization/_magnitude_shape_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from typing import Any, Sequence

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.artist import Artist
from matplotlib.axes import Axes
Expand Down Expand Up @@ -193,7 +192,7 @@ def __init__(

self._fdata = fdata
self._outliers = outliers
self._colormap = plt.cm.get_cmap('seismic')
self._colormap = matplotlib.colormaps['seismic']
self._color = 0.2
self._outliercol = 0.8
self.xlabel = 'MO'
Expand Down
6 changes: 3 additions & 3 deletions skfda/ml/classification/_depth_classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class DDClassifier(
Depth-versus-depth (DD) classifer for functional data.
Transforms the data into a DD-plot and then classifies using a polynomial
of a chosen degree\ :footcite:p:`li++_2012_ddclassifier`.
of a chosen degree :footcite:p:`li++_2012_ddclassifier`.
The polynomial passes through zero and maximizes the accuracy of the
classification on the train dataset.
Expand Down Expand Up @@ -117,7 +117,7 @@ class DDClassifier(
See also:
:class:`~skfda.ml.classification.DDGClassifier`
:class:`~skfda.ml.classification.MaximumDepthClassifier`
:class:`~skfda.preprocessing.dim_reduction.feature_extraction._ddg_transformer`
:class:`~skfda.preprocessing.dim_reduction.feature_construction._ddg_transformer`
References:
.. footbibliography::
Expand Down Expand Up @@ -307,7 +307,7 @@ class DDGClassifier(
See also:
:class:`~skfda.ml.classification.DDClassifier`
:class:`~skfda.ml.classification.MaximumDepthClassifier`
:class:`~skfda.preprocessing.dim_reduction.feature_extraction._ddg_transformer`
:class:`~skfda.preprocessing.dim_reduction.feature_construction._ddg_transformer`
References:
.. footbibliography::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
'Please use "dim_reduction" for FPCA'
'or "feature_construction" for feature construction techniques',
category=DeprecationWarning,
stacklevel=2,
)
1 change: 1 addition & 0 deletions skfda/preprocessing/dim_reduction/projection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
warnings.warn(
'The module "projection" is deprecated. Please use "dim_reduction"',
category=DeprecationWarning,
stacklevel=2,
)
2 changes: 1 addition & 1 deletion skfda/preprocessing/missing/_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class MissingValuesInterpolation(
For multivariate functions, such as surfaces all dimensions are
considered. This is currently done using
:external:class:`~scipy.interpolation.LinearNDInterpolator`, which
:external:class:`~scipy.interpolate.LinearNDInterpolator`, which
triangulates the space and performs linear barycentric interpolation:
>>> X = FDataGrid(
Expand Down
1 change: 1 addition & 0 deletions skfda/preprocessing/smoothing/kernel_smoothers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"The \"kernel_smoothers\" module is deprecated. "
"Use the \"KernelSmoother\" class instead",
DeprecationWarning,
stacklevel=2,
)


Expand Down
3 changes: 2 additions & 1 deletion skfda/representation/basis/_bspline_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def __init__( # noqa: WPS238
knots=knots,
)
warnings.warn(
"The BSplines class is deprecated. Use BSplineBasis instead.",
"The BSpline class is deprecated. Use BSplineBasis instead.",
DeprecationWarning,
stacklevel=2,
)
1 change: 1 addition & 0 deletions skfda/representation/basis/_constant_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@ def __init__(self, domain_range: Optional[DomainRangeLike] = None) -> None:
warnings.warn(
"The Constant class is deprecated. Use ConstantBasis instead.",
DeprecationWarning,
stacklevel=2,
)
super().__init__(domain_range=domain_range)
1 change: 1 addition & 0 deletions skfda/representation/basis/_finite_element_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,5 @@ def __init__(
"The FiniteElement class is deprecated. Use "
"FiniteElementBasis instead.",
DeprecationWarning,
stacklevel=2,
)
1 change: 1 addition & 0 deletions skfda/representation/basis/_fourier_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def __init__(
warnings.warn(
"The Fourier class is deprecated. Use FourierBasis instead.",
DeprecationWarning,
stacklevel=2,
)
super().__init__(
domain_range=domain_range,
Expand Down
1 change: 1 addition & 0 deletions skfda/representation/basis/_monomial_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,5 @@ def __init__(
warnings.warn(
"The Monomial class is deprecated. Use MonomialBasis instead.",
DeprecationWarning,
stacklevel=2,
)
1 change: 1 addition & 0 deletions skfda/representation/basis/_tensor_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,5 @@ def __init__(self, basis_list: Iterable[Basis]):
warnings.warn(
"The Tensor class is deprecated. Use TensorBasis instead.",
DeprecationWarning,
stacklevel=2,
)
1 change: 1 addition & 0 deletions skfda/representation/basis/_vector_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,5 @@ def __init__(self, basis_list: Iterable[Basis]) -> None:
"The VectorValued class is deprecated. "
"Use VectorValuedBasis instead.",
DeprecationWarning,
stacklevel=2,
)

0 comments on commit 3115a6d

Please sign in to comment.