Skip to content

Instantly share code, notes, and snippets.

@bartvollebregt
Created January 23, 2017 07:17
Show Gist options
  • Save bartvollebregt/c4d15b0363181f3c66027f71c237687e to your computer and use it in GitHub Desktop.
Save bartvollebregt/c4d15b0363181f3c66027f71c237687e to your computer and use it in GitHub Desktop.
System.out.println("===DATA===");
System.out.println(trainData);
System.out.println(testData);
//Normalize data, including labels (fitLabel=true)
NormalizerMinMaxScaler normalizer = new NormalizerMinMaxScaler(0, 1);
normalizer.fitLabel(true);
normalizer.fit(trainData);
normalizer.transform(trainData);
normalizer.transform(testData);
System.out.println("===Normalized===");
System.out.println(trainData);
System.out.println(testData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment