Changeset 10 for trunk/CrossPare
- Timestamp:
- 08/25/14 12:52:14 (10 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataprocessing/DataGravitation.java
r2 r10 7 7 import weka.core.Instances; 8 8 9 // TODO comment 9 /** 10 * Implements an approach for data weighting suggested after Y. Ma, G. Luo, X. Zeng, and A. Chen: Transfer learning for 11 * cross-company software defect prediction. The instances are weighted higher, the more attributes are within the range they are in the training data. 12 * @author Steffen Herbold 13 */ 10 14 public class DataGravitation implements IProcessesingStrategy, ISetWiseProcessingStrategy { 11 15 -
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataprocessing/InformationGainFilter.java
r2 r10 62 62 63 63 /** 64 * Internal helper function . TODO65 * @param testdata 66 * @param traindata 67 * @param removeFromTest 64 * Internal helper function for the application of the filter to both all data set as well as a single data set. 65 * @param testdata data of the target product 66 * @param traindata data of the training product 67 * @param removeFromTest defines whether the attributes shall be removed from the test data as well or not 68 68 */ 69 69 private void apply(Instances testdata, Instances traindata, boolean removeFromTest) { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataprocessing/Undersampling.java
r2 r10 7 7 import weka.filters.supervised.instance.Resample; 8 8 9 // TODO comment 9 /** 10 * Implements undersampling, a strategy for handling bias in data. In case there are less positive samples (i.e. defect-prone) samples in the 11 * data than negative samples (i.e. non-defect-prone), the non-defect-prone entities are sampled such thatthe number of defect-prone and non-defect-prone instances is the same afterwards. 12 * @author Steffen Herbold 13 */ 10 14 public class Undersampling implements IProcessesingStrategy, 11 15 ISetWiseProcessingStrategy { … … 21 25 } 22 26 23 27 /* 28 * (non-Javadoc) 29 * @see de.ugoe.cs.cpdp.dataprocessing.ISetWiseProcessingStrategy#apply(weka.core.Instances, org.apache.commons.collections4.list.SetUniqueList) 30 */ 24 31 @Override 25 32 public void apply(Instances testdata, SetUniqueList<Instances> traindataSet) { … … 29 36 } 30 37 38 /* 39 * (non-Javadoc) 40 * @see de.ugoe.cs.cpdp.dataprocessing.IProcessesingStrategy#apply(weka.core.Instances, weka.core.Instances) 41 */ 31 42 @Override 32 43 public void apply(Instances testdata, Instances traindata) { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/BaggingTraining.java
r2 r10 58 58 public double classifyInstance(Instance instance) { 59 59 if( classifiers==null ) { 60 return 0.0; // TODO check how WEKA expects classifyInstance to behave if no classifier exists yet60 return 0.0; 61 61 } 62 62 -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaBaggingTraining2.java
r2 r10 67 67 public double classifyInstance(Instance instance) { 68 68 if( classifiers==null ) { 69 return 0.0; // TODO check how WEKA expects classifyInstance to behave if no classifier exists yet69 return 0.0; 70 70 } 71 71
Note: See TracChangeset
for help on using the changeset viewer.