-
-
Save merlin-quix/42570f533a9663b9baa226f5955a7d01 to your computer and use it in GitHub Desktop.
Code sample for the article "Feature engineering has a language problem"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Tuple5<Double, Double, Double, Double, Integer> merge(Tuple5<Double, Double, Double, Double, Integer> a, Tuple5<Double, Double, Double, Double, Integer> b) { | |
return new Tuple5<>( | |
a.f0, // Open (min) | |
Math.max(a.f1, b.f1), // High | |
Math.min(a.f2, b.f2), // Low | |
b.f3, // Close (latest value) | |
a.f4 + b.f4 // Volume | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment