FUNCTION REFERENCE

dividerand

Divide samples randomly using the global rng stream (default 70/15/15).

Divide samples randomly using the global rng stream (default 70/15/15).

Syntax

[trainInd,valInd,testInd] = dividerand(Q[,trainRatio,valRatio,testRatio])

Ratios are normalized; training/validation counts are rounded and test gets the remainder.

Example

rng(0); [a,b,c]=dividerand(20,0.7,0.15,0.15);

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.