Utils

This section of the documentation is dedicated to explaining the various utility functions used throughout the package.

Index

Contents

ModelSelectionGUI.get_pkg_versionMethod
get_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")
source
ModelSelectionGUI.save_tempfileMethod
save_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))
source
ModelSelectionGUI.get_csv_filenameMethod
get_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)
source
ModelSelectionGUI.get_csv_filenameMethod
get_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)
source
ModelSelectionGUI.get_txt_filenameMethod
get_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")
source
ModelSelectionGUI.get_csv_from_resultMethod
get_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)
source
ModelSelectionGUI.get_parametersMethod
get_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))
source
ModelSelectionGUI.get_request_job_idMethod
get_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)
source
ModelSelectionGUI.get_request_filehashMethod
get_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)
source