Skip to content

Commit

Permalink
[BUG]: estimator nomenclature typo (#10)
Browse files Browse the repository at this point in the history
* fix: detoning typo

* Update index.rst

* fix: detoning
  • Loading branch information
matteoettam09 authored Jan 17, 2024
1 parent 651a729 commit 60cd559
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Available models
* Empirical
* Gerber
* Denoising
* Denoting
* Detoning
* Exponentially Weighted
* Ledoit-Wolf
* Oracle Approximating Shrinkage
Expand Down Expand Up @@ -241,7 +241,7 @@ Imports
)
from skfolio.moments import (
DenoiseCovariance,
DenoteCovariance,
DetoneCovariance,
EWMu,
GerberCovariance,
ShrunkMu,
Expand Down Expand Up @@ -460,7 +460,7 @@ Factor Model & Covariance Detoning
model = MeanRisk(
prior_estimator=FactorModel(
factor_prior_estimator=EmpiricalPrior(covariance_estimator=DenoteCovariance())
factor_prior_estimator=EmpiricalPrior(covariance_estimator=DetoneCovariance())
)
)
Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ Classes
moments.EWCovariance
moments.GerberCovariance
moments.DenoiseCovariance
moments.DenoteCovariance
moments.DetoneCovariance
moments.LedoitWolf
moments.OAS
moments.ShrunkCovariance
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Available models
* Empirical
* Gerber
* Denoising
* Denoting
* Detoning
* Exponentially Weighted
* Ledoit-Wolf
* Oracle Approximating Shrinkage
Expand Down Expand Up @@ -198,7 +198,7 @@ Imports
)
from skfolio.moments import (
DenoiseCovariance,
DenoteCovariance,
DetoneCovariance,
EWMu,
GerberCovariance,
ShrunkMu,
Expand Down Expand Up @@ -409,7 +409,7 @@ Factor Model & Covariance Detoning
model = MeanRisk(
prior_estimator=FactorModel(
factor_prior_estimator=EmpiricalPrior(covariance_estimator=DenoteCovariance())
factor_prior_estimator=EmpiricalPrior(covariance_estimator=DetoneCovariance())
)
)
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/covariance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Available estimators are:
* :class:`EWCovariance`
* :class:`GerberCovariance`
* :class:`DenoiseCovariance`
* :class:`DenoteCovariance`
* :class:`DetoneCovariance`
* :class:`LedoitWolf`
* :class:`OAS`
* :class:`ShrunkCovariance`
Expand Down
4 changes: 2 additions & 2 deletions src/skfolio/moments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
OAS,
BaseCovariance,
DenoiseCovariance,
DenoteCovariance,
DetoneCovariance,
EWCovariance,
EmpiricalCovariance,
GerberCovariance,
Expand Down Expand Up @@ -33,7 +33,7 @@
"EWCovariance",
"GerberCovariance",
"DenoiseCovariance",
"DenoteCovariance",
"DetoneCovariance",
"LedoitWolf",
"OAS",
"ShrunkCovariance",
Expand Down
4 changes: 2 additions & 2 deletions src/skfolio/moments/covariance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from skfolio.moments.covariance._covariance import (
OAS,
DenoiseCovariance,
DenoteCovariance,
DetoneCovariance,
EWCovariance,
EmpiricalCovariance,
GerberCovariance,
Expand All @@ -21,7 +21,7 @@
"EWCovariance",
"GerberCovariance",
"DenoiseCovariance",
"DenoteCovariance",
"DetoneCovariance",
"LedoitWolf",
"OAS",
"ShrunkCovariance",
Expand Down
12 changes: 6 additions & 6 deletions src/skfolio/moments/covariance/_covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ def _marchenko(x_var):
return self


class DenoteCovariance(BaseCovariance):
"""Covariance Denoting estimator.
class DetoneCovariance(BaseCovariance):
"""Covariance Detoning estimator.
Financial covariance matrices usually incorporate a market component corresponding
to the first eigenvectors [1]_.
Expand All @@ -399,7 +399,7 @@ class DenoteCovariance(BaseCovariance):
----------
covariance_estimator : BaseCovariance, optional
:ref:`Covariance estimator <covariance_estimator>` to estimate the covariance
matrix prior denoting.
matrix prior detoning.
The default (`None`) is to use :class:`~skfolio.moments.EmpiricalCovariance`.
n_markets : int, default=1
Expand Down Expand Up @@ -466,8 +466,8 @@ def __init__(
self.covariance_estimator = covariance_estimator
self.n_markets = n_markets

def fit(self, X: npt.ArrayLike, y=None) -> "DenoteCovariance":
"""Fit the Covariance Denoting estimator.
def fit(self, X: npt.ArrayLike, y=None) -> "DetoneCovariance":
"""Fit the Covariance Detoning estimator.
Parameters
----------
Expand All @@ -479,7 +479,7 @@ def fit(self, X: npt.ArrayLike, y=None) -> "DenoteCovariance":
Returns
-------
self : DenoteCovariance
self : DetoneCovariance
Fitted estimator.
"""
# fitting estimators
Expand Down
4 changes: 2 additions & 2 deletions tests/test_moment/test_covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from skfolio.datasets import load_sp500_dataset
from skfolio.moments import (
DenoiseCovariance,
DenoteCovariance,
DetoneCovariance,
EWCovariance,
EmpiricalCovariance,
GerberCovariance,
Expand Down Expand Up @@ -932,7 +932,7 @@ def test_denoise_covariance(X):


def test_denoite_covariance(X):
model = DenoteCovariance(covariance_estimator=DenoiseCovariance())
model = DetoneCovariance(covariance_estimator=DenoiseCovariance())
model.fit(X)
assert model.covariance_.shape == (20, 20)
np.testing.assert_almost_equal(
Expand Down

0 comments on commit 60cd559

Please sign in to comment.