Skip to content

Commit

Permalink
Add coverage and variability params to ShapeletImportance
Browse files Browse the repository at this point in the history
  • Loading branch information
isaksamsten committed Nov 12, 2024
1 parent 274a2e8 commit e3f2b11
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/wildboar/explain/_importance.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,18 @@ class ShapeletImportance(ExplainerMixin, PermuteImportance):
The minimum size of shapelets used for explanation.
max_shapelet_size : float, optional
The maximum size of shapelets used for explanation.
coverage_probability : float, optional
The probability that a time step is covered by a
shapelet, in the range 0 < coverage_probability <= 1.
- For larger `coverage_probability`, we get larger shapelets.
- For smaller `coverage_probability`, we get shorter shapelets.
variability : float, optional
Controls the shape of the Beta distribution used to
sample shapelets. Defaults to 1.
- Higher `variability` creates more uniform intervals.
- Lower `variability` creates more variable intervals sizes.
metric : str, optional
The metric.
metric_params : str, optional
Expand Down Expand Up @@ -943,6 +955,8 @@ def __init__(
n_shapelets=10,
min_shapelet_size=0.0,
max_shapelet_size=1.0,
coverage_probability=None,
variability=1,
metric="euclidean",
metric_params=None,
random_state=None,
Expand All @@ -955,6 +969,8 @@ def __init__(
self.n_shapelets = n_shapelets
self.min_shapelet_size = min_shapelet_size
self.max_shapelet_size = max_shapelet_size
self.coverage_probability = coverage_probability
self.variability = variability
self.metric = metric
self.metric_params = metric_params

Expand Down

0 comments on commit e3f2b11

Please sign in to comment.