Skip to content
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

Change the default weight_params in WeightedRips #595

Merged
merged 2 commits into from
Jul 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gtda/homology/simplicial.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ class WeightedRipsPersistence(BaseEstimator, TransformerMixin, PlotterMixin):
is a parameter (see `weight_params`). If a callable, it must return
non-negative 1D arrays.

weight_params : dict, optional, default: ``None``
weight_params : dict, optional, default: ``{}``
Additional parameters for the weighted filtration. ``"p"`` determines
the power to be used in computing edge weights from vertex weights. It
can be one of ``1``, ``2`` or ``np.inf`` and defaults to ``1``. If
Expand Down Expand Up @@ -525,7 +525,7 @@ class WeightedRipsPersistence(BaseEstimator, TransformerMixin, PlotterMixin):
"of": {"type": int, "in": Interval(0, np.inf, closed="left")}
},
"weights": {"type": (str, FunctionType)},
"weight_params": {"type": (dict, type(None))},
"weight_params": {"type": dict},
"collapse_edges": {"type": bool},
"coeff": {"type": int, "in": Interval(2, np.inf, closed="left")},
"max_edge_weight": {"type": Real},
Expand All @@ -534,7 +534,7 @@ class WeightedRipsPersistence(BaseEstimator, TransformerMixin, PlotterMixin):
}

def __init__(self, metric="euclidean", metric_params={},
homology_dimensions=(0, 1), weights="DTM", weight_params=None,
homology_dimensions=(0, 1), weights="DTM", weight_params={},
collapse_edges=False, coeff=2, max_edge_weight=np.inf,
infinity_values=None, reduced_homology=True, n_jobs=None):
self.metric = metric
Expand Down