Package edu.cmu.tetrad.algcomparison
Class Comparison
java.lang.Object
edu.cmu.tetrad.algcomparison.Comparison
Script to do a comparison of a list of algorithms using a list of statistics and a list of parameters and their
values.
- Author:
- josephramsey, danielmalinsky
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
compareFromFiles
(String filePath, Algorithms algorithms, Statistics statistics, Parameters parameters) void
compareFromFiles
(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters) Compares algorithms.void
compareFromSimulations
(String resultsPath, Simulations simulations, Algorithms algorithms, Statistics statistics, Parameters parameters) void
compareFromSimulations
(String resultsPath, Simulations simulations, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters) Compares algorithms.void
configuration
(String path) void
generateReportFromExternalAlgorithms
(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters) void
generateReportFromExternalAlgorithms
(String dataPath, String resultsPath, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters) The type of graph the results are compared to.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
saveToFiles
(String dataPath, Simulation simulation, Parameters parameters) Saves simulationWrapper data.void
saveToFilesSingleSimulation
(String dataPath, Simulation simulation, Parameters parameters) Saves simulationWrapper data.void
setComparisonGraph
(Comparison.ComparisonGraph comparisonGraph) The type of graph the results are compared to.void
setParallelized
(boolean parallelized) void
setSaveCPDAGs
(boolean saveCPDAGs) void
setSaveData
(boolean saveData) void
setSaveGraphs
(boolean saveGraphs) void
setSavePags
(boolean savePags) void
setShowAlgorithmIndices
(boolean showAlgorithmIndices) void
setShowSimulationIndices
(boolean showSimulationIndices) void
setShowUtilities
(boolean showUtilities) void
setSortByUtility
(boolean sortByUtility) void
setTabDelimitedTables
(boolean tabDelimitedTables)
-
Constructor Details
-
Comparison
public Comparison()
-
-
Method Details
-
setParallelized
public void setParallelized(boolean parallelized) -
compareFromFiles
public void compareFromFiles(String filePath, Algorithms algorithms, Statistics statistics, Parameters parameters) -
compareFromFiles
public void compareFromFiles(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters) Compares algorithms.- Parameters:
dataPath
- Path to the directory where data and graph files have been saved.resultsPath
- Path to the file where the results should be stored.algorithms
- The list of algorithms to be compared.
-
generateReportFromExternalAlgorithms
public void generateReportFromExternalAlgorithms(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters) -
generateReportFromExternalAlgorithms
public void generateReportFromExternalAlgorithms(String dataPath, String resultsPath, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters) -
compareFromSimulations
public void compareFromSimulations(String resultsPath, Simulations simulations, Algorithms algorithms, Statistics statistics, Parameters parameters) -
compareFromSimulations
public void compareFromSimulations(String resultsPath, Simulations simulations, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters) Compares algorithms.- Parameters:
resultsPath
- Path to the file where the output should be printed.simulations
- The list of simulationWrapper that is used to generate graphs and data for the comparison.algorithms
- The list of algorithms to be compared.statistics
- The list of statistics on which to compare the algorithm, and their utility weights.
-
saveToFiles
Saves simulationWrapper data.- Parameters:
dataPath
- The path to the directory where the simulationWrapper data should be saved.simulation
- The simulate used to generate the graphs and data.parameters
- The parameters to be used in the simulationWrapper.
-
saveToFilesSingleSimulation
public void saveToFilesSingleSimulation(String dataPath, Simulation simulation, Parameters parameters) Saves simulationWrapper data.- Parameters:
dataPath
- The path to the directory where the simulationWrapper data should be saved.simulation
- The simulate used to generate the graphs and data.parameters
- The parameters to be used in the simulationWrapper.
-
configuration
-
isShowSimulationIndices
public boolean isShowSimulationIndices() -
setShowSimulationIndices
public void setShowSimulationIndices(boolean showSimulationIndices) -
isShowAlgorithmIndices
public boolean isShowAlgorithmIndices() -
setShowAlgorithmIndices
public void setShowAlgorithmIndices(boolean showAlgorithmIndices) -
isShowUtilities
public boolean isShowUtilities()- Returns:
- True iff a column of utilities marked "W" should be shown in the output.
-
setShowUtilities
public void setShowUtilities(boolean showUtilities) - Parameters:
showUtilities
- True iff a column of utilities marked "W" should be shown in the output.
-
isSortByUtility
public boolean isSortByUtility()- Returns:
- True iff the output should be sorted by utility.
-
setSortByUtility
public void setSortByUtility(boolean sortByUtility) - Parameters:
sortByUtility
- true iff the output should be sorted by utility.
-
isSaveCPDAGs
public boolean isSaveCPDAGs()- Returns:
- True if CPDAGs should be saved out.
-
setSaveCPDAGs
public void setSaveCPDAGs(boolean saveCPDAGs) - Parameters:
saveCPDAGs
- True if CPDAGs should be saved out.
-
isSavePags
public boolean isSavePags()- Returns:
- True if CPDAGs should be saved out.
-
setSavePags
public void setSavePags(boolean savePags) -
isSaveData
public boolean isSaveData()- Returns:
- True if CPDAGs should be saved out.
-
setSaveData
public void setSaveData(boolean saveData) -
isTabDelimitedTables
public boolean isTabDelimitedTables()- Returns:
- True iff tables should be tab delimited (e.g. for easy pasting into Excel).
-
setTabDelimitedTables
public void setTabDelimitedTables(boolean tabDelimitedTables) - Parameters:
tabDelimitedTables
- True iff tables should be tab delimited (e.g. for easy pasting into Excel).
-
isSaveGraphs
public boolean isSaveGraphs()- Returns:
- True if all graphs should be saved to files.
-
setSaveGraphs
public void setSaveGraphs(boolean saveGraphs) - Parameters:
saveGraphs
- True if all graphs should be saved to files.
-
getComparisonGraph
The type of graph the results are compared to. -
setComparisonGraph
The type of graph the results are compared to.
-