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

Add support for inferring number of components on non-standard columns #524

Open
dkrako opened this issue Sep 12, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@dkrako
Copy link
Contributor

dkrako commented Sep 12, 2023

Description of the problem

The number of components of a GazeDataFrame is currently only inferred using the columns pixel, position, velocity, acceleration.

If a user would want to use a non-standard column only, like pixel_velocity, the inference wouldn't work.
But if the user would have specified just one of the mentioned columns, everything would work out.

Description of a solution

We could try to solve this in the current frame of using polars.list, but to me it seems most reasonable to implement #453
The n_components argument is really just needed for internal usage as a workaround as during the time of RD struct didn't seem that well developed.

After implementing #453 we would need n_components anymore for internal usage. We could then decide how to deal with it.

As a workaround, users can still write something like

gaze.n_components = 2

Also, n_components is mostly used for transformation functions.

Additionally for non-standard columns a user could still explicitly pass n_components:

gaze.pix2deg(pixel_column='my_input', position_column='my_output', n_components=4)

So the workflow is not completely broken and a comfortable workaround exists.

Context

Originally requested by @prassepaul in #521 (comment)

@dkrako dkrako added the enhancement New feature or request label Sep 12, 2023
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

1 participant