Skip to content

Add missing parts of PropensityComputer #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions prepostprocessing/PropensityComputer.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public static void main(String[] args) {
PropensityComputer pc = new PropensityComputer();

double A = 0.55 ; double B = 1.5;
String inputFile = "../train-remapped-tfidf-relabeled.txt";
String propFile = "../inv_prop.txt";
String inputFile = args[0];
String propFile = args[1];

long totalInstances = 15511; //eurlex

SamplesPerClassCounter spcc = new SamplesPerClassCounter();
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ Performance evaluation (in Java)
Computation of Precision@k and nDCG@k for k=1,3,5
Now, we need to get final top-1, top-3 and top-5 from the output of individual models. This is done by the following :

****** IMPORTANT : Change the number of test points in DistributedPredictor.java (at line number 138) based on number of test points in the datasets ******
javac PropensityComputer.java
java PropensityComputer ../eurlex/train-remapped-tfidf-relabeled.txt ../eurlex/inv_prop.txt

****** IMPORTANT : Change the number of test points in DistributedPredictor.java (at line number 375) based on number of test points in the datasets ******

mkdir ../eurlex/final-output
javac DistributedPredictor.java
java DistributedPredictor ../eurlex/output/ ../eurlex/final-output/top1.out ../eurlex/final-output/top3.out ../eurlex/final-output/top5.out ../eurlex/final-output/top1-prop.out ../eurlex/final-output/top3-prop.out ../eurlex/final-output/top5-prop.out
java DistributedPredictor ../eurlex/output/ ../eurlex/final-output/top1.out ../eurlex/final-output/top3.out ../eurlex/final-output/top5.out ../eurlex/inv_prop.txt ../eurlex/final-output/top1-prop.out ../eurlex/final-output/top3-prop.out ../eurlex/final-output/top5-prop.out

javac MultiLabelMetrics.java
java MultiLabelMetrics ../eurlex/GS.txt ../eurlex/final-output/top1.out ../eurlex/final-output/top3.out ../eurlex/final-output/top5.out ../eurlex/inv_prop.txt ../eurlex/final-output/top1-prop.out ../eurlex/final-output/top3-prop.out ../eurlex/final-output/top5-prop.out
Expand Down