Solved bug in usage histcount function used in the method: CCREClass.Calc. Now it calculates probability as it should.
Updated the test script
This commit is contained in:
@ -22,14 +22,25 @@ S.Calc;
|
||||
S
|
||||
%% Test CCRE class
|
||||
figure(1);clf;hold on
|
||||
A=randn(10);
|
||||
B=randn(10);
|
||||
figure(2);clf;
|
||||
figure(3);clf;hold on;
|
||||
A=randn(100);
|
||||
B=A;
|
||||
B(:)=A(randperm(numel(A)))
|
||||
for k=-1:0.1:1
|
||||
CS=CCREClass;
|
||||
CS.Data=(1-abs(k))*A+k*B;
|
||||
CS.nBin=100;
|
||||
CS.Data=1*(1-abs(k))*A+k*B;
|
||||
CS.nBin=50;
|
||||
CS.DataRef=B;
|
||||
CS.nBinRef=50;
|
||||
CS.nBinRef=500;
|
||||
CS.Calc;
|
||||
figure(1);
|
||||
plot(k,CS.CCRE,'o')
|
||||
end
|
||||
plot(k,CS.CRE,'x');
|
||||
figure(2);
|
||||
scatter(CS.DataRef(:),CS.Data(:));
|
||||
figure(3);
|
||||
plot(k,CS.CCRE./CS.CRE,'d');
|
||||
pause(0.01)
|
||||
end
|
||||
CS
|
Reference in New Issue
Block a user