Added back the missing randomize_samples() since the probabilistic_decision_function

training needs it.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403770
This commit is contained in:
Davis King 2010-07-24 12:22:41 +00:00
parent 5aa59b1a10
commit 4f791bb416

View File

@ -152,6 +152,11 @@ int main()
typedef probabilistic_decision_function<kernel_type> probabilistic_funct_type;
typedef normalized_function<probabilistic_funct_type> pfunct_type;
// The train_probabilistic_decision_function() is going to perform 3-fold cross-validation.
// So it is important that the +1 and -1 samples be distributed uniformly across all the folds.
// calling randomize_samples() will make sure that is the case.
randomize_samples(samples, labels);
pfunct_type learned_pfunct;
learned_pfunct.normalizer = normalizer;
learned_pfunct.function = train_probabilistic_decision_function(trainer, samples, labels, 3);