Skip to content

Commit

Permalink
Change topk confidence stats
Browse files Browse the repository at this point in the history
  • Loading branch information
gadelrab committed Apr 26, 2016
1 parent 55510f4 commit f23a04b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions run_experiment.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash

OUT_DIRECTORY=/GW/D5data-5/gadelrab/yago3/spmf/out_CONF
OUT_DIRECTORY=/GW/D5data-5/gadelrab/yago3/spmf/out_LIFT_TOPK

mkdir -p $OUT_DIRECTORY




SORTING_TYPE=CONF
SORTING_TYPE=LIFT


CPM_MINSUPP=0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public void showStatistics(AssocRulesExtended rules,boolean export, String fileN

st.append("--------------------------------------------------------------------\n");

st.append("RO: revised only\n");

st.append('\n');


Expand All @@ -524,7 +524,7 @@ public void showStatistics(AssocRulesExtended rules,boolean export, String fileN

}


st.append("RO: revised only\n");



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ public String toStringdlvConflict() {


public DoubleSummaryStatistics getConfidenceStats(int k, boolean exception, boolean revisedOnly){
if(exception)
return rules.stream().filter((r)-> (!revisedOnly)||r.hasExceptions()).limit(k).mapToDouble(AssocRuleWithExceptions::getRevisedConfidence).summaryStatistics();
else
return rules.stream().filter((r)-> (!revisedOnly)||r.hasExceptions()).limit(k).mapToDouble(AssocRuleWithExceptions::getConfidence).summaryStatistics();

}

public DoubleSummaryStatistics getConfidenceStats2(int k, boolean exception, boolean revisedOnly){
if(exception)
return rules.stream().limit(k).filter((r)-> (!revisedOnly)||r.hasExceptions()).mapToDouble(AssocRuleWithExceptions::getRevisedConfidence).summaryStatistics();
else
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/mpii/yagotools/YagoTaxonomy.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public Set<String> getParents(Collection<String> keys){

public static void main (String [] args){
YagoTaxonomy yt= YagoTaxonomy.getInstance();

System.out.println(yt.getParents("<wikicat_Short_films>"));
System.out.println(yt.getParents("<wikicategory_K._Lierse_S.K._players>"));
System.out.println(yt.getParents("<wordnet_hearer_110165448>"));
System.out.println(yt.getParents("<wikicat_English_fantasy_writers>"));
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/de/mpii/yagotools/YagoTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
public class YagoTypes {

String TAXONOMY_FILE_PATH="data/yagoTypes.tsv";
String TAXONOMY_FILE_PATH="data/yagoSimpleTypes.tsv";

private static YagoTypes instance;

Expand Down Expand Up @@ -44,6 +44,8 @@ public Collection<String> getType(String entity){

public static void main (String [] args){
YagoTypes yt= YagoTypes.getInstance();
System.out.println();
System.out.println(yt.getType("<Aaron_Sorkin>"));
}


Expand Down

0 comments on commit f23a04b

Please sign in to comment.