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

TrAdaBoost not working with estimators using multiple inputs of different shapes #125

Open
kagrawala-RU opened this issue Mar 16, 2024 · 1 comment

Comments

@kagrawala-RU
Copy link

I am attempting to use TrAdaBoost with a multi-input TensorFlow model as a base estimator. My input data (Xt, Xs) are lists of the form: [(n_samples, n_timeseries_per_sample, timeseries_len), (n_samples, n_static_params)]. The mismatched shapes generate errors in the check_arrays method when TrAdaBoost tries to turn Xt and Xs into numpy arrays, but I am able to train the base estimator model directly on this data successfully. To my knowledge, TrAdaBoost should work with this type of data. Is there a way around the error, or is this an unsupported use case?

@antoinedemathelin
Copy link
Collaborator

Yes sorry @kagrawala-RU , TrAdaBoost requires something that can be turned into a numpy array as Xs, Xt, ys, yt inputs. Modifying that would be a nightmare, as multiple operations require Xs, Xt, ys, yt to be numpy arrays (concatenation, len...).

Have you tried to make your data Xt, Xs looks like arrays? Perhaps you can have something like (n_samples, n_timeseries_per_sample, timeseries_len, n_static_params) in a 4D array, then you write something in the fit method of your tensorflow model to transform the data in the desired format? I think Adapt accepts Xs and Xt to be of higher dimension than 2D array.

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

No branches or pull requests

2 participants