Changeset 38
- Timestamp:
- 06/11/15 11:27:33 (9 years ago)
- Location:
- trunk/CrossPare
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/Runner.java
r32 r38 26 26 public static void main(String[] args) { 27 27 new TextConsole(Level.FINE); 28 final int concurrentThreads = Runtime.getRuntime().availableProcessors() ;28 final int concurrentThreads = Runtime.getRuntime().availableProcessors()-2; 29 29 final ExecutorService threadPool = Executors.newFixedThreadPool(concurrentThreads); 30 30 for( String arg : args ) { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataprocessing/ZScoreNormalization.java
r37 r38 44 44 45 45 private void normalize(Instances instances) { 46 instances.toString(); 46 47 final Attribute classAttribute = instances.classAttribute(); 47 48 … … 56 57 } 57 58 } 58 59 59 for( int i=0 ; i<instances.numAttributes(); i++) { 60 60 if( !instances.attribute(i).equals(classAttribute) ) { 61 for( int j=0 ; j<instances.num Attributes() ; j++ ) {61 for( int j=0 ; j<instances.numInstances() ; j++ ) { 62 62 Instance inst = instances.get(i); 63 double newValue = (inst.value(j)-means[j])/stddevs[j]; 64 inst.setValue(j, newValue); 63 double newValue = (inst.value(i)-means[i])/stddevs[i]; 64 if( newValue==Double.NaN ) { 65 System.out.println("foooooo"); 66 } 67 inst.setValue(i, newValue); 65 68 } 66 69 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataprocessing/ZScoreTargetNormalization.java
r37 r38 44 44 for( int i=0 ; i<testdata.numInstances() ; i++ ) { 45 45 Instance instance = testdata.instance(i); 46 for( int j=0 ; j<testdata.num Instances() ; j++ ) {46 for( int j=0 ; j<testdata.numAttributes() ; j++ ) { 47 47 if( testdata.attribute(j)!=classAttribute ) { 48 48 instance.setValue(j, instance.value(j)-meanTest[j]/stddevTest[j]); … … 85 85 for( int i=0 ; i<testdata.numInstances() ; i++ ) { 86 86 Instance instance = testdata.instance(i); 87 for( int j=0 ; j<testdata.num Instances() ; j++ ) {87 for( int j=0 ; j<testdata.numAttributes() ; j++ ) { 88 88 if( testdata.attribute(j)!=classAttribute ) { 89 89 instance.setValue(j, instance.value(j)-meanTest[j]/stddevTest[j]); -
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/SetWiseEMContextSelection.java
r29 r38 28 28 public class SetWiseEMContextSelection implements ISetWiseDataselectionStrategy { 29 29 30 private String parameters;31 30 private String[] project_context_factors; // = new String[]{"TND", "TNC", "TNF", "TLOC"}; 32 31 -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/RandomClass.java
r34 r38 2 2 3 3 import java.util.Random; 4 import java.util.logging.Level;5 4 6 import de.ugoe.cs.util.console.Console;7 5 import weka.classifiers.AbstractClassifier; 8 6 import weka.classifiers.Classifier;
Note: See TracChangeset
for help on using the changeset viewer.