make_a_draw.m

来自「这个文本分类工具箱给出了有监督和无监督的文本分类算法清单。 这些算法为实验和合」· M 代码 · 共 8 行

M
8
字号
function [test_indices, train_indices] = make_a_draw(how_many, out_of_how_many)

%Choose a number of indices out of the maximum number allowed.

indices		  = randperm(out_of_how_many);
train_indices = sort(indices(1:how_many));
test_indices  = sort(indices(how_many+1:out_of_how_many));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?