Created
January 31, 2017 15:41
-
-
Save hack-r/d028f2709d7aeb75e65f272e17827ebe to your computer and use it in GitHub Desktop.
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
String[] outPut = new String[2]; | |
for (int j = 0; j < newTest.size(); j++){ | |
double[] predictionDistribution = clf.distributionForInstance(newTest.instance(j)); | |
for(int i=0; i<predictionDistribution.length; i=i+1){ | |
outPut[i] = "Probability of class "+ | |
newTest.classAttribute().value(i)+ | |
" : "+Double.toString(predictionDistribution[i]); | |
} | |
} | |
System.out.println("Predictions complete! Writing output file to csv..."); | |
// Save results in .csv file | |
//outFile.write(builder.toString());//save the string representation | |
outFile.write(outPut.toString()); | |
System.out.println("Output file written."); | |
System.out.println("SilverBullet RRO completed successfully!"); | |
outFile.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment