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

[ENH] generalize AggrDist and FlatDist to allow arbitrary callables, including sklearn kernel functions #3956

Merged
merged 3 commits into from Dec 25, 2022

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Dec 19, 2022

This PR generalizes AggrDist and FlatDist to allow for arbitrary callables of suitable signature as distances/kernels inside.

This allows easy definition of common time series distances such as mean Gaussian kernel, mean pairwise Euclidean distance, or index flattened Euclidean distance.

This also adds:

  • a test parameter case, using an sklearn kernel
  • examples in the docstring to construct the distance/kernel either using an sktime distance or an sklearn kernel

@fkiraly fkiraly added module:distances&kernels dists_kernels and distances modules: time series distances, kernels, pairwise transforms enhancement Adding new functionality labels Dec 19, 2022
@fkiraly fkiraly changed the title [ENH] generalize FlatDist to allow arbitrary callables [ENH] generalize FlatDist to allow arbitrary callables, including sklearn kernel functions Dec 19, 2022
@fkiraly fkiraly changed the title [ENH] generalize FlatDist to allow arbitrary callables, including sklearn kernel functions [ENH] generalize AggrDist and FlatDist to allow arbitrary callables, including sklearn kernel functions Dec 19, 2022
@fkiraly fkiraly merged commit 95665ed into main Dec 25, 2022
@fkiraly fkiraly deleted the generalize-FlatDist branch December 25, 2022 23:35
fkiraly added a commit that referenced this pull request Dec 25, 2022
This PR adds a kernel support vector classifier for time series kernels.

The added estimator is an interface connector which ties together the `sklearn` support vector classifier and the `sktime` interface for time series distances and kernels.

Includes:
* #3956 which provides an example of an `sklearn` based kernel function.
* #3971 which fixes bugs with `FlatDist` used internally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality module:distances&kernels dists_kernels and distances modules: time series distances, kernels, pairwise transforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant