Package edu.cmu.tetrad.algcomparison
Class TimeoutComparison
java.lang.Object
edu.cmu.tetrad.algcomparison.TimeoutComparison
Nov 14, 2017 12:00:31 PM
- Version:
- $Id: $Id
- Author:
- Kevin V. Bui (kvb2@pitt.edu)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enum of graph types to compare. -
Constructor Summary
ConstructorsConstructorDescriptionRepresents a comparison of two time values for timeout purposes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
compareFromFiles
(String filePath, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) compareFromFiles.void
compareFromFiles
(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) Compares algorithms.void
compareFromSimulations
(String resultsPath, Simulations simulations, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) compareFromSimulations.void
compareFromSimulations
(String resultsPath, Simulations simulations, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) Compares algorithms.void
configuration
(String path) configuration.void
generateReportFromExternalAlgorithms
(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) generateReportFromExternalAlgorithms.void
generateReportFromExternalAlgorithms
(String dataPath, String resultsPath, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) generateReportFromExternalAlgorithms.The type of graph the results are compared to.boolean
isCopyData.boolean
isParallelized.boolean
isSaveCPDAGs.boolean
isSaveGraphs.boolean
isSavePags.boolean
isShowUtilities.boolean
isSortByUtility.boolean
isTabDelimitedTables.void
saveToFiles
(String dataPath, Simulation simulation, Parameters parameters) Saves simulationWrapper data.void
setComparisonGraph
(TimeoutComparison.ComparisonGraph comparisonGraph) The type of graph the results are compared to.void
setCopyData
(boolean copyData) Setter for the fieldcopyData
.void
setParallelized
(boolean parallelized) Setter for the fieldparallelized
.void
setSaveCPDAGs
(boolean saveCPDAGs) Setter for the fieldsaveCPDAGs
.void
setSaveGraphs
(boolean saveGraphs) Setter for the fieldsaveGraphs
.void
setSavePags
(boolean savePags) Setter for the fieldsavePags
.void
setShowUtilities
(boolean showUtilities) Setter for the fieldshowUtilities
.void
setSortByUtility
(boolean sortByUtility) Setter for the fieldsortByUtility
.void
setTabDelimitedTables
(boolean tabDelimitedTables) Setter for the fieldtabDelimitedTables
.
-
Constructor Details
-
TimeoutComparison
public TimeoutComparison()Represents a comparison of two time values for timeout purposes.The TimeoutComparison class can be used to compare two time values and determine if they have exceeded a specified timeout period.
-
-
Method Details
-
compareFromFiles
public void compareFromFiles(String filePath, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) compareFromFiles.
- Parameters:
filePath
- aString
objectalgorithms
- aAlgorithms
objectstatistics
- aStatistics
objectparameters
- aParameters
objecttimeout
- a longunit
- aTimeUnit
object
-
compareFromFiles
public void compareFromFiles(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) 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.statistics
- The list of statistics on which to compare the algorithm, and their utility weights.parameters
- The list of parameters and their values.timeout
- a longunit
- aTimeUnit
object
-
generateReportFromExternalAlgorithms
public void generateReportFromExternalAlgorithms(String dataPath, String resultsPath, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) generateReportFromExternalAlgorithms.
- Parameters:
dataPath
- aString
objectresultsPath
- aString
objectalgorithms
- aAlgorithms
objectstatistics
- aStatistics
objectparameters
- aParameters
objecttimeout
- a longunit
- aTimeUnit
object
-
generateReportFromExternalAlgorithms
public void generateReportFromExternalAlgorithms(String dataPath, String resultsPath, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) generateReportFromExternalAlgorithms.
- Parameters:
dataPath
- aString
objectresultsPath
- aString
objectoutputFileName
- aString
objectalgorithms
- aAlgorithms
objectstatistics
- aStatistics
objectparameters
- aParameters
objecttimeout
- a longunit
- aTimeUnit
object
-
compareFromSimulations
public void compareFromSimulations(String resultsPath, Simulations simulations, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) compareFromSimulations.
- Parameters:
resultsPath
- aString
objectsimulations
- aSimulations
objectalgorithms
- aAlgorithms
objectstatistics
- aStatistics
objectparameters
- aParameters
objecttimeout
- a longunit
- aTimeUnit
object
-
compareFromSimulations
public void compareFromSimulations(String resultsPath, Simulations simulations, String outputFileName, Algorithms algorithms, Statistics statistics, Parameters parameters, long timeout, TimeUnit unit) 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.outputFileName
- aString
objectalgorithms
- The list of algorithms to be compared.statistics
- The list of statistics on which to compare the algorithm, and their utility weights.parameters
- aParameters
objecttimeout
- a longunit
- aTimeUnit
object
-
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.
-
configuration
-
isShowUtilities
public boolean isShowUtilities()isShowUtilities.
- Returns:
- True iff a column of utilities marked "W" should be shown in the output.
-
setShowUtilities
public void setShowUtilities(boolean showUtilities) Setter for the field
showUtilities
.- Parameters:
showUtilities
- True iff a column of utilities marked "W" should be shown in the output.
-
isSortByUtility
public boolean isSortByUtility()isSortByUtility.
- Returns:
- True iff the output should be sorted by utility.
-
setSortByUtility
public void setSortByUtility(boolean sortByUtility) Setter for the field
sortByUtility
.- Parameters:
sortByUtility
- true iff the output should be sorted by utility.
-
isParallelized
public boolean isParallelized()isParallelized.
- Returns:
- a boolean
-
setParallelized
public void setParallelized(boolean parallelized) Setter for the field
parallelized
.- Parameters:
parallelized
- a boolean
-
isSaveCPDAGs
public boolean isSaveCPDAGs()isSaveCPDAGs.
- Returns:
- True if CPDAGs should be saved out.
-
setSaveCPDAGs
public void setSaveCPDAGs(boolean saveCPDAGs) Setter for the field
saveCPDAGs
.- Parameters:
saveCPDAGs
- True if CPDAGs should be saved out.
-
isSavePags
public boolean isSavePags()isSavePags.
- Returns:
- True if patterns should be saved out.
-
setSavePags
public void setSavePags(boolean savePags) Setter for the field
savePags
.- Parameters:
savePags
- True if patterns should be saved out.
-
isTabDelimitedTables
public boolean isTabDelimitedTables()isTabDelimitedTables.
- Returns:
- True iff tables should be tab delimited (e.g. for easy pasting into Excel).
-
setTabDelimitedTables
public void setTabDelimitedTables(boolean tabDelimitedTables) Setter for the field
tabDelimitedTables
.- Parameters:
tabDelimitedTables
- True iff tables should be tab delimited (e.g. for easy pasting into Excel).
-
isSaveGraphs
public boolean isSaveGraphs()isSaveGraphs.
- Returns:
- True if all graphs should be saved to files.
-
setSaveGraphs
public void setSaveGraphs(boolean saveGraphs) Setter for the field
saveGraphs
.- Parameters:
saveGraphs
- True if all graphs should be saved to files.
-
isCopyData
public boolean isCopyData()isCopyData.
- Returns:
- True if data should be copied before analyzing it.
-
setCopyData
public void setCopyData(boolean copyData) Setter for the field
copyData
.- Parameters:
copyData
- True if data should be copied before analyzing it.
-
getComparisonGraph
The type of graph the results are compared to.- Returns:
- a
TimeoutComparison.ComparisonGraph
object
-
setComparisonGraph
The type of graph the results are compared to.- Parameters:
comparisonGraph
- aTimeoutComparison.ComparisonGraph
object
-