PrintWriter writeOut = new PrintWriter(fileOut);
writeOut.println("\"uid\",\"similarity\"");
if(topicType.equals("alchemy")) {
for(long uid : uids) {
FullAlchemyClassification baseline = new FullAlchemyClassification(uid);
FullLLDAClassification llda = new FullLLDAClassification(topicType,alpha,uid);
writeOut.println(uid+","+llda.cosineSimilarity(baseline));
}
} else if(topicType.equals("calais")) {
for(long uid : uids) {
FullCalaisClassification baseline = new FullCalaisClassification(uid);
FullLLDAClassification llda = new FullLLDAClassification(topicType,alpha,uid);
writeOut.println(uid+","+llda.cosineSimilarity(baseline));
}
} else if(topicType.equals("textwise")) {
for(long uid : uids) {
FullTextwiseClassification baseline = new FullTextwiseClassification(uid,false);
FullLLDAClassification llda = new FullLLDAClassification(topicType,alpha,uid);
writeOut.println(uid+","+llda.cosineSimilarity(baseline));
}
}else if(topicType.equals("textwiseproper")) {
for(long uid : uids) {
FullTextwiseClassification baseline = new FullTextwiseClassification(uid,true);
FullLLDAClassification llda = new FullLLDAClassification(topicType,alpha,uid);
writeOut.println(uid+","+llda.cosineSimilarity(baseline));
}
}
writeOut.close();
fileOut.close();
}