Skip to content

Commit

Permalink
Merge branch 'release/0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Jan 25, 2022
2 parents cb4e443 + d18f353 commit d152d76
Show file tree
Hide file tree
Showing 35 changed files with 1,073 additions and 293 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
- name: Run tests
run: |
pip3 install .
pip3 debug --verbose .
pip3 install numba==0.53
pip3 install --upgrade-strategy eager -v .
coverage run --source=skfda/ setup.py test;
- name: Upload coverage to Codecov
Expand Down
40 changes: 20 additions & 20 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{
'creators': [
"creators": [
{
'affiliation': 'Universidad Autónoma de Madrid',
'name': 'Ramos-Carreño, Carlos',
'orcid': '0000-0003-2566-7058'
"affiliation": "Universidad Autónoma de Madrid",
"name": "Ramos-Carreño, Carlos",
"orcid": "0000-0003-2566-7058"
},
{
'affiliation': 'Universidad Autónoma de Madrid',
'name': 'Suárez, Alberto',
'orcid': '0000-0003-4534-0909'
"affiliation": "Universidad Autónoma de Madrid",
"name": "Suárez, Alberto",
"orcid": "0000-0003-4534-0909"
},
{
'affiliation': 'Universidad Autónoma de Madrid',
'name': 'Torrecilla, José Luis',
'orcid': '0000-0003-3719-5190'
"affiliation": "Universidad Autónoma de Madrid",
"name": "Torrecilla, José Luis",
"orcid": "0000-0003-3719-5190"
},
{
'name': 'Carbajo Berrocal, Miguel'
"name": "Carbajo Berrocal, Miguel"
},
{
'name': 'Marcos Manchón, Pablo'
"name": "Marcos Manchón, Pablo"
},
{
'name': 'Pérez Manso, Pablo'
"name": "Pérez Manso, Pablo"
},
{
'name': 'Hernando Bernabé, Amanda'
"name": "Hernando Bernabé, Amanda"
},
{
'name': 'García Fernández, David'
"name": "García Fernández, David"
},
{
'name': 'Hong, Yujian'
"name": "Hong, Yujian"
},
{
'name': 'Rodríguez-Ponga Eyriès, Pedro Martín'
"name": "Rodríguez-Ponga Eyriès, Pedro Martín"
},
{
'name': 'Sánchez Romero, Álvaro'
"name": "Sánchez Romero, Álvaro"
},
{
'name': 'Petrunina, Elena'
"name": "Petrunina, Elena"
}
],
'license': 'BSD 3-Clause License',
"license": "BSD 3-Clause License"
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.1
0.7
9 changes: 9 additions & 0 deletions docs/modules/exploratory/stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ statistics can be used.
skfda.exploratory.stats.cov
skfda.exploratory.stats.var

Additional statistics
---------------------

The following statistics can be used to estimate additional properties of the data.

.. autosummary::
:toctree: autosummary

skfda.exploratory.stats.modified_epigraph_index

135 changes: 126 additions & 9 deletions docs/modules/exploratory/visualization.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,131 @@
Visualization
=============

The visualization package provides tools to show different views of
the functional data, that highlight several important aspects of it.
Visualization methods are one of the most important tools for exploratory analysis.
They can provide intuition over particular data that is very difficult to obtain otherwise.
As functional data is infinite dimensional, good visualization tools capable to summarize
and illustrate the main features of the data are of particular importance.
The visualization module provides a thorough collection of these tools.
Each of them highlights different characteristics of the data and thus they complement each other.

.. toctree::
:maxdepth: 4
:caption: Modules:
Basic representation
--------------------

Functional data with :term:`domain` dimension of 1 or 2 can be represented directly as function
graphs, which will be curves or surfaces respectively. Each :term:`codomain` dimension will be plotted
separately.
Additionally, for discretized data, the discretization points can be plotted as a scatter plot.
The following classes implement these plotting methods.

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.representation.GraphPlot
skfda.exploratory.visualization.representation.ScatterPlot

visualization/boxplot
visualization/magnitude_shape_plot
visualization/clustering
visualization/fpca
Note that the :func:`~skfda.representation.FData.plot` and
:func:`~skfda.representation.grid.FDataGrid.plot` methods simply instantiate and plot an object
of one of these classes.

Parametric plot
---------------

Parametric plots are used to plot one function versus another when they have the same :term:`domain`.
This is used for example in phase plane plots, showing the relation between two derivatives
of different order.
It is also useful to plot observations corresponding to curves in 2D, as it shows both dimensions
of the :term:`codomain` in the same plot.

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.ParametricPlot

Functional Data Boxplot
-----------------------

The functional data boxplot is an extension of the univariate boxplot to the functional data domain.
As such, it is a very useful tool to detect outliers and check the magnitude of the variation of the data.
There are two variants of this plot, depending on the number of dimensions (1 or 2) of the :term:`domain`.

If the dimension of the :term:`domain` is 1, the following class must be used.
See the :ref:`sphx_glr_auto_examples_plot_boxplot.py` example for detailed explanation.

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.Boxplot

If the dimension of the :term:`domain` is 2, this one. See the
:ref:`sphx_glr_auto_examples_plot_surface_boxplot.py`
example for detailed explanation.

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.SurfaceBoxplot

Outliergram
-----------

The outliergram represents each functional observation as a point whose coordinates are its
:class:`modified band depth<skfda.exploratory.depth.ModifiedBandDepth>` and its
:func:`modified epigraph index<skfda.exploratory.stats.modified_epigraph_index>`.
These quantities are related, and in absence of crossings between observations the points
should lie on a parabola.
Thus, substantial deviations from that behavior characterize observations that are shape
outliers.

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.Outliergram

Magnitude-Shape Plot
--------------------

The Magnitude-Shape plot tries to summarize the shape and magnitude of an observation as real
numbers, and plot them in a scatter plot.
In addition it computes an ellipse, which serves as a decision boundary for detecting outliers.

This is a very useful tool to detect shape and magnitude outliers and differentiate between them.

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.MagnitudeShapePlot

Clustering Plots
----------------
In order to show the results of the cluster algorithms in a visual way,
:mod:`this module <skfda.exploratory.visualization.clustering_plots>` is
implemented. It contains the following classes:

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.clustering.ClusterPlot
skfda.exploratory.visualization.clustering.ClusterMembershipLinesPlot
skfda.exploratory.visualization.clustering.ClusterMembershipPlot

In the first one, the samples of the FDataGrid are divided by clusters which
are assigned different colors. The following functions, are only valid for the
class :class:`FuzzyKMeans <skfda.ml.clustering.base_kmeans.FuzzyKMeans>` to see
the results graphically in the form of a parallel coordinates plot or a barplot
respectively.

See `Clustering Example <../auto_examples/plot_clustering.html>`_ for detailed
explanation.

Functional Principal Component Analysis plots
---------------------------------------------
In order to show the modes of variation that the principal components represent,
the following class is implemented:

.. autosummary::
:toctree: autosummary

skfda.exploratory.visualization.fpca.FPCAPlot

See the example :ref:`sphx_glr_auto_examples_plot_fpca.py` for detailed
explanation.
28 changes: 0 additions & 28 deletions docs/modules/exploratory/visualization/boxplot.rst

This file was deleted.

23 changes: 0 additions & 23 deletions docs/modules/exploratory/visualization/clustering.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/modules/exploratory/visualization/fpca.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/modules/exploratory/visualization/magnitude_shape_plot.rst

This file was deleted.

10 changes: 3 additions & 7 deletions docs/modules/misc/regularization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ When dealing with multivariate data, a common choice for the regularization
is to penalize the squared Euclidean norm, or :math:`L_2` norm, of the vectors
in order to obtain simpler solutions. This can be done in scikit-fda for
both multivariate and functional data using the :class:`L2Regularization`
class.

A more flexible generalization of this approach is the so called Tikhonov
regularization, available as :class:`TikhonovRegularization`, in which the
squared :math:`L_2` norm is penalized after a particular linear operator is
class. A more flexible generalization of this approach is to penalize the
squared :math:`L_2` norm after a particular linear operator is
applied. This for example allows to penalize the second derivative of a curve,
which is a measure of its curvature, because the differential operator
is linear. As arbitrary Python callables can be used as operators (provided
Expand All @@ -32,5 +29,4 @@ linear operations.
.. autosummary::
:toctree: autosummary

skfda.misc.regularization.L2Regularization
skfda.misc.regularization.TikhonovRegularization
skfda.misc.regularization.L2Regularization
9 changes: 9 additions & 0 deletions docs/modules/ml/classification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,12 @@ This module contains depth based estimators to perform classification.
skfda.ml.classification.DDClassifier
skfda.ml.classification.DDGClassifier
skfda.ml.classification.MaximumDepthClassifier

Logistic regression
-----------------------
Classifier based on logistic regression.

.. autosummary::
:toctree: autosummary

skfda.ml.classification.LogisticRegression
Loading

0 comments on commit d152d76

Please sign in to comment.