📄 longest_run.m
字号:
function L = longest_run(weights, features)%Find the length of the longest run of correctly classified random pointsn = length(features);L = 0;correct = 1;while correct, L = L + 1; indice = 1 + floor(rand(1)*n); %Choose a random indice if (weights' * features(:,indice) <= 0) %Find if it is correctly classified correct = 0; %If not, stop end if (L > n*5), correct = 0; endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -