×
BigML is working hard to support a wide range of browsers. Your experience will be better with:
English
Sign up / in
Sign up
Sign in
or Sign in with...
Amazon
Github
GitLab
Google
Toggle navigation
PRODUCT
Features
Releases
What's New
GETTING STARTED
PRICING
Subscriptions
Private Deployments
Training
Certifications
BigML for Education
SUPPORT
Toggle navigation
PRODUCT
Features
Releases
What's New
GETTING STARTED
PRICING
Subscriptions
Private Deployments
Training
Certifications
BigML for Education
SUPPORT
License
Oops!
We could not process your request!
Model's k-fold cross-validation | BigML.com
×
Embed this Script in your web site
Copy & Paste this code into your HTML code:
whizzml
Public
whizzml's
Scripts
77
Models
0
Datasets
0
0
FREE
BUY
Model's k-fold cross-validation
Details:
Created
Thu, 8 Oct 2026 14:59:00 +0000
Published
Thu, 8 Oct 2026 17:26:38 +0000
Description:
k-fold cross-validation for models
Tags:
BigMLer
BigMLer_ThuOct0826_165856
fold cross
URL:
https://bigml.com/user/whizzml/gallery/script/6ac7afb412163ebf324fb4dc
Script
FREE
Source code
;; This code will eventually be defined as a library. ;;get-model-options ;; ;; maps the options to be used in models ;; Inputs: ;; missing-splits: (boolean) Sets the missing_splits flag ;; stat-pruning: (boolean) Sets the statistical pruning flag ;; balance-objective: (boolean) Sets the balance_objective flag ;; weight-field: (string) ID of the field to be used as weight (weight_field) ;; objetive-weights: (list) List of values to be used as objective_weights ;; node-threshold: (integer) maximum number of nodes in the model ;; ;; Output: (map) options map ;; (define (get-model-options missing-splits pruning balance-objective weight-field objetive-weights node-threshold) (let (options {"missing_splits" missing-splits "stat_pruning" stat-pruning "balance_objective" balance-objective} options (if (empty? weight-field) options (assoc options "weight_field" weight-field)) options (if (empty? objective-weights) options (assoc options "objective_weights" objective-weights))) (if (= node-threshold -1) options (assoc options "node_threshold" node-threshold)))) ;; model-cross-validation ;; ;; creates k-fold cross-validation for a dataset using models ;; ;; Inputs: ;; dataset-id: (string) Dataset ID ;; k-folds: (integer) Number of folds ;; objective-id: (string) ID of the objective field ;; missing-splits: (boolean) sets the missing_splits flag ;; pruning: (string) pruning configuration option ;; balance-objective: (boolean) sets the balance_objective flag ;; weight-field: (string) ID of the field to be used as weight_field ;; objective-weights: (list) List of objective_weights ;; node-threshold: (integer) maximum number of nodes in the model ;; delete-resources?: (boolean) Whether to delete all intermediate resources ;; stratified?: (boolean) Whether to stratify the k-folds across classes ;; ;; Output: (evaluation-id) Average of evaluations results ;; (define (model-cross-validation dataset-id k-folds objective-id missing-splits stat-pruning balance-objective weight-field objective-weights node-threshold delete-resources? . stratified?) (let (options (get-model-options missing-splits stat-pruning balance-objective weight-field objective-weights node-threshold) objective-id (if (empty? objective-id) (dataset-get-objective-id dataset-id) objective-id) dft-evaluation-options {}) (ds-cross-validation dataset-id k-folds objective-id "model" options dft-evaluation-options delete-resources? stratified?))) (define cross-validation-output (model-cross-validation dataset-id k-folds objective-id missing-splits stat-pruning balance-objective weight-field objective-weights node-threshold delete-resources? stratified?))
Description
k-fold cross-validation for models
k-fold cross-validation for models
Show more
Inputs
Outputs
License:
Creative Commons Zero V1.0
Script
FREE
Model's k-fold cross-validation | BigML.com
Sending Request...
Sending Request...