-
Couldn't load subscription status.
- Fork 63
Weighted lp metric #690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Weighted lp metric #690
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #690 +/- ##
===========================================
+ Coverage 87.04% 87.11% +0.07%
===========================================
Files 199 202 +3
Lines 14639 14759 +120
===========================================
+ Hits 12742 12858 +116
- Misses 1897 1901 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Describe the proposed changes
In some applications, it is useful to emphasize certain time points more than others when measuring the distance between functional observations. This can be achieved by introducing a weight function$w(t)$ inside the integral. The weight function assigns varying importance to different regions of the domain $\mathcal{T}$ , resulting in a weighted $L^p$ norm.
These classes generalize the standard Lp norm and distance by supporting such weighting. This is useful in domains where relevance is time- or region-specific—such as emphasizing peak hours in energy data or symptom windows in medical signals.
Classes
skfda.misc.metrics.WeightedLpNormskfda.misc.metrics.WeightedLpDistanceFunctional Wrappers
The following functional wrappers are provided for convenience, allowing direct evaluation of the norm or distance without explicitly creating a class instance:
skfda.misc.metrics.weighted_lp_normskfda.misc.metrics.weighted_lp_distanceThese norms and distances are compatible with the same functionality that uses standard Lp norms, including classification pipelines, clustering algorithms, and pairwise distance computations.
Checklist before requesting a review