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

Mejorar la estructura de la función de la interfaz para sktime desarrollada #15

Open
jerryperezperez opened this issue Oct 10, 2024 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@jerryperezperez
Copy link
Collaborator

def compute_distance_interface(windows: np.ndarray, windows_len, components_len, target: None, metric, **kwargs):
    correlation_per_window = np.array([])
    try:
        correlation_per_window = np.array(([distance(target[:, current_component],
                                   windows[current_window, :, current_component], metric,
                                   **kwargs)
                          for current_window in range(windows_len)
                          for current_component in range(components_len)])).reshape(-1, components_len)
    except ValueError as e:
        print(f"String or callable object is not valid for sktime library: {e}")
        try:
            correlation_per_window = metric(windows, target, windows_len, components_len, **kwargs)
        except ValueError as e:
            print("The custom callable couldn't be executed")
        return correlation_per_window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants