Commit 0cc6e279 authored by Bruno López Trigo's avatar Bruno López Trigo

Engadidos os clasificadores FURIA para os datasets exemplo e solventado...

Engadidos os clasificadores FURIA para os datasets exemplo e solventado problema coa xeración da matriz de entrenamento
parent 7a01bfa3
......@@ -29,6 +29,9 @@ public interface BuilderManager {
public DatasetConfig buildModels(String token, String datasetName, String model, String[] options)
throws ConflictEx, FormatEx, NotFoundEx;
public void buildTestPredictions(String token, String datasetName, String model, String[] options)
throws ConflictEx, FormatEx, NotFoundEx;
public double classifyFURIA(String token, String datasetName, String[] options, Instance instance)
throws FormatEx, NotFoundEx;
}
......@@ -326,6 +326,107 @@ public class BuilderManagerImpl implements BuilderManager {
return config;
}
/*
*
* Construye el modelo de clasificación de WEKA, para generar el archivo de predicciones de test
*
*/
@Override
public void buildTestPredictions(String token, String datasetName, String model, String[] options)
throws ConflictEx, FormatEx, NotFoundEx {
FileReader readerLRN;
File dataset = this.fmanager.getDataset(token, datasetName);
File datasetTest = this.fmanager.getTest(token, datasetName);
String predictionsLocation = this.fmanager.getPredictionsTestLocation(token, datasetName, model);
try {
// Leer el dataset de entrenamiento y construir instancias de entrenamiento
readerLRN = new FileReader(dataset.getAbsolutePath());
Instances instancesLRN = new Instances(readerLRN);
instancesLRN.setClassIndex(instancesLRN.numAttributes() - 1);
// Leer el dataset de test y construir instancias de test
readerLRN = new FileReader(datasetTest.getAbsolutePath());
Instances instancesTest = new Instances(readerLRN);
instancesTest.setClassIndex(instancesTest.numAttributes() - 1);
J48 c45model = null;
RandomTree rtree = null;
REPTree reptree = null;
FURIA furia = null;
PrintStream predictions;
/*
*
* Construír el modelo de clasificación con WEKA con las opciones indicadas por
* el usuario
*
*/
switch (model) {
case "J48":
c45model = new J48();
c45model.setOptions(options);
c45model.buildClassifier(instancesLRN);
break;
case "RandomTree":
rtree = new RandomTree();
rtree.setOptions(options);
rtree.buildClassifier(instancesLRN);
break;
case "REPTree":
reptree = new REPTree();
reptree.setOptions(options);
reptree.buildClassifier(instancesLRN);
break;
case "FURIA":
furia = new FURIA();
furia.setOptions(options);
furia.buildClassifier(instancesLRN);
break;
}
Evaluation evalLRN = new Evaluation(instancesLRN);
/*
*
* Evaluar el modelo con las instancias de test
*
*/
switch (model) {
case "J48":
evalLRN.evaluateModel(c45model, instancesTest, (Object[]) new String[1]);
break;
case "RandomTree":
evalLRN.evaluateModel(rtree, instancesTest, (Object[]) new String[1]);
break;
case "REPTree":
evalLRN.evaluateModel(reptree, instancesTest, (Object[]) new String[1]);
break;
case "FURIA":
evalLRN.evaluateModel(furia, instancesTest, (Object[]) new String[1]);
break;
}
predictions = new PrintStream(new FileOutputStream(predictionsLocation, false));
// Escribir las predicciones en el archivo de predicciones
for (Prediction p : evalLRN.predictions()) {
predictions.println(p.actual() + " " + p.predicted());
}
readerLRN.close();
predictions.flush();
predictions.close();
} catch (Exception ex) {
throw new FormatEx("Error building log, check format");
}
}
/*
*
* Construye el modelo de clasificación de WEKA para FURIA para clasificar una
......@@ -338,7 +439,14 @@ public class BuilderManagerImpl implements BuilderManager {
brunolopez.expliclas.models.Instance instance) throws FormatEx, NotFoundEx {
FileReader readerLRN;
File dataset = this.fmanager.getDataset(token, datasetName);
File dataset;
try{
dataset = this.fmanager.getDataset(datasetName);
} catch (NotFoundEx ex) {
dataset = this.fmanager.getDataset(token, datasetName);
}
double value = -1;
try {
......
......@@ -24,12 +24,16 @@ import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
import brunolopez.expliclas.builder.BuilderManager;
import brunolopez.expliclas.builder.BuilderManagerImpl;
import brunolopez.expliclas.exceptions.FormatEx;
import brunolopez.expliclas.exceptions.NotFoundEx;
import brunolopez.expliclas.models.DatasetConfig;
import brunolopez.expliclas.models.Matrix;
import brunolopez.expliclas.models.Position;
import brunolopez.expliclas.models.fuzzy.Rules;
import brunolopez.expliclas.utils.FileManager;
import brunolopez.expliclas.utils.MapperJSON;
......@@ -42,10 +46,12 @@ public class MatrixBuilder {
private BufferedReader reader;
private final FileManager fmanager;
private final BuilderManager bmanager;
public MatrixBuilder(File input) throws FileNotFoundException {
this.reader = new BufferedReader(new FileReader(input));
this.fmanager = new FileManager();
this.bmanager = new BuilderManagerImpl();
}
/*
......@@ -118,6 +124,7 @@ public class MatrixBuilder {
if (type.equals("train")) {
predictions = this.fmanager.getPredictions(token, name, algorithm);
} else {
this.bmanager.buildTestPredictions(token, name, algorithm, extractOptions(token, name, algorithm));
predictions = this.fmanager.getPredictionsTest(token, name, algorithm);
}
......@@ -153,6 +160,23 @@ public class MatrixBuilder {
m.setPrecision();
return m;
}
private String[] extractOptions(String token, String dataset, String algorithm) throws FileNotFoundException, NotFoundEx {
String[] options;
Scanner sc = new Scanner(this.fmanager.getLog(token, dataset, algorithm));
String line = sc.nextLine();
while (!line.startsWith("Scheme:")) {
line = sc.nextLine();
}
options = line.split(algorithm + " ")[1].split(" ");
sc.close();
return options;
}
}
=== Run information ===
Scheme: rules.FURIA -F 3 -N 2.0 -O 2 -S 1 -p 0 -s 0
Relation: BEER3-weka.filters.supervised.instance.StratifiedRemoveFolds-S0-V-N3-F1
Instances: 266
Attributes: 4
Color
Bitterness
Strength
Beer-Style
Test mode: 10-fold cross-validation
=== Classifier model (full training set) ===
FURIA rules:
===========
(Bitterness in [-inf, -inf, 19, 30]) and (Color in [-inf, -inf, 4, 7]) => Beer-Style=1.0 (CF = 0.95)
(Bitterness in [-inf, -inf, 21, 30]) and (Color in [-inf, -inf, 4, 7]) => Beer-Style=1.0 (CF = 0.95)
(Bitterness in [-inf, -inf, 27, 31]) and (Bitterness in [20, 21, inf, inf]) and (Color in [-inf, -inf, 20, 21]) and (Color in [7, 8, inf, inf]) => Beer-Style=2.0 (CF = 0.94)
(Color in [-inf, -inf, 8, 20]) and (Color in [6, 7, inf, inf]) and (Bitterness in [-inf, -inf, 39, 50]) => Beer-Style=2.0 (CF = 0.91)
(Color in [-inf, -inf, 6, 7]) and (Bitterness in [21, 30, inf, inf]) => Beer-Style=3.0 (CF = 0.95)
(Bitterness in [52, 59, inf, inf]) and (Strength in [-inf, -inf, 0.091, 0.092]) => Beer-Style=4.0 (CF = 0.87)
(Bitterness in [52, 57, inf, inf]) and (Color in [-inf, -inf, 8, 9]) => Beer-Style=4.0 (CF = 0.84)
(Color in [29, 30, inf, inf]) => Beer-Style=5.0 (CF = 0.9)
(Bitterness in [47, 50, inf, inf]) and (Strength in [0.091, 0.092, inf, inf]) and (Color in [7, 9, inf, inf]) => Beer-Style=6.0 (CF = 0.95)
(Color in [12, 20, inf, inf]) and (Strength in [-inf, -inf, 0.051, 0.053]) and (Color in [-inf, -inf, 30, 34]) => Beer-Style=7.0 (CF = 0.95)
(Color in [23, 24, inf, inf]) and (Color in [-inf, -inf, 25, 27]) => Beer-Style=7.0 (CF = 0.83)
(Strength in [0.07, 0.087, inf, inf]) and (Color in [23, 27, inf, inf]) => Beer-Style=8.0 (CF = 0.95)
Number of Rules : 12
=== Summary ===
Correctly Classified Instances 252 94.7368 %
Incorrectly Classified Instances 14 5.2632 %
Kappa statistic 0.9398
K&B Relative Info Score 25157.6698 %
K&B Information Score 754.7301 bits 2.8373 bits/instance
Class complexity | order 0 798.8128 bits 3.0031 bits/instance
Class complexity | scheme 9681.3693 bits 36.3961 bits/instance
Complexity improvement (Sf) -8882.5565 bits -33.3931 bits/instance
Mean absolute error 0.0155
Root mean squared error 0.1049
Relative absolute error 7.0742 %
Root relative squared error 31.7211 %
Total Number of Instances 266
=== Confusion Matrix ===
a b c d e f g h <-- classified as
32 1 0 0 0 0 0 0 | a = 1.0
1 32 0 0 0 0 0 0 | b = 2.0
0 1 33 0 0 0 0 0 | c = 3.0
0 0 0 28 0 5 0 0 | d = 4.0
0 0 0 0 32 0 1 0 | e = 5.0
0 0 0 3 0 31 0 0 | f = 6.0
0 0 0 0 1 0 31 1 | g = 7.0
0 0 0 0 0 0 0 33 | h = 8.0
{
"data" : [ [ 32, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 32, 0, 0, 0, 0, 0, 0 ], [ 0, 1, 33, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 28, 0, 5, 0, 0 ], [ 0, 0, 0, 0, 32, 0, 1, 0 ], [ 0, 0, 0, 3, 0, 31, 0, 0 ], [ 0, 0, 0, 0, 1, 0, 31, 1 ], [ 0, 0, 0, 0, 0, 0, 0, 33 ] ],
"precision" : 94.73684210526315,
"adjMatrix" : [ [ false, true, false, false, false, false, false, false ], [ true, false, false, false, false, false, false, false ], [ false, true, false, false, false, false, false, false ], [ false, false, false, false, false, true, false, false ], [ false, false, false, false, false, false, true, false ], [ false, false, false, true, false, false, false, false ], [ false, false, false, false, true, false, false, true ], [ false, false, false, false, false, false, false, false ] ],
"confused" : { },
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 17, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 17, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 16, 0, 0, 0, 0, 0 ], [ 0, 0, 1, 15, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 17, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 16, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 17, 0 ], [ 0, 1, 0, 0, 0, 0, 0, 16 ] ],
"precision" : 97.76119402985076,
"adjMatrix" : null,
"confused" : {
"7:1" : [ 134 ],
"3:2" : [ 65 ],
"3:5" : [ 54 ]
},
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 33, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 33, 0, 0, 0, 0, 0, 0 ], [ 0, 1, 33, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 32, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 33, 0, 0, 0 ], [ 0, 0, 0, 3, 0, 31, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 33, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 33 ] ],
"precision" : 98.1203007518797,
"adjMatrix" : null,
"confused" : {
"5:3" : [ 91, 93, 97 ],
"2:1" : [ 39 ],
"3:5" : [ 188 ]
},
"abstain" : false
}
\ No newline at end of file
This diff is collapsed.
=== Run information ===
Scheme: rules.FURIA -F 3 -N 2.0 -O 2 -S 1 -p 0 -s 0
Relation: FLAVIA5-weka.filters.supervised.instance.StratifiedRemoveFolds-S0-V-N3-F1
Instances: 206
Attributes: 4
Area
Perimeter
Diameter
Class
Test mode: 10-fold cross-validation
=== Classifier model (full training set) ===
FURIA rules:
===========
(Area in [775853, 784168, inf, inf]) and (Area in [-inf, -inf, 918774, 922188]) => Class=1.0 (CF = 0.96)
(Area in [607463, 656104, inf, inf]) and (Perimeter in [-inf, -inf, 3692.048266, 3802.418757]) => Class=1.0 (CF = 0.93)
(Perimeter in [-inf, -inf, 2341.356565, 2366.9373]) => Class=2.0 (CF = 0.95)
(Area in [918774, 922188, inf, inf]) and (Area in [-inf, -inf, 1006143, 1091964]) => Class=2.0 (CF = 0.82)
(Perimeter in [6140.833329, 6156.223156, inf, inf]) => Class=3.0 (CF = 0.95)
(Perimeter in [-inf, -inf, 2907.838887, 2947.946535]) and (Area in [322762, 326683, inf, inf]) => Class=3.0 (CF = 0.87)
(Area in [-inf, -inf, 690910, 711827]) and (Area in [275644, 353741, inf, inf]) and (Perimeter in [-inf, -inf, 6054.299274, 6156.223156]) and (Perimeter in [2907.838887, 2947.946535, inf, inf]) => Class=4.0 (CF = 0.84)
(Perimeter in [-inf, -inf, 3345.375034, 3555.41789]) and (Perimeter in [2806.660172, 2818.299782, inf, inf]) and (Area in [251600, 267091, inf, inf]) and (Area in [-inf, -inf, 397790, 451667]) => Class=4.0 (CF = 0.79)
(Area in [-inf, -inf, 275644, 303380]) and (Perimeter in [2872.684558, 2893.462479, inf, inf]) => Class=5.0 (CF = 0.96)
Number of Rules : 9
=== Summary ===
Correctly Classified Instances 193 93.6893 %
Incorrectly Classified Instances 13 6.3107 %
Kappa statistic 0.921
K&B Relative Info Score 18902.7135 %
K&B Information Score 437.6574 bits 2.1246 bits/instance
Class complexity | order 0 477.3805 bits 2.3174 bits/instance
Class complexity | scheme 10754.5599 bits 52.2066 bits/instance
Complexity improvement (Sf) -10277.1793 bits -49.8892 bits/instance
Mean absolute error 0.0332
Root mean squared error 0.157
Relative absolute error 10.3791 %
Root relative squared error 39.2872 %
Total Number of Instances 206
=== Confusion Matrix ===
a b c d e <-- classified as
40 0 0 2 0 | a = 1.0
0 38 0 0 0 | b = 2.0
2 0 42 4 0 | c = 3.0
1 0 2 36 1 | d = 4.0
0 0 0 1 37 | e = 5.0
{
"data" : [ [ 40, 0, 0, 2, 0 ], [ 0, 38, 0, 0, 0 ], [ 2, 0, 42, 4, 0 ], [ 1, 0, 2, 36, 1 ], [ 0, 0, 0, 1, 37 ] ],
"precision" : 93.68932038834951,
"adjMatrix" : [ [ false, false, false, true, false ], [ false, false, false, false, false ], [ true, false, false, true, false ], [ true, false, true, false, true ], [ false, false, false, true, false ] ],
"confused" : { },
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 20, 0, 0, 1, 0 ], [ 1, 16, 1, 2, 0 ], [ 0, 0, 20, 3, 1 ], [ 0, 0, 1, 18, 1 ], [ 0, 0, 0, 0, 19 ] ],
"precision" : 89.42307692307693,
"adjMatrix" : null,
"confused" : {
"1:0" : [ 22 ],
"3:2" : [ 81 ],
"1:2" : [ 41 ],
"2:3" : [ 49, 64, 65 ],
"3:4" : [ 70 ],
"1:3" : [ 39, 40 ],
"2:4" : [ 50 ],
"0:3" : [ 3 ]
},
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 41, 0, 0, 1, 0 ], [ 0, 38, 0, 0, 0 ], [ 3, 0, 43, 2, 0 ], [ 0, 0, 1, 39, 0 ], [ 0, 0, 0, 1, 37 ] ],
"precision" : 96.11650485436894,
"adjMatrix" : null,
"confused" : {
"2:0" : [ 49, 62, 152 ],
"3:2" : [ 73 ],
"4:3" : [ 85 ],
"2:3" : [ 151, 167 ],
"0:3" : [ 105 ]
},
"abstain" : false
}
\ No newline at end of file
=== Run information ===
Scheme: rules.FURIA -F 3 -N 2.0 -O 2 -S 1 -p 0 -s 0
Relation: Glass-weka.filters.supervised.instance.StratifiedRemoveFolds-S0-V-N3-F1
Instances: 142
Attributes: 10
RI
Na
Mg
Al
Si
K
Ca
Ba
Fe
Type
Test mode: 10-fold cross-validation
=== Classifier model (full training set) ===
FURIA rules:
===========
(Al in [-inf, -inf, 1.41, 1.43]) and (Si in [72.78, 72.79, inf, inf]) and (Al in [1.08, 1.12, inf, inf]) and (RI in [1.5166, 1.5172, inf, inf]) => Type=build wind float (CF = 0.94)
(Al in [-inf, -inf, 1.18, 1.27]) and (Si in [-inf, -inf, 72.22, 72.28]) and (Si in [71.5, 71.57, inf, inf]) and (RI in [-inf, -inf, 1.52667, 1.52777]) => Type=build wind float (CF = 0.9)
(Mg in [2.96, 3.37, inf, inf]) and (RI in [1.51711, 1.51756, inf, inf]) and (Mg in [-inf, -inf, 3.62, 3.63]) and (Si in [72.38, 72.64, inf, inf]) => Type=build wind float (CF = 0.92)
(Fe in [0.19, 0.24, inf, inf]) and (RI in [-inf, -inf, 1.51596, 1.51655]) => Type=build wind float (CF = 0.73)
(Ca in [-inf, -inf, 8.41, 8.43]) and (Mg in [3.46, 3.48, inf, inf]) and (K in [0.58, 0.6, inf, inf]) and (Fe in [-inf, -inf, 0.25, 0.26]) => Type=build wind non-float (CF = 0.93)
(Fe in [0.09, 0.12, inf, inf]) and (Si in [-inf, -inf, 72.57, 72.7]) and (Al in [0.91, 1, inf, inf]) and (Al in [-inf, -inf, 1.88, 2.17]) => Type=build wind non-float (CF = 0.91)
(Na in [-inf, -inf, 13.36, 13.41]) and (RI in [-inf, -inf, 1.5173, 1.51755]) and (Mg in [-inf, -inf, 3.44, 3.46]) and (Mg in [0, 2.72, inf, inf]) => Type=build wind non-float (CF = 0.86)
(Al in [-inf, -inf, 1.26, 1.4]) and (Ca in [10.17, 10.79, inf, inf]) => Type=build wind non-float (CF = 0.84)
(Ca in [-inf, -inf, 8.6, 8.61]) and (RI in [1.51769, 1.51806, inf, inf]) and (K in [-inf, -inf, 0.58, 0.59]) => Type=build wind non-float (CF = 0.88)
(Mg in [2.87, 3.34, inf, inf]) and (Ca in [8.43, 8.44, inf, inf]) and (RI in [-inf, -inf, 1.51832, 1.5186]) and (Na in [13.21, 13.24, inf, inf]) => Type=vehic wind float (CF = 0.77)
(Mg in [-inf, -inf, 1.71, 2.71]) and (Na in [-inf, -inf, 13.44, 13.55]) and (RI in [-inf, -inf, 1.52369, 1.52475]) => Type=containers (CF = 0.81)
(K in [-inf, -inf, 0, 0.06]) and (Ba in [-inf, -inf, 0, 0.4]) and (RI in [-inf, -inf, 1.51937, 1.51966]) => Type=tableware (CF = 0.76)
(Ba in [0.27, 0.4, inf, inf]) and (Mg in [-inf, -inf, 3.26, 3.58]) => Type=headlamps (CF = 0.91)
(RI in [1.52227, 1.52247, inf, inf]) and (Ca in [-inf, -inf, 9.76, 9.82]) => Type=headlamps (CF = 0.66)
Number of Rules : 14
=== Summary ===
Correctly Classified Instances 93 65.493 %
Incorrectly Classified Instances 49 34.507 %
Kappa statistic 0.5145
K&B Relative Info Score 7498.1773 %
K&B Information Score 169.6317 bits 1.1946 bits/instance
Class complexity | order 0 310.6513 bits 2.1877 bits/instance
Class complexity | scheme 37629.2101 bits 264.9944 bits/instance
Complexity improvement (Sf) -37318.5588 bits -262.8068 bits/instance
Mean absolute error 0.1076
Root mean squared error 0.2927
Relative absolute error 50.7361 %
Root relative squared error 90.2466 %
Total Number of Instances 142
=== Confusion Matrix ===
a b c d e f g <-- classified as
33 10 1 0 0 0 2 | a = build wind float
14 34 0 0 1 1 1 | b = build wind non-float
7 4 0 0 0 0 0 | c = vehic wind float
0 0 0 0 0 0 0 | d = vehic wind non-float
0 4 0 0 4 0 0 | e = containers
1 1 0 0 0 4 0 | f = tableware
1 1 0 0 0 0 18 | g = headlamps
{
"data" : [ [ 33, 10, 1, 0, 0, 0, 2 ], [ 14, 34, 0, 0, 1, 1, 1 ], [ 7, 4, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 4, 0, 0, 4, 0, 0 ], [ 1, 1, 0, 0, 0, 4, 0 ], [ 1, 1, 0, 0, 0, 0, 18 ] ],
"precision" : 65.49295774647888,
"adjMatrix" : [ [ false, true, true, false, false, false, true ], [ true, false, false, false, true, true, true ], [ true, true, false, false, false, false, false ], [ false, false, false, false, false, false, false ], [ false, true, false, false, false, false, false ], [ true, true, false, false, false, false, false ], [ true, true, false, false, false, false, false ] ],
"confused" : { },
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 20, 3, 1, 0, 0, 0, 0 ], [ 3, 21, 0, 0, 0, 0, 1 ], [ 2, 3, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 4, 0, 1 ], [ 0, 1, 0, 0, 0, 2, 0 ], [ 0, 0, 0, 0, 1, 0, 8 ] ],
"precision" : 77.77777777777779,
"adjMatrix" : null,
"confused" : {
"5:1" : [ 26 ],
"2:0" : [ 54, 57 ],
"6:4" : [ 64 ],
"1:0" : [ 32, 38, 52 ],
"2:1" : [ 53, 55, 58 ],
"0:1" : [ 8, 14, 20 ],
"0:2" : [ 7 ],
"4:6" : [ 69 ],
"1:6" : [ 51 ]
},
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 43, 3, 0, 0, 0, 0, 0 ], [ 0, 51, 0, 0, 0, 0, 0 ], [ 3, 2, 6, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 8, 0, 0 ], [ 0, 0, 0, 0, 0, 6, 0 ], [ 0, 0, 0, 0, 0, 0, 20 ] ],
"precision" : 94.36619718309859,
"adjMatrix" : null,
"confused" : {
"2:0" : [ 53, 123, 127 ],
"2:1" : [ 55, 57 ],
"0:1" : [ 8, 75, 94 ]
},
"abstain" : false
}
\ No newline at end of file
This diff is collapsed.
=== Run information ===
Scheme: rules.FURIA -F 3 -N 2.0 -O 2 -S 1 -p 0 -s 0
Relation: IRIS-weka.filters.supervised.instance.StratifiedRemoveFolds-S0-V-N3-F1
Instances: 100
Attributes: 5
Sepal-Length
Sepal-Width
Petal-Length
Petal-Width
Class
Test mode: 10-fold cross-validation
=== Classifier model (full training set) ===
FURIA rules:
===========
(Petal-Length in [-inf, -inf, 1.9, 3]) => Class=1.0 (CF = 0.96)
(Petal-Length in [1.9, 3, inf, inf]) and (Petal-Length in [-inf, -inf, 4.8, 4.9]) and (Sepal-Length in [4.9, 5.1, inf, inf]) => Class=2.0 (CF = 0.96)
(Sepal-Length in [6.3, 6.7, inf, inf]) and (Petal-Length in [-inf, -inf, 5, 5.1]) => Class=2.0 (CF = 0.85)
(Petal-Length in [4.8, 4.9, inf, inf]) and (Petal-Width in [1.7, 1.8, inf, inf]) => Class=3.0 (CF = 0.96)
(Petal-Length in [4.9, 5, inf, inf]) and (Petal-Width in [-inf, -inf, 1.5, 1.6]) => Class=3.0 (CF = 0.74)
Number of Rules : 5
=== Summary ===
Correctly Classified Instances 91 91 %
Incorrectly Classified Instances 9 9 %
Kappa statistic 0.8649
K&B Relative Info Score 8688.8232 %
K&B Information Score 137.7146 bits 1.3771 bits/instance
Class complexity | order 0 158.8071 bits 1.5881 bits/instance
Class complexity | scheme 8595.7768 bits 85.9578 bits/instance
Complexity improvement (Sf) -8436.9697 bits -84.3697 bits/instance
Mean absolute error 0.0653
Root mean squared error 0.2427
Relative absolute error 14.6803 %
Root relative squared error 51.4263 %
Total Number of Instances 100
=== Confusion Matrix ===
a b c <-- classified as
33 0 0 | a = 1.0
1 27 5 | b = 2.0
0 3 31 | c = 3.0
{
"data" : [ [ 33, 0, 0 ], [ 1, 27, 5 ], [ 0, 3, 31 ] ],
"precision" : 91.0,
"adjMatrix" : [ [ false, false, false ], [ true, false, true ], [ false, true, false ] ],
"confused" : { },
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 17, 0, 0 ], [ 0, 16, 1 ], [ 0, 2, 14 ] ],
"precision" : 94.0,
"adjMatrix" : null,
"confused" : {
"2:1" : [ 43, 47 ],
"1:2" : [ 25 ]
},
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 33, 0, 0 ], [ 0, 32, 1 ], [ 0, 1, 33 ] ],
"precision" : 98.0,
"adjMatrix" : null,
"confused" : {
"2:1" : [ 36 ],
"1:2" : [ 78 ]
},
"abstain" : false
}
\ No newline at end of file
This diff is collapsed.
{
"data" : [ [ 37, 2, 0 ], [ 2, 43, 2 ], [ 0, 1, 31 ] ],
"precision" : 94.0677966101695,
"adjMatrix" : [ [ false, true, false ], [ true, false, true ], [ false, true, false ] ],
"confused" : { },
"abstain" : false
}
\ No newline at end of file
{
"data" : [ [ 19, 1, 0 ], [ 2, 22, 0 ], [ 0, 2, 14 ] ],
"precision" : 91.66666666666666,
"adjMatrix" : null,