hill_obj.m

来自「一个很好的Matlab编制的数据降维处理软件」· M 代码 · 共 29 行

M
29
字号
function [f,df]=hill_obj(x,dims,ii,dd,pars);% % computes the objective function and gradient of the non-convex formulation of MVU. %% copyright by Kilian Q. Weinberger, 2006%%%% This file is part of the Matlab Toolbox for Dimensionality Reduction v0.4b.% The toolbox can be obtained from http://www.cs.unimaas.nl/l.vandermaaten% You are free to use, change, or redistribute this code in any way you% want for non-commercial purposes. However, it is appreciated if you % maintain the name of the original author.%% (C) Laurens van der Maaten% Maastricht University, 2007    X=reshape(x,dims);    [df,f]=computegr(X,ii(:,1),ii(:,2),dd);    df=df(:).*8;    if(pars.eta>0) % incorporate the trace term      df=df-pars.eta.*x;      f=f-pars.eta.*sum(sum(x.^2));    end;

⌨️ 快捷键说明

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