Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion man/Population.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sample/param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cv:

importance:
compute_importance: false # Should importance be computed?
n_permutations_oob: 100 # Number of permutations per feature for OOB importance.
n_permutations_mda: 100 # Number of permutations per feature for MDA importance.
scaled_importance: true # Scale importance by feature prevalence inside folds.
importance_aggregation: mean # Aggregation method for importances: "mean" or "median".

Expand Down Expand Up @@ -93,7 +93,7 @@ beam:
method: LimitedExhaustive # LimitedExhaustive: generate all combinations (k out of features_to_keep). ParallelForward: extend each extendable model by one feature chosen from features_to_keep.
kmin: 2 # Number of variables used in the initial population.
kmax: 100 # Maximum number of variables to consider in a single model (variable count limit for beam algorithm).
best_models_ci_alpha: 1e-5 # Alpha for the family of best models confidence interval based on the best fit. Smaller alpha -> larger best_model range.
best_models_criterion: 10 # If <=1: alpha for FBM confidence interval. If >1: keep that many best models per k. Smaller alpha -> larger best_model range.
max_nb_of_models: 20000 # Limits the number of features_to_keep at each epoch according to the number of models made possible by them (truncated according to significance).

mcmc:
Expand Down
4 changes: 2 additions & 2 deletions src/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = 'rgpredomicsR'

[dependencies]
extendr-api = '*'
gpredomics = { git = "https://github.com/predomics/gpredomics.git", tag="v0.7.5" }
gpredomics = { git = "https://github.com/predomics/gpredomics.git", tag="v0.7.7" }
flexi_logger = "0.27"
chrono = "0.4"
log = "0.4"
Expand Down
28 changes: 14 additions & 14 deletions src/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ impl Param {
("max_epochs", Robj::from(self.intern.ga.max_epochs)),
("min_epochs", Robj::from(self.intern.ga.min_epochs)),
("max_age_best_model", Robj::from(self.intern.ga.max_age_best_model)),
("kmin", Robj::from(self.intern.ga.kmin)),
("kmax", Robj::from(self.intern.ga.kmax)),
("kmin", Robj::from(self.intern.ga.k_min)),
("kmax", Robj::from(self.intern.ga.k_max)),
("select_elite_pct", Robj::from(self.intern.ga.select_elite_pct)),
("select_niche_pct", Robj::from(self.intern.ga.select_niche_pct)),
("select_random_pct", Robj::from(self.intern.ga.select_random_pct)),
Expand All @@ -292,8 +292,8 @@ impl Param {
// Convert GA fields
let beam = List::from_pairs(vec![
("method", Robj::from(format!("{:?}", self.intern.beam.method))),
("kmin", Robj::from(self.intern.beam.kmin)),
("kmax", Robj::from(self.intern.beam.kmax)),
("kmin", Robj::from(self.intern.beam.k_start)),
("kmax", Robj::from(self.intern.beam.k_stop)),
("best_models_criterion", Robj::from(self.intern.beam.best_models_criterion)),
("max_nb_of_models", Robj::from(self.intern.beam.max_nb_of_models)),
]);
Expand All @@ -311,7 +311,7 @@ impl Param {
// Convert Importance fields
let importance = List::from_pairs(vec![
("compute_importance", Robj::from(self.intern.importance.compute_importance)),
("n_permutations_oob",Robj::from(self.intern.importance.n_permutations_oob)),
("n_permutations_mda",Robj::from(self.intern.importance.n_permutations_mda)),
("scaled_importance", Robj::from(self.intern.importance.scaled_importance)),
("importance_aggregation", Robj::from(format!("{:?}",self.intern.importance.importance_aggregation)))
]);
Expand Down Expand Up @@ -389,8 +389,8 @@ impl Param {
"max_epochs" => self.intern.ga.max_epochs = value as usize,
"min_epochs" => self.intern.ga.min_epochs = value as usize,
"max_age_best_model" => self.intern.ga.max_age_best_model = value as usize,
"k_min" => self.intern.ga.kmin = value as usize,
"k_max" => self.intern.ga.kmax = value as usize,
"k_min" => self.intern.ga.k_min = value as usize,
"k_max" => self.intern.ga.k_max = value as usize,
"select_elite_pct" => self.intern.ga.select_elite_pct = value,
"select_niche_pct" => self.intern.ga.select_niche_pct = value,
"select_random_pct" => self.intern.ga.select_random_pct = value,
Expand Down Expand Up @@ -428,7 +428,7 @@ impl Param {
"threshold_windows_pct" => self.intern.voting.threshold_windows_pct = value,

// Importance parameters
"n_permutations_oob" => self.intern.importance.n_permutations_oob = value as usize,
"n_permutations_mda" => self.intern.importance.n_permutations_mda = value as usize,

// GPU parameters
"max_total_memory_mb" => self.intern.gpu.max_total_memory_mb = value as u64,
Expand Down Expand Up @@ -1900,7 +1900,7 @@ impl Individual {
feature_seeds.insert(f, seeds);
}

let ic: ImportanceCollection = self.intern.compute_oob_feature_importance(&data.intern, permutations, &features_to_process, &feature_seeds);
let ic: ImportanceCollection = self.intern.compute_mda_feature_importance(&data.intern, permutations, &features_to_process, &feature_seeds);

let mut feature = Vec::with_capacity(ic.importances.len());
let mut importance = Vec::with_capacity(ic.importances.len());
Expand Down Expand Up @@ -2598,7 +2598,7 @@ impl Experiment {
/// @name Experiment$compute_cv_importance
/// @description
/// Compute cross-validated feature importance (MDA-like) aggregated across CV folds.
/// This uses the native CV::compute_cv_oob_feature_importance logic on the original
/// This uses the native CV::compute_cv_mda_feature_importance logic on the original
/// training data and CV folds stored in the Experiment.
///
/// @param n_perm Number of permutations (default: 1000)
Expand Down Expand Up @@ -2643,7 +2643,7 @@ impl Experiment {

// 3) Native CV importance (agrégé across folds)
let mut rng = ChaCha8Rng::seed_from_u64(seed);
let mut ic: ImportanceCollection = cv.compute_cv_oob_feature_importance(
let mut ic: ImportanceCollection = cv.compute_cv_mda_feature_importance(
&self.param_arc,
permutations,
&mut rng,
Expand Down Expand Up @@ -2845,7 +2845,7 @@ impl Experiment {

let mut rng = ChaCha8Rng::seed_from_u64(base_seed);
let mut ic: ImportanceCollection = last_pop
.compute_pop_oob_feature_importance(
.compute_pop_mda_feature_importance(
&fold_data,
permutations,
&mut rng,
Expand Down Expand Up @@ -4094,7 +4094,7 @@ impl Population {
let pool = ThreadPoolBuilder::new().num_threads(threads).build().unwrap();

let mut ic: ImportanceCollection = pool.install(|| {
self.intern.compute_pop_oob_feature_importance(
self.intern.compute_pop_mda_feature_importance(
&data.intern,
permutations,
&mut rng,
Expand Down Expand Up @@ -4212,7 +4212,7 @@ impl Population {

let mut col = vec![0.0_f64; n_feat];

let ic = ind.compute_oob_feature_importance(
let ic = ind.compute_mda_feature_importance(
&data.intern,
permutations,
&feats_for_ind,
Expand Down