-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_tSne.m
35 lines (27 loc) · 857 Bytes
/
run_tSne.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function [yData,betas,P,errors] = run_tSne(D,parameters)
%run_tSne runs the t-SNE algorithm on an NxN distance matrix
%
% Input variables:
%
% D -> NxN matrix of distances
% parameters -> struct containing non-default choices for parameters
%
%
% Output variables:
%
% yData -> N x parameters.num_tsne_dim array of embedding results
% betas -> Nx1 array of local region size parameters
% P -> full space transition matrix
% errors -> P.*log2(P./Q) as a function of t-SNE iteration
%
%
% (C) Gordon J. Berman, 2016
% Emory University
addpath(genpath('./utilities/'));
addpath(genpath('./t_sne/'));
if nargin < 2
parameters = [];
end
parameters = setRunParameters(parameters);
fprintf(1,'Computing t-SNE\n');
[yData,betas,P,errors] = tsne_d(D,parameters);