Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed May 1, 2024
1 parent 8e49c8c commit cf1970d
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 2,190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.Map;

import fr.inria.coming.core.entities.interfaces.IRevisionPair;
import fr.inria.prophet4j.feature.extended.ExtendedFeatureCross;
import org.apache.log4j.Logger;

import com.google.gson.JsonObject;
Expand All @@ -26,7 +27,6 @@
import fr.inria.coming.main.ComingProperties;
import fr.inria.prophet4j.feature.Feature;
import fr.inria.prophet4j.feature.FeatureCross;
import fr.inria.prophet4j.feature.original.OriginalFeatureCross;
import fr.inria.prophet4j.utility.CodeDiffer;
import fr.inria.prophet4j.utility.Option;
import fr.inria.prophet4j.utility.Option.FeatureOption;
Expand Down Expand Up @@ -123,13 +123,12 @@ public JsonObject getSimleP4JJSON(Option option, File target, List<FeatureMatrix

for (FeatureCross featureCross : featureCrosses) {
List<Feature> simpleP4JFeatures= featureCross.getSimpleP4JFeatures();
OriginalFeatureCross ofc = (OriginalFeatureCross) featureCross;
for(Feature f: simpleP4JFeatures) {
Boolean positive = ofc.containFeature(f);
Boolean positive = featureCross.containFeature(f);
if(numericalIndixator) {
jsonfile.addProperty("P4J_"+ofc.getCrossType()+"_"+f, positive?"1":"0");
jsonfile.addProperty("P4J_"+f, positive?"1":"0");
}else {
jsonfile.addProperty("P4J_"+ofc.getCrossType()+"_"+f, positive?"true":"false");
jsonfile.addProperty("P4J_"+f, positive?"true":"false");
}
}

Expand All @@ -156,7 +155,7 @@ public JsonObject genVectorsCSV(Option option, File patchedFile, List<FeatureMat
//Initial all vector as 0.
for (int idx = 0; idx < parameterVector.size(); idx++) {
FeatureCross featureCross;
featureCross = new OriginalFeatureCross(idx);
featureCross = new ExtendedFeatureCross(idx);
header.add(featureCross.getFeatures().toString());
values.add("0");
}
Expand Down
135 changes: 0 additions & 135 deletions src/main/java/fr/inria/prophet4j/feature/original/OriginalFeature.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit cf1970d

Please sign in to comment.