handicap I meet in testing the HpbM code

It seams that the synthetic data generating method whitch is included in the literature HpbM is invalid,  tested both in the HpbM and pbM programs.

However when use the method delineated in the pbM paper, the pbM program can get the correct result.

I can't find the reason.

It seams that the simulation of the linear model can obtain satisfied output, which is close to the true parameter(user-set) of the model.

                                                    ----------------(compiled by qianjiang 1/5/2006,11:25)

This afternoon I find that the c++ code show perfect result, then I began to analyse the MATLAB code in the function y=GetNormVec( data,  dim) (in function: PbMRegression). The sticking point is :

% y = y / sum(y); % ---------- raw sentence. This is an incorrect normalization operation.
y=y'/sqrt(y'*y) ;  % ------------- modified by qianjiang 1/5/2006,16:50.

----------------(compiled by qianjiang 1/5/2006,20:00)

The above is one side, the other is as follows:

data(:,1) = corr(:,1) .* corr(:,3);
data(:,2) = corr(:,2) .* corr(:,3);
data(:,3) =  corr(:,3);
data(:,4) = corr(:,1) .* corr(:,4);
data(:,5) = corr(:,2) .* corr(:,4);
data(:,6) =  corr(:,4);
data(:,7) = corr(:,1) ;
data(:,8) = corr(:,1) .* corr(:,3); % Error
data(:,1) = corr(:,2) ;                  % Error

the correct one should be:

data(:,1) = corr(:,1) .* corr(:,3);
data(:,2) = corr(:,2) .* corr(:,3);
data(:,3) =  corr(:,3);
data(:,4) = corr(:,1) .* corr(:,4);
data(:,5) = corr(:,2) .* corr(:,4);
data(:,6) =  corr(:,4);
data(:,7) = corr(:,1) ;
data(:,8) = corr(:,2) ;

----------------(compiled by qianjiang 1/5/2006,20:30)

%----------1/2/2006  20:20
Both the pbMregression and pbMfun function need to call the densityestimate function,

up to now, the densityestimate and kernel function is based on point calculation rather than
vector.

It can perhaps affect the computing cost.

There's a trade-off between simplifying the function style in the input space and reducing the computing cost.


hpbMregression is the main function, and it call other functions.

%-----------1/5/2006 16:10
In the folder, some functions has already been contained in the M function, which then is called subfuction
the main M files are(the relation): test_real_hpbm->HPbMRegression->HPbMFun
----------------------------------------------------------------->GetBasin
----------------------------------------------------------------->GetBandwidth
----------------------------------------------------------------->AdaptiveMShift
'->' stand for calling function.

GenerateSynData*.m  is used for simulation.

     ~~~~~~~~~<2D & 3D Simulation Topic for pbM with Conjugate Gradient Method>~~~~~~~~~


%----------------------- 1/8/2006,17:38
Now I want to see the performance of pbM with conjugate gradient method by considering the 2D linear model.


%----------------------- 1/8/2006,20:32
In the experiment, I find that under the 2D model, it can get the correct result(only 1 iterativeness). Note that in this case the variance is homoscedastic.
            the file folder name: HpbM_2D_Jan.8_20-40

%-----------1/8/2006 20:39
With the experiment of 2D simulation, Now I want to handle the simulation example in the reference HpbM without considering
the heteroscedasticity for simplicity, that is sigma=1.
But the result disappoint me. Next I want to test the code with the 3D linear model different from the simulation example which
is homoscedastic.   --- 21:59 The result is also satisfied(10 iterativeness)---
            the file folder name: pbM_3D_Jan.8_20-40

%-------------------------- 1/10/2006, 22:26
Theta2Beta.m  
if sin(Beta(dim-1)) < 0
   Beta(dim-1)=acos(Theta(2)/s)+pi; ---> Beta(dim-1)= 2*pi - acos(Theta(2)/s);
end
This is a critical  problem of  my M code///

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值