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

[FEATURE][ML] Only write numeric fields to data frame #35961

Conversation

dimitris-athanasiou
Copy link
Contributor

No description provided.

@dimitris-athanasiou dimitris-athanasiou added the :ml Machine learning label Nov 27, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@dimitris-athanasiou dimitris-athanasiou force-pushed the only-write-numeric-fields-to-data-frame branch from df36f47 to 9b3e32f Compare November 27, 2018 18:30
benwtrent and others added 2 commits November 28, 2018 12:24
Co-Authored-By: dimitris-athanasiou <dimitris@elastic.co>
Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

Looks good, although I left one suggestion for tightening up immutability of a constant.

COMPATIBLE_FIELD_TYPES = Stream.of(NumberFieldMapper.NumberType.values())
.map(NumberFieldMapper.NumberType::typeName)
.collect(Collectors.toSet());
COMPATIBLE_FIELD_TYPES.add("scaled_float"); // have to add manually since scaled_float is in a module
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if COMPATIBLE_FIELD_TYPES was assigned a Collections.unmodifiableSet. So the static block could build up a temporary set then assign an unmodifiable version to COMPATIBLE_FIELD_TYPES at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@dimitris-athanasiou dimitris-athanasiou changed the title Only write numeric fields to data frame [FEATURE][ML] Only write numeric fields to data frame Nov 28, 2018
@dimitris-athanasiou dimitris-athanasiou merged commit 801665a into elastic:feature-ml-data-frame-analytics Nov 28, 2018
@dimitris-athanasiou dimitris-athanasiou deleted the only-write-numeric-fields-to-data-frame branch November 28, 2018 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants