Changeset 81
- Timestamp:
- 05/11/16 08:54:05 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/AbstractCharacteristicSelection.java
r41 r81 23 23 import weka.core.Instance; 24 24 import weka.core.Instances; 25 import weka.core.Utils; 25 26 import weka.experiment.Stats; 26 27 import weka.filters.Filter; … … 96 97 instanceValues[i * characteristics.length + j] = testdata.variance(j); 97 98 } 99 else if ("max".equals(characteristics[j])) { 100 instanceValues[i * characteristics.length + j] = stats.max; 101 } 102 else if ("min".equals(characteristics[j])) { 103 instanceValues[i * characteristics.length + j] = stats.min; 104 } 105 else if ("median".equals(characteristics[j])) { 106 instanceValues[i * characteristics.length + j] = Utils.kthSmallestValue(testdata.attributeToDoubleArray(i), testdata.size()/2); 107 } 98 108 else { 99 109 throw new RuntimeException("Unkown distributional characteristic: " + … … 119 129 } 120 130 else if ("var".equals(characteristics[j])) { 121 instanceValues[i * characteristics.length + j] = testdata.variance(j); 131 instanceValues[i * characteristics.length + j] = traindata.variance(j); 132 } 133 else if ("max".equals(characteristics[j])) { 134 instanceValues[i * characteristics.length + j] = stats.max; 135 } 136 else if ("min".equals(characteristics[j])) { 137 instanceValues[i * characteristics.length + j] = stats.min; 138 } 139 else if ("median".equals(characteristics[j])) { 140 instanceValues[i * characteristics.length + j] = Utils.kthSmallestValue(traindata.attributeToDoubleArray(i), traindata.size()/2); 122 141 } 123 142 else {
Note: See TracChangeset
for help on using the changeset viewer.