Skip to content

Commit

Permalink
hub toolbox 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
VarIr committed Oct 14, 2015
1 parent 76dcd00 commit 49755f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion goodman_kruskal.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@
self_size = length(D_self);
other_size = length(D_other);

[tmp, full_idx] = sort(D_full);
% Randomize, in case there are equal values
% (especially relevant for SNN rescaling)
rp = randperm(size(D_full,2));
d2 = D_full(rp);
[~, d2idx] = sort(d2);
full_idx = rp(d2idx);
% OLD code, non-randomized
%[tmp, full_idx] = sort(D_full);


cc = 0;
Expand Down
2 changes: 1 addition & 1 deletion hubness.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
d_self = +Inf;
sortorder = 'ascend';
end

Dk = zeros(k, size(D, 2));
for i = 1:size(D, 1)
% extract distance matrix row
Expand Down
2 changes: 2 additions & 0 deletions intrinsic_dim.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function no_dims = intrinsic_dim(X)
% Estimate the intrinsic dimensionality of dataset X (Pts x Dims)
%
% Taken from the DR-Toolbox
%
% This file is part of the Matlab Toolbox for Dimensionality Reduction v0.7.2b.
Expand Down

0 comments on commit 49755f1

Please sign in to comment.