@@ -27,6 +27,10 @@ public class ClassificationOfFloatValues {
2727 private boolean dataSubdivisionBool = false ; // Data has been divided into training and test data
2828 private String MLAlgorithm ; // Variable for saving which machine learning algorithm has been used
2929
30+ // --- Classification result data variables
31+ private String [][][] predictedTestData ;
32+ private int [][] sortedProbability ;
33+
3034
3135 // Function to add the members of the class
3236 public float [][] output () { return this .predictorData ; }
@@ -83,6 +87,12 @@ public void dataValidation (float trainingData) {
8387
8488
8589 // --- Functions for evaluating the machine learning results -------------------------------------------------------
90+ public void evaluateResults () {
91+ DATA_evaluation evaluationObject = new DATA_evaluation (this .testDataResults ,
92+ this .columnCount - this .numberOfTrainingData ,
93+ this .predictedTestData ,
94+ this .sortedProbability );
95+ }
8696 public void confusionMatrix () {
8797 if (this .MLAlgorithm == "DistanceClassification" ) {
8898 System .out .println ("nice confusion" );
@@ -134,6 +144,10 @@ public void distanceClassification (){
134144 // Testing the distance classification model
135145 classificationObject .setTestData (this .testDataPredictors , this .testDataResults , this .rowCount , this .columnCount - this .numberOfTrainingData );
136146 classificationObject .testModel ();
147+
148+ // Get the test data
149+ this .predictedTestData = classificationObject .getPredictedTestData ();
150+ this .sortedProbability = classificationObject .getSortedProbability ();
137151 }
138152
139153 }
0 commit comments