public void fillRestricted(boolean baseline, String topicType, int topTopics, double alpha) {
List<Map<String,Double>> classifications = new ArrayList<Map<String,Double>>();
if(baseline) {
if(topicType.equals("alchemy")) {
for(long id : Tools.getCSVUserIDs()) {
FullAlchemyClassification c = new FullAlchemyClassification(id);
Map<String,Double> classification = new HashMap<String,Double>();
int topicCount = 0;
for(String topic : c.getCategorySet()) {
if(topicCount == topTopics) break;
classification.put(topic, c.getScore(topic));
topicCount++;
}
classifications.add(classification);
}
} else if(topicType.equals("calais")) {
for(long id : Tools.getCSVUserIDs()) {
FullCalaisClassification c = new FullCalaisClassification(id);
Map<String,Double> classification = new HashMap<String,Double>();
int topicCount = 0;
for(String topic : c.getCategorySet()) {
if(topicCount == topTopics) break;
if(topic.equals("Other")) continue;
classification.put(topic, c.getScore(topic));
topicCount++;
}
classifications.add(classification);
}
} else if(topicType.equals("textwise")) {
for(long id : Tools.getCSVUserIDs()) {
FullTextwiseClassification c = new FullTextwiseClassification(id,true);
Map<String,Double> classification = new HashMap<String,Double>();
int topicCount = 0;
for(String topic : c.getCategorySet()) {
if(topicCount == topTopics) break;
classification.put(topic, c.getScore(topic));
topicCount++;
}
classifications.add(classification);
}
}
} else {
for(long id : Tools.getCSVUserIDs()) {
FullLLDAClassification c = new FullLLDAClassification(topicType,alpha,id);
Map<String,Double> classification = new HashMap<String,Double>();
int topicCount = 0;
for(String topic : c.getCategorySet()) {
if(topicCount == topTopics) break;
if(topic.equals("Other")) continue;
classification.put(topic, c.getScore(topic));
topicCount++;
}
classifications.add(classification);
}
}