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

Crear utilería para atender fragmentos de código duplicado #16

Open
jerryperezperez opened this issue Oct 11, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@jerryperezperez
Copy link
Collaborator

Fragmentos de código se encuentran en cbr_fox.py y sktime_interface.py. Al parecer los 3 fragmentos siguen la misma estructura y parámetros:

np.array(
        (
            [np.corrcoef(input_data_dictionary["windows"][currentWindow, :, currentComponent],
                         input_data_dictionary["target"][:, currentComponent])[
                 0][1]
             for currentWindow in range(input_data_dictionary["windows_len"]) for currentComponent in
             range(input_data_dictionary["components_len"])])).reshape(
        -1,
        input_data_dictionary["components_len"])
np.array(
        ([np.linalg.norm(
            input_data_dictionary["target"][:, currentComponent] - input_data_dictionary["window"][currentWindow, :, currentComponent])
            for currentWindow in range(input_data_dictionary["windows_len"]) for currentComponent in
            range(input_data_dictionary["components_len"])])).reshape(
        -1,
        input_data_dictionary["components_len"])
np.array(([distance(input_data_dictionary["target"][:, current_component],
                                                     input_data_dictionary["windows"][current_window, :, current_component], metric,
                                   **kwargs)
                          for current_window in range(input_data_dictionary["windows_len"])
                          for current_component in range(input_data_dictionary["components_len"])])).reshape(-1, input_data_dictionary["components_len"])
@jerryperezperez jerryperezperez added the enhancement New feature or request label Oct 11, 2024
Cowardenemy added a commit that referenced this issue Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants