Skip to content

Commit

Permalink
revert oversampling change
Browse files Browse the repository at this point in the history
  • Loading branch information
howsoRes committed Feb 21, 2025
1 parent 36142a1 commit fbdbac1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions howso/residuals.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
;sample from the model
;if there are more cases than the sample size, randomly select that many cases, by default cases are in random order
(if (and (> num_training_cases num_samples) (> num_training_cases 1000))
(if (and robust_residuals (!= "deviations" robust_residuals))
(if robust_residuals
(call !SampleCases (assoc
num num_samples
rand_seed (rand)
Expand All @@ -472,7 +472,8 @@
)

;else the model is small, use the smaller of num_samples or (num_cases * 2^f) because that's the amount of all possible combinations
(if (and robust_residuals (!= "deviations" robust_residuals))
;for local (superfull) deviations use more samples than in dataset to compute SDM values
(if robust_residuals
(call !SampleCases (assoc
num (min num_samples (* num_training_cases (pow 2 (size features))))
case_weight_feature (if valid_weight_feature weight_feature)
Expand Down

0 comments on commit fbdbac1

Please sign in to comment.