-
-
Save MiraLak/1cc323a08e3880da4695 to your computer and use it in GitHub Desktop.
Actitacker Spark Cassandra
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
/** | |
* build the data set with label & features (11) | |
* activity, mean_x, mean_y, mean_z, var_x, var_y, var_z, avg_abs_diff_x, avg_abs_diff_y, avg_abs_diff_z, res, peak_y | |
*/ | |
private static LabeledPoint getLabeledPoint(String activity, double[] mean, double[] variance, double[] avgAbsDiff, double resultant, double avgTimePeak) { | |
// First the feature | |
double[] features = new double[]{ | |
mean[0], | |
mean[1], | |
mean[2], | |
variance[0], | |
variance[1], | |
variance[2], | |
avgAbsDiff[0], | |
avgAbsDiff[1], | |
avgAbsDiff[2], | |
resultant, | |
avgTimePeak | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment