资源简介
这是一份非常有效的多核学习程序,效率比较高
代码片段和文件信息
function [fgradhessianinvcholetalambda2da_dsigmad2a_dsigma2] = all_derivatives(Ksylossalphadslambdamu);
m=Ks.m;
[fgradhessianinvcholetalambda2] = objective_function(Ksylossalphadslambdamu);
psi2 = psi2_loss(lambda * alpha y loss);
psi3 = psi3_loss(lambda * alpha y loss);
da_dlambda = alpha .* psi2;
da_dlambda = - hessianinvchol * ( hessianinvchol‘ * da_dlambda );
temp11 = hessianinvchol * ( hessianinvchol‘ * ( psi2 .* alpha ) ) ;
temp22 = kernel_operation(Ks1temp11);
temp3 = kernel_operation(Ks1alpha);
temp3 = hessianinvchol * ( hessianinvchol‘ * temp3 );
temp4 = ( 2 * psi2 + 2 * lambda * psi3 .* alpha ) .* temp11 - alpha .* alpha .* psi3 ;
d2a_dlambda2 = hessianinvchol * ( hessianinvchol‘ * temp4 );
for j=1:m
temp44 = sum( alpha.*temp22(:j) );
d2a_dlambda2 = d2a_dlambda2 - 2/mu*eta(j)^2 * temp44 * hessianinvchol * ( hessianinvchol‘ * temp22(:j) );
d2a_dlambda2 = d2a_dlambda2 - 2/mu*eta(j)^2 * temp44 * hessianinvchol * ( hessianinvchol‘ * temp22(:j) );
d2a_dlambda2 = d2a_dlambda2 - 8*eta(j)^3/mu/mu * temp44 * temp44 * temp3(:j);
d2a_dlambda2 = d2a_dlambda2 - 2/mu*eta(j)^2 * sum( temp11 .* temp22(:j) ) * temp3(:j);
end
d2a_dlambda2 = d2a_dlambda2 - lambda^2 * hessianinvchol * ( hessianinvchol‘ * ( psi3 .* temp11 .* temp11 ) );
da_dsigma = da_dlambda * ( -lambda );
d2a_dsigma2 = d2a_dlambda2 * lambda * lambda + da_dlambda * ( lambda );
% switch loss_type
% case ‘regression‘
% da_dlambda = alpha .* psi2_regression(lambda * alpha y );
% da_dlambda = - hessianinvchol * ( hessianinvchol‘ * da_dlambda );
% temp1 = hessianinvchol * ( hessianinvchol‘ * alpha ) ;
% temp2 = kernel_operation(Ks1temp1);
% temp3 = kernel_operation(Ks1alpha);
% temp3 = hessianinvchol * ( hessianinvchol‘ * temp3 );
%
%
% d2a_dlambda2 = 2 * hessianinvchol * ( hessianinvchol‘ * temp1 );
% for j=1:m
% temp4 = sum( alpha.*temp2(:j) );
% d2a_dlambda2 = d2a_dlambda2 - 4/mu*eta(j)^2 * temp4 * hessianinvchol * ( hessianinvchol‘ * temp2(:j) );
% d2a_dlambda2 = d2a_dlambda2 - 8*eta(j)^3/mu/mu * temp4^2 * temp3(:j);
% d2a_dlambda2 = d2a_dlambda2 - 2/mu*eta(j)^2 * sum( temp1 .* temp2(:j) ) * temp3(:j);
% end
%
% case ‘logistic‘
% psi2 = psi2_logistic(lambda * alpha y );
% psi3 = psi3_logistic(lambda * alpha y );
% da_dlambda = alpha .* psi2;
% da_dlambda = - hessianinvchol * ( hessianinvchol‘ * da_dlambda );
% temp11 = hessianinvchol * ( hessianinvchol‘ * ( psi2 .* alpha ) ) ;
% temp22 = kernel_operation(Ks1temp11);
% temp3 = kernel_operation(Ks1alpha);
% temp3 = hessianinvchol * ( hessianinvchol‘ * temp3 );
%
% temp4 = ( 2 * psi2 + 2 * lambda * psi3 .* alpha ) .* temp11 - alpha .* alpha .* psi3 ;
% d2a
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5089 2004-08-19 10:37 multi-kernel-path-1.0\all_derivatives.m
文件 56912 2004-10-25 15:08 multi-kernel-path-1.0\boston.mat
文件 649 2004-12-24 16:33 multi-kernel-path-1.0\build_efficient_Ks.asv
文件 784 2004-12-24 16:36 multi-kernel-path-1.0\build_efficient_Ks.m
文件 482 2004-10-25 13:55 multi-kernel-path-1.0\build_efficient_Ks_test.m
文件 510 2004-12-25 08:33 multi-kernel-path-1.0\compute_ds.asv
文件 596 2004-12-25 08:34 multi-kernel-path-1.0\compute_ds.m
文件 1283 2004-11-01 20:50 multi-kernel-path-1.0\compute_newlambda2.m
文件 5390 2004-12-25 08:53 multi-kernel-path-1.0\create_path_kernel_matrices.asv
文件 5634 2004-12-25 09:00 multi-kernel-path-1.0\create_path_kernel_matrices.m
文件 5735 2004-11-02 07:49 multi-kernel-path-1.0\cv_general_sc
文件 3434 2004-12-24 22:28 multi-kernel-path-1.0\demo_sc
文件 3441 2004-12-24 22:28 multi-kernel-path-1.0\demo_sc
文件 7164 2004-12-24 22:28 multi-kernel-path-1.0\demo_sc
文件 7060 2004-12-24 22:29 multi-kernel-path-1.0\demo_sc
文件 457 2004-08-17 12:01 multi-kernel-path-1.0\devectorize.c
文件 6144 2004-08-17 12:01 multi-kernel-path-1.0\devectorize.dll
文件 13095 2004-12-24 14:57 multi-kernel-path-1.0\follow_entire_path.asv
文件 13245 2004-12-24 15:15 multi-kernel-path-1.0\follow_entire_path.m
文件 1055 2004-12-25 08:23 multi-kernel-path-1.0\generate_random_problem.asv
文件 1071 2004-12-25 08:27 multi-kernel-path-1.0\generate_random_problem.m
文件 96416 2004-10-26 08:48 multi-kernel-path-1.0\ionosphere.mat
文件 831 2004-08-17 15:14 multi-kernel-path-1.0\kernel_operation.m
文件 864 2004-08-19 10:01 multi-kernel-path-1.0\kernel_operation_test.m
文件 17496 2004-08-24 16:17 multi-kernel-path-1.0\liver.mat
文件 2912 2004-11-09 13:36 multi-kernel-path-1.0\newton_method.m
文件 1627 2004-10-27 12:05 multi-kernel-path-1.0\ob
文件 1799 2004-11-08 13:46 multi-kernel-path-1.0\predictor_step.m
文件 233 2004-08-19 10:43 multi-kernel-path-1.0\problem_type.m
文件 220 2004-10-25 14:39 multi-kernel-path-1.0\psi1_loss.m
文件 231 2004-10-25 14:39 multi-kernel-path-1.0\psi2_loss.m
............此处省略10个文件信息
- 上一篇:多线程map容器互斥代码
- 下一篇:公交查询系统ER图
评论
共有 条评论