Package org.aksw.palmetto.evaluate
Class RankBasedSummarizer
- java.lang.Object
-
- org.aksw.palmetto.evaluate.RankBasedSummarizer
-
public class RankBasedSummarizer extends Object
Generates summaries for single dimensions using the ranks of coherence calculations. It assumes that the data is a CSV file with the following positions:- 0: Probability estimation type
- 1: Window size (or empty if no window)
- 2: Segmentation type
- 3: Indirect measure type (or empty)
- 4: Gamma value of the indirect measure type (or empty)
- 5: Direct measure type
- 6: Aggregation type
- 7+: Correlation values for datasets
- last: Average correlation value
- Author:
- Michael Röder (michael.roeder@uni-paderborn.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected static intCSV_LINE_CORR_AVGprotected static intCSV_LINE_CORR_START
-
Constructor Summary
Constructors Constructor Description RankBasedSummarizer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private CoherenceValueArraycalculateLeftOutAverage(CoherenceValueArray coherence, int leftOutId)static voidmain(String[] args)private voidprintCoherence(CoherenceValue coherenceValue, String prefix, PrintStream pout)private voidprintResults(Map<String,CoherenceValue> results, File outputDirectory, String outputFileName)private static List<CoherenceValueArray>readFile(File inputFile)voidrun(File inputFile, File outputDirectory, String[] datasetNames)protected voidupdateMap(CoherenceValue newCoherence, Map<String,CoherenceValue> bestResultsMap, String key)
-
-
-
Field Detail
-
CSV_LINE_CORR_START
protected static final int CSV_LINE_CORR_START
- See Also:
- Constant Field Values
-
CSV_LINE_CORR_AVG
protected static final int CSV_LINE_CORR_AVG
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException, CloneNotSupportedException
-
run
public void run(File inputFile, File outputDirectory, String[] datasetNames) throws IOException, CloneNotSupportedException
-
readFile
private static List<CoherenceValueArray> readFile(File inputFile) throws IOException
- Throws:
IOException
-
calculateLeftOutAverage
private CoherenceValueArray calculateLeftOutAverage(CoherenceValueArray coherence, int leftOutId) throws CloneNotSupportedException
- Throws:
CloneNotSupportedException
-
updateMap
protected void updateMap(CoherenceValue newCoherence, Map<String,CoherenceValue> bestResultsMap, String key) throws CloneNotSupportedException
- Throws:
CloneNotSupportedException
-
printResults
private void printResults(Map<String,CoherenceValue> results, File outputDirectory, String outputFileName) throws IOException
- Throws:
IOException
-
printCoherence
private void printCoherence(CoherenceValue coherenceValue, String prefix, PrintStream pout)
-
-