I would like to use 10-fold Cross-validation to evaluate a discretization in MATLAB. I should first consider the attributes and the class column.
相关问题
- Extract matrix elements using a vector of column i
- How to conditionally scale values in Keras Lambda
- How do you get R's null and residual deviance
- Trying to understand Pytorch's implementation
- How to display an image represented by three matri
相关文章
- How do I append metadata to an image in Matlab?
- How to use cross_val_score with random_state
- How to measure overfitting when train and validati
- McNemar's test in Python and comparison of cla
- How can I write-protect the Matlab language?
- How to disable keras warnings?
- Invert MinMaxScaler from scikit_learn
- `std::sin` is wrong in the last bit
Let's say you want to perform 10-fold cross-validation for regularized least squares.
In Statistics Toolbox there is CROSSVAL function, which performs 10-fold cross validation by default. Check it out.
Another function CROSSVALIND exists in Bioinformatics Toolbox.
Also there is an open source Generic-CV tool: http://www.cs.technion.ac.il/~ronbeg/gcv/
If you would rather write your own xval wrapper rather than using built-in functions, I often use randperm() to generate random orderings of my data, which you can then partition using a 90% (or your favorite value) cutoff point.