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

one hot encode a little optimization #112

Closed
bai0335 opened this issue Jul 16, 2020 · 1 comment
Closed

one hot encode a little optimization #112

bai0335 opened this issue Jul 16, 2020 · 1 comment
Assignees

Comments

@bai0335
Copy link
Contributor

bai0335 commented Jul 16, 2020

in one hot encode , there is no need count and filte when the threshold less than 1.

code is :
DataSet<Tuple3<Integer, String, Long>> countTokens = StringIndexerUtil.countTokens(inputRows, true)
.filter(new FilterFunction<Tuple3<Integer, String, Long>>() {
@OverRide
public boolean filter(Tuple3<Integer, String, Long> value) {
return value.f2 >= thresholdArray[value.f0];
}
});

@lqb11 lqb11 self-assigned this Jul 22, 2020
@lqb11
Copy link
Collaborator

lqb11 commented Jul 22, 2020

Thanks, we'll optimize it later.

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

3 participants