Commit 527a4dd9 authored by Bruno López Trigo's avatar Bruno López Trigo

O demostrador admite engadir e eliminar intervalos da configuración de experto

parent b91df293
......@@ -208,7 +208,7 @@ public class DatasetManagerImpl implements DatasetManager {
@Override
public Dataset deleteDataset(String token, String name) throws NotFoundEx {
File datasetDir = this.fmanager.getDataset(token, name);
File datasetDir = this.fmanager.getDatasetDirectory(token, name);
Dataset dataset = null;
......
......@@ -23,6 +23,14 @@ public class FileManager {
return new File(BASE + "tmp/" + token);
}
public File getDatasetDirectory(String token, String dataset) throws NotFoundEx {
File f = new File(BASE + "tmp/" + token + "/" + dataset);
if(f.exists())
return f;
else
throw new NotFoundEx("Dataset " + dataset + " not found");
}
public String getDatasetLocation(String dataset) {
return BASE + dataset + "/" + dataset + ".arff";
}
......
=== Run information ===
Scheme: weka.classifiers.trees.J48 -C 0.25 -M 2
Scheme: trees.J48 -C 0.25 -M 2
Relation: IRIS
Instances: 150
Attributes: 5
......@@ -29,29 +29,22 @@ Number of Leaves : 5
Size of the tree : 9
Time taken to build model: 0 seconds
=== Stratified cross-validation ===
=== Summary ===
Correctly Classified Instances 144 96 %
Incorrectly Classified Instances 6 4 %
Kappa statistic 0.94
K&B Relative Info Score 14004.9837 %
K&B Information Score 221.9737 bits 1.4798 bits/instance
Class complexity | order 0 237.7444 bits 1.585 bits/instance
Class complexity | scheme 3238.3794 bits 21.5892 bits/instance
Complexity improvement (Sf) -3000.6351 bits -20.0042 bits/instance
Mean absolute error 0.035
Root mean squared error 0.1586
Relative absolute error 7.8705 %
Root relative squared error 33.6353 %
Total Number of Instances 150
=== Detailed Accuracy By Class ===
TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class
0,980 0,000 1,000 0,980 0,990 0,985 0,990 0,987 1.0
0,940 0,030 0,940 0,940 0,940 0,910 0,952 0,880 2.0
0,960 0,030 0,941 0,960 0,950 0,925 0,961 0,905 3.0
Weighted Avg. 0,960 0,020 0,960 0,960 0,960 0,940 0,968 0,924
=== Confusion Matrix ===
a b c <-- classified as
......
=== Run information ===
Scheme: weka.classifiers.trees.REPTree -M 2 -V 0.001 -N 3 -S 1 -L -1 -I 0.0
Scheme: trees.REPTree -M 2 -V 0.001 -N 3 -S 1 -L -1 -I 0.0
Relation: IRIS
Instances: 150
Attributes: 5
......@@ -23,29 +23,22 @@ Petal-Length >= 2.5
| Petal-Width >= 1.75 : 3.0 (31/1) [15/0]
Size of the tree : 5
Time taken to build model: 0 seconds
=== Stratified cross-validation ===
=== Summary ===
Correctly Classified Instances 141 94 %
Incorrectly Classified Instances 9 6 %
Kappa statistic 0.91
K&B Relative Info Score 13418.9037 %
K&B Information Score 212.6846 bits 1.4179 bits/instance
Class complexity | order 0 237.7444 bits 1.585 bits/instance
Class complexity | scheme 2184.0053 bits 14.56 bits/instance
Complexity improvement (Sf) -1946.261 bits -12.9751 bits/instance
Mean absolute error 0.0563
Root mean squared error 0.1936
Relative absolute error 12.6749 %
Root relative squared error 41.0599 %
Total Number of Instances 150
=== Detailed Accuracy By Class ===
TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class
1,000 0,000 1,000 1,000 1,000 1,000 1,000 1,000 1.0
0,920 0,050 0,902 0,920 0,911 0,866 0,948 0,886 2.0
0,900 0,040 0,918 0,900 0,909 0,864 0,948 0,871 3.0
Weighted Avg. 0,940 0,030 0,940 0,940 0,940 0,910 0,965 0,919
=== Confusion Matrix ===
a b c <-- classified as
......
{
"type": "numericNode",
"attribute": {
"type": "numericAtt",
"id": "Petal-Length",
"name": "petal length",
"name": "Petal length",
"properties": [{
"type": "numericProp",
"name": "low",
"name": "Small",
"id": 0,
"interval": {
"left": 1.0,
"right": 2.9666667
"right": 2.966666666666667
}
}, {
"type": "numericProp",
"name": "medium",
"name": "Medium",
"id": 1,
"interval": {
"left": 2.9666667,
"right": 4.9333334
"left": 2.966666666666667,
"right": 4.933333333333334
}
}, {
"type": "numericProp",
"name": "high",
"name": "Big",
"id": 2,
"interval": {
"left": 4.9333334,
"left": 4.933333333333334,
"right": 6.9
}
}],
......@@ -31,76 +35,73 @@
},
"value": 0.0
},
"value": null,
"splitValue": 2.5,
"comparisonSymbol": "<",
"children": [{
"consequent": {
"matrixPosition": 1,
"id": "1.0",
"name": "Setosa"
},
"percentage": 100.0,
"nodeText": "Petal-Length < 2.5",
"leaf": true
}, {
"attribute": {
"type": "numericAtt",
"id": "Petal-Width",
"name": "petal width",
"properties": [{
"type": "numericProp",
"name": "low",
"interval": {
"left": 0.1,
"right": 0.9
}
}, {
"type": "numericProp",
"name": "medium",
"interval": {
"left": 0.9,
"right": 1.7
}
}, {
"type": "numericProp",
"name": "high",
"interval": {
"left": 1.7,
"right": 2.5
}
}],
"interval": {
"left": 0.1,
"right": 2.5
},
"value": 0.0
},
"value": null,
"splitValue": 1.75,
"comparisonSymbol": "<",
"children": [{
"consequent": {
"matrixPosition": 2,
"id": "2.0",
"name": "Virginica"
},
"percentage": 91.66666666666666,
"nodeText": "Petal-Width < 1.75",
"leaf": true
"leftChild": {
"type": "consequentNode",
"consequent": {
"matrixPosition": 1,
"id": "1.0",
"name": "Setosa",
"percentageNode": 100.0
}
},
"rightChild": {
"type": "numericNode",
"attribute": {
"type": "numericAtt",
"id": "Petal-Width",
"name": "Petal width",
"properties": [{
"type": "numericProp",
"name": "Small",
"id": 0,
"interval": {
"left": 0.1,
"right": 0.8999999999999999
}
}, {
"type": "numericProp",
"name": "Medium",
"id": 1,
"interval": {
"left": 0.8999999999999999,
"right": 1.7
}
}, {
"consequent": {
"matrixPosition": 3,
"id": "3.0",
"name": "Versicolor"
},
"percentage": 96.7741935483871,
"nodeText": "Petal-Width >= 1.75",
"leaf": true
"type": "numericProp",
"name": "Big",
"id": 2,
"interval": {
"left": 1.7,
"right": 2.5
}
}],
"nodeText": "Petal-Width < 1.75",
"leaf": false
}],
"nodeText": "Petal-Length < 2.5",
"leaf": false
"interval": {
"left": 0.1,
"right": 2.5
},
"value": 0.0
},
"splitValue": 1.75,
"comparisonSymbol": "<",
"leftChild": {
"type": "consequentNode",
"consequent": {
"matrixPosition": 2,
"id": "2.0",
"name": "Virginica",
"percentageNode": 91.66666666666666
}
},
"rightChild": {
"type": "consequentNode",
"consequent": {
"matrixPosition": 3,
"id": "3.0",
"name": "Versicolor",
"percentageNode": 96.7741935483871
}
}
}
}
\ No newline at end of file
=== Run information ===
Scheme: weka.classifiers.trees.RandomTree -K 0 -M 1.0 -V 0.001 -S 1
Scheme: trees.RandomTree -K 3 -M 1.0 -V 0.001 -S 1
Relation: IRIS
Instances: 150
Attributes: 5
......@@ -37,29 +37,22 @@ Petal-Length >= 2.45
| | Petal-Length >= 4.85 : 3.0 (43/0)
Size of the tree : 19
Time taken to build model: 0 seconds
=== Stratified cross-validation ===
=== Summary ===
Correctly Classified Instances 143 95.3333 %
Incorrectly Classified Instances 7 4.6667 %
Kappa statistic 0.93
K&B Relative Info Score 14041.6508 %
K&B Information Score 222.5549 bits 1.4837 bits/instance
Class complexity | order 0 237.7444 bits 1.585 bits/instance
Class complexity | scheme 7518 bits 50.12 bits/instance
Complexity improvement (Sf) -7280.2556 bits -48.535 bits/instance
Mean absolute error 0.0311
Root mean squared error 0.1764
Relative absolute error 7 %
Root relative squared error 37.4166 %
Total Number of Instances 150
=== Detailed Accuracy By Class ===
TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class
1,000 0,000 1,000 1,000 1,000 1,000 1,000 1,000 1.0
0,940 0,040 0,922 0,940 0,931 0,896 0,950 0,886 2.0
0,920 0,030 0,939 0,920 0,929 0,895 0,945 0,890 3.0
Weighted Avg. 0,953 0,023 0,953 0,953 0,953 0,930 0,965 0,926
=== Confusion Matrix ===
a b c <-- classified as
......
{
"dataset": "lirio",
"attributes": [{
"type": "numericAtt",
"id": "Sepal-Length",
"name": "Longitud de sepalo",
"properties": [{
"type": "numericProp",
"name": "Pequeño",
"id": 0,
"interval": {
"left": 4.3,
"right": 5.5
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 5.5,
"right": 6.7
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 6.7,
"right": 7.9
}
}],
"interval": {
"left": 4.3,
"right": 7.9
},
"value": 0.0
}, {
"type": "numericAtt",
"id": "Sepal-Width",
"name": "Anchura de sepalo",
"properties": [{
"type": "numericProp",
"name": "Pequeño",
"id": 0,
"interval": {
"left": 2.0,
"right": 2.8000000000000003
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 2.8000000000000003,
"right": 3.6000000000000005
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 3.6000000000000005,
"right": 4.4
}
}],
"interval": {
"left": 2.0,
"right": 4.4
},
"value": 0.0
}, {
"type": "numericAtt",
"id": "Petal-Length",
"name": "Longitud de petalo",
"properties": [{
"type": "numericProp",
"name": "Pequeño",
"id": 0,
"interval": {
"left": 1.0,
"right": 2.966666666666667
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 2.966666666666667,
"right": 4.933333333333334
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 4.933333333333334,
"right": 6.9
}
}],
"interval": {
"left": 1.0,
"right": 6.9
},
"value": 0.0
}, {
"type": "numericAtt",
"id": "Petal-Width",
"name": "Anchura de petalo",
"properties": [{
"type": "numericProp",
"name": "Pequeño",
"id": 0,
"interval": {
"left": 0.1,
"right": 0.8999999999999999
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 0.8999999999999999,
"right": 1.7
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 1.7,
"right": 2.5
}
}],
"interval": {
"left": 0.1,
"right": 2.5
},
"value": 0.0
}],
"consequents": [{
"matrixPosition": 1,
"id": "1.0",
"name": "Setosa",
"percentageNode": 0.0
}, {
"matrixPosition": 2,
"id": "2.0",
"name": "Virginica",
"percentageNode": 0.0
}, {
"matrixPosition": 3,
"id": "3.0",
"name": "Versicolor",
"percentageNode": 0.0
}]
}
\ No newline at end of file
{
"dataset": "lirio",
"attributes": [{
"type": "numericAtt",
"id": "Sepal-Length",
"name": "Lonxitude de sepalo",
"properties": [{
"type": "numericProp",
"name": "Pequeno",
"id": 0,
"interval": {
"left": 4.3,
"right": 5.5
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 5.5,
"right": 6.7
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 6.7,
"right": 7.9
}
}],
"interval": {
"left": 4.3,
"right": 7.9
},
"value": 0.0
}, {
"type": "numericAtt",
"id": "Sepal-Width",
"name": "Anchura de sepalo",
"properties": [{
"type": "numericProp",
"name": "Pequeno",
"id": 0,
"interval": {
"left": 2.0,
"right": 2.8000000000000003
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 2.8000000000000003,
"right": 3.6000000000000005
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 3.6000000000000005,
"right": 4.4
}
}],
"interval": {
"left": 2.0,
"right": 4.4
},
"value": 0.0
}, {
"type": "numericAtt",
"id": "Petal-Length",
"name": "Lonxitude de petalo",
"properties": [{
"type": "numericProp",
"name": "Pequeno",
"id": 0,
"interval": {
"left": 1.0,
"right": 2.966666666666667
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 2.966666666666667,
"right": 4.933333333333334
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 4.933333333333334,
"right": 6.9
}
}],
"interval": {
"left": 1.0,
"right": 6.9
},
"value": 0.0
}, {
"type": "numericAtt",
"id": "Petal-Width",
"name": "Anchura de petalo",
"properties": [{
"type": "numericProp",
"name": "Pequeno",
"id": 0,
"interval": {
"left": 0.1,
"right": 0.8999999999999999
}
}, {
"type": "numericProp",
"name": "Medio",
"id": 1,
"interval": {
"left": 0.8999999999999999,
"right": 1.7
}
}, {
"type": "numericProp",
"name": "Grande",
"id": 2,
"interval": {
"left": 1.7,
"right": 2.5
}
}],
"interval": {