randomdirection.m
来自「a function inside machine learning」· M 代码 · 共 12 行
M
12 行
function u = randomDirection(X, Y)
%A function to compute a vector with a random direction with a norm of 1
%
%inputs
%X data matrix with examples as rows
%Y labels matrix with output as rows
%
%outputs
%u the vector which maximises the emperical target alignment between X and Y
u = rand(size(X, 2), 1)-0.5;
u = u/norm(u);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?