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

rename to_array -> to_xy_arrays - fix dataset/numpy transitions #45

Merged
merged 4 commits into from
Nov 30, 2017

Conversation

PeterDSteinberg
Copy link
Contributor

@PeterDSteinberg PeterDSteinberg commented Nov 10, 2017

  • Fixes MLDataset.*_features() should be idempotent #38
  • Also makes changes to a function that was MLDataset.to_array. That was not the best name for the function because it returns an X,y tuple. Now the function is xarray_filters.reshape.to_xy_arrays and it can be called as a standalone function or a MLDataset method.

TODO:

@PeterDSteinberg
Copy link
Contributor Author

Hi @gbrener - If this looks good, let's merge then address #46 (tests are passing there, then #46 adds the .travis section on upload we need for a dev release automatically)

dsets = [xr.Dataset(x) for x in Xs]
np_arrs = [x.to_features().features.values for x in Xs]
dfs = [pd.DataFrame(x.to_features().features.values) for x in Xs]
choices = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note here we eventually (2018) want to test eventually any acceptable X or y data structures when to_xy_arrays is used as a standalone function, e.g. pandas, numpy, dask, DataArray/Dataset/MLDataset. The test is a parameterized one set up for that, but currently is only testing MLDataset X and numpy y.

@PeterDSteinberg
Copy link
Contributor Author

Created #47 (deferring the TODO list above)

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