Skip to content

Commit

Permalink
ENH: throw error when using glm_dsm with other correlation type than …
Browse files Browse the repository at this point in the history
…Pearson
  • Loading branch information
nno committed Aug 21, 2017
1 parent 4dce97b commit a2c99e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mvpa/cosmo_target_dsm_corr_measure.m
Expand Up @@ -246,6 +246,10 @@ function check_output(input_ds,output_ds_sa)


function ds_sa=linear_regression_dsm(samples_pdist, params)
if ~strcmp(params.type,'Pearson')
error(['For linear regression, only ''Pearson'' is '...
'currently allowed']);
end
npairs_dataset=numel(samples_pdist);

[dsm_mat,msk]=get_dsm_mat_from_vector_or_cell(params.glm_dsm,...
Expand Down
2 changes: 2 additions & 0 deletions tests/test_target_dsm_corr_measure.m
Expand Up @@ -416,6 +416,8 @@
aet(ds,'target_dsm',mat1,'type','Kendall');
aet(ds,'target_dsm',mat1,'type',2);

% Spearman not allowed when using regress_dsm
aet(ds,'glm_dsm',mat1,'type','Spearman');


function test_target_dsm_corr_measure_warnings_zero()
Expand Down

0 comments on commit a2c99e9

Please sign in to comment.