Skip to content

added handling of 3d numpy arrays and lists of uneven numpy arrays #62

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mitchellostrow
Copy link

The datasets I work with are typically of two possible shapes:

  1. 3-d numpy arrays of shape (n_trials, n_samples, n_features) where n_trials denotes different initial conditions.
  2. A list of 2- or 3-d numpy arrays of the above shape, but with different sample lengths.

We would like our DMD fitting procedure to be able to flexibly handle these arrays. The main functionality I've therefore added is the following:

  1. detect the shape of the dataset, and generate x and y arrays [n_total_samples, n_features] accordingly. This can then be passed into the standard fitting procedure.
  2. reshape the dataset back into their original shapes during prediction, so we can easily index into both.

I've added testing for each class as well to handle this separate cases. All tests pass and code has been properly formatted.

…ials,n_samples, n_features) a well as lists of trajectories, potentially of different sample sizes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant