vals= kfoldfun(CVMdl,fun)cross-validates the functionfunby applyingfunto the data stored in the cross-validated modelCVMdl. You must passfunas a function handle.
Cross-validation results, returned as a numeric matrix.valscontains the arrays oftestvalsoutput, concatenated vertically over all folds. For example, iftestvals从每一个折叠都是长度的数字矢量N,kfoldfun返回一个KFold-by-Nnumeric matrix with one row per fold.
Data Types:double
Extended Capabilities
GPU Arrays Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
Usage notes and limitations:
This function fully supports GPU arrays for regression tree model objects fitted withfitrtree.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.