Utils
This section of the documentation is dedicated to explaining the various utility functions used throughout the package.
Index
ModelSelectionGUI.get_csv_filenameModelSelectionGUI.get_csv_filenameModelSelectionGUI.get_csv_from_resultModelSelectionGUI.get_parametersModelSelectionGUI.get_pkg_versionModelSelectionGUI.get_request_filehashModelSelectionGUI.get_request_job_idModelSelectionGUI.get_txt_filenameModelSelectionGUI.save_tempfile
Contents
ModelSelectionGUI.get_pkg_version — Methodget_pkg_version(name::AbstractString)Get the installed version of a Julia package by its name.
Parameters
name::AbstractString: The name of the Julia package.
Returns
String: The version of the specified package.
Example
get_pkg_version("ModelSelection")ModelSelectionGUI.save_tempfile — Methodsave_tempfile(name::String, data::DataFrame)Save a DataFrame to a temporary CSV file.
Parameters
name::String: The name of the temporary file.data::DataFrame: The DataFrame to save.
Returns
String: The filepath where the DataFrame was saved.
Example
save_tempfile("temp.csv", DataFrame(A = 1:3, B = 4:6))ModelSelectionGUI.get_csv_filename — Methodget_csv_filename(filename::String, result::ModelSelection.AllSubsetRegression.AllSubsetRegressionResult)Get a filename for a CSV file that stores the results of an all subset regression.
Parameters
filename::String: The original filename.result::ModelSelection.AllSubsetRegression.AllSubsetRegressionResult: The result of the all subset regression.
Returns
String: The filename for the CSV file.
Example
get_csv_filename("data.csv", result)ModelSelectionGUI.get_csv_filename — Methodget_csv_filename(filename::String, result::ModelSelection.CrossValidation.CrossValidationResult)Get a filename for a CSV file that stores the results of cross validation.
Parameters
filename::String: The original filename.result::ModelSelection.CrossValidation.CrossValidationResult: The result of cross validation.
Returns
String: The filename for the CSV file.
Example
get_csv_filename("data.csv", result)ModelSelectionGUI.get_txt_filename — Methodget_txt_filename(filename::String)Get a filename for a TXT file that stores summary data.
Parameters
filename::String: The original filename.
Returns
String: The filename for the TXT file.
Example
get_txt_filename("data.csv")ModelSelectionGUI.get_csv_from_result — Methodget_csv_from_result(filename::String, result::ModelSelectionResult)Get CSV formatted data from a result of a model selection process.
Parameters
filename::String: The original filename.result::ModelSelectionResult: The result of the model selection process.
Returns
Dict{Symbol,Any}: A dictionary containing the filename and CSV data.
Example
get_csv_from_result("data.csv", result)ModelSelectionGUI.get_parameters — Methodget_parameters(raw_payload::Dict{String,Any})Convert a dictionary with string keys to a dictionary with symbol keys.
Parameters
raw_payload::Dict{String,Any}: A dictionary with string keys.
Returns
Dict{Symbol,Any}: A dictionary with the same keys and values, but with the keys converted to symbols.
Example
get_parameters(Dict("a" => 1, "b" => 2))ModelSelectionGUI.get_request_job_id — Methodget_request_job_id(params::Any)Get the job id from a set of parameters.
Parameters
params::Any: The parameters to search.
Returns
String: The job id if it exists.Nothing: If the id does not exist.
Example
get_request_job_id(params)ModelSelectionGUI.get_request_filehash — Methodget_request_filehash(params::Any)Get the file hash from a set of parameters.
Parameters
params::Any: The parameters to search.
Returns
String: The hash id if it exists.Nothing: If the hsh does not exist.
Example
get_request_filehash(params)