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

Easier Method to Add, Update or Delete Features #20

Open
atheyers opened this issue Jan 24, 2019 · 1 comment
Open

Easier Method to Add, Update or Delete Features #20

atheyers opened this issue Jan 24, 2019 · 1 comment

Comments

@atheyers
Copy link

It would be nice to be able to loop through the list of subject IDs and make updates to the array of features stored under there, instead of having to create a new datastructure for small changes.

@raamana
Copy link
Owner

raamana commented Jan 31, 2019

thanks! Looping wouldn't work, as we need to ensure all the samples have same dimensionality, but updating all samples at once can work.

For example, for an MLDataset of tow samples id1 and id2, it can be something like this:

ds.add_feature(name='first', dict(id1=1, id2=0))
ds.add_feature(name='second', dict(id1=2, id2=3))
ds.del_feature(name='first')
ds.update_feature(name='second', dict(id1=5, id2=9))

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