Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

187 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Selection of Hyper-Parameters via the Use of Softened Profile Likelihood

Version 1.0

This repository provides an implementation for the paper "Automatic selection of hyper-parameters via the use of softened profile likelihood". It supports both quadratic polynomial (QP) and two-layer neural network (2LNN) parameterizations, along with visualization and representative point identification.

For details, see Automatic selection of hyper-parameters via the use of softened profile likelihood. [arXiv:2510.25632]

⚠️ Note: Version 1.0 is tested for hyper-parameter dimension ( m = 2 ).

📂 Data Format

The input data must be provided as a CSV file:

  • Columns 1 to m contain hyper-parameter values.
  • Column m + 1 contains the performance metric.

Important: All values in the performance metric column must have the same sign.

⚙️ Installation

Clone the repository and install the required dependencies:

python -m pip install -r requirements.txt

🚀 Usage

Run the main script from the project root directory.

Basic Command

python -m scripts.run --data <dataset.csv> [options]

Command-Line Arguments

Argument Description Default
--data <path> (Required) Path to the input dataset CSV file. None
--transform Applies transformation (logarithmic scaling followed by standard normalization) to the input data before analysis. False
--param <type> Specifies the parameterization. Choices: 'qp' for QP or 'nn' for 2LNN. 'qp'
--points Identifies and outputs representative points. False
--plot <type> Specifies the plot style for visualizing the boundary curve. Choices: 'c' for a contour plot (e.g. Fig. 2(a), Section 3.1), 's' for a scatter plot (e.g. Fig 5(a), Section 5), or 'n' to disable plotting. When 'c' is selected together with --points, the points are also displayed. 'n'
--save_path <path> Specifies a file path to save the generated plot. None
--restarts <int> Number of restarts for the BFGS optimization algorithm (used with 'qp'). 10
--epochs <int> Number of training epochs for the neural network model (used with 'nn'). 1000

💡 Example

The following example is illustrated in Section 3.1 of the paper.

Generalized elastic nets on Canadian temperature data

  1. QP boundary + representative point (Section 3.1, Figure 2 (a))
python -m scripts.run --data dataset/CANweather_gen_BIC.csv --transform --points --plot
  1. 2LNN boundary + representative point (Section 3.1, Figure 2 (b))
python -m scripts.run --data dataset/CANweather_gen_BIC.csv --transform --param 'nn' --points --plot

Acknowledgment: We thank the authors of [Jian et al. (2024)] for allowing us to include their dataset in this example.

About

The code for "Automatic selection of hyper-parameters via the use of softened profile likelihood".

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages