Closed pcuestas closed 1 year ago
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
4fe909c
) 86.03% compared to head (3115a6d
) 86.10%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Added
std
as a function using single dispatch in theskfda.exploratory.stats
module.The function takes two arguments: a
FData
object and addof
(Delta Degrees Of Freedom) integer. By default,ddof=1
. Rationale behind this decision has been that these functions (stats.cov, stats.var, stats.std) are meant to be used for statistical (exploratory) purposes, and not for Maximum Likelihood algorithms. The default is different fromnumpy.std
(which usesddof=1
).pandas.DataFrame.std
andscipy.stats.variation
useddof=1
.The approach taken to calculate the std of a
FDataBasis
object is the more direct one that we discussed which does not use the covariance object. Instead, a matrix multiplication is performed to calculate the pointwise variance on an arbitrary point of the domain:https://github.com/GAA-UAM/scikit-fda/blob/6eada7287e7e1a6098553714cc9a6a06d7b34eef/skfda/exploratory/stats/_stats.py#L153-L156
Tests included to cover the general $\mathbb{R}^p \to \mathbb{R}^q$ case for both
FDataGrid
andFDataBasis
objects.Closes https://github.com/GAA-UAM/scikit-fda/issues/541.