slope 6.6.0
Loading...
Searching...
No Matches
slope::CvConfig Struct Reference

Configuration settings for cross-validation. More...

#include <cv.h>

Public Attributes

int n_folds = 10
 Number of folds for cross-validation (default: 10).
int n_repeats = 1
 Number of times to repeat the cross-validation (default: 1).
std::string metric = "mse"
 Evaluation metric used for model assessment (default: "mse").
uint64_t random_seed = 42
 Seed for reproducible fold assignments across platforms (default: 42).
bool copy_x = true
 Whether to copy the design matrix for each fold (default: true).
std::map< std::string, std::vector< double > > hyperparams
 Map of hyperparameter names to vectors of values to evaluate.
std::map< std::string, std::vector< double > > default_hyperparams
 Map of hyperparameter names to vectors of values to evaluate.
std::optional< std::vector< std::vector< std::vector< int > > > > predefined_folds
 Optional user-defined fold assignments for custom cross-validation splits.

Detailed Description

Configuration settings for cross-validation.

This struct specifies the parameters used to control the cross-validation process, including fold count, evaluation metric, random seed, and hyperparameter grid.

Definition at line 91 of file cv.h.

Member Data Documentation

◆ copy_x

bool slope::CvConfig::copy_x = true

Whether to copy the design matrix for each fold (default: true).

Definition at line 106 of file cv.h.

◆ default_hyperparams

std::map<std::string, std::vector<double> > slope::CvConfig::default_hyperparams
Initial value:
= {
{ "q", { 0.1 } },
{ "gamma", { 0.0 } },
}

Map of hyperparameter names to vectors of values to evaluate.

Definition at line 112 of file cv.h.

◆ hyperparams

std::map<std::string, std::vector<double> > slope::CvConfig::hyperparams

Map of hyperparameter names to vectors of values to evaluate.

Definition at line 109 of file cv.h.

◆ metric

std::string slope::CvConfig::metric = "mse"

Evaluation metric used for model assessment (default: "mse").

Definition at line 100 of file cv.h.

◆ n_folds

int slope::CvConfig::n_folds = 10

Number of folds for cross-validation (default: 10).

Definition at line 94 of file cv.h.

◆ n_repeats

int slope::CvConfig::n_repeats = 1

Number of times to repeat the cross-validation (default: 1).

Definition at line 97 of file cv.h.

◆ predefined_folds

std::optional<std::vector<std::vector<std::vector<int> > > > slope::CvConfig::predefined_folds

Optional user-defined fold assignments for custom cross-validation splits.

Definition at line 118 of file cv.h.

◆ random_seed

uint64_t slope::CvConfig::random_seed = 42

Seed for reproducible fold assignments across platforms (default: 42).

Definition at line 103 of file cv.h.


The documentation for this struct was generated from the following file:
  • include/slope/cv.h