blob: 38625a74304655c2ad8ed1a7614fdbd4d40d7aae (
plain)
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
|
#! /usr/bin/octave -qf
% measuring Octave computing times
t0=time();
load mnist.txt
disp("load");
disp(time()-t0)
x = mnist(:,1:784);
d = mnist(:,785);
t0=time();
xc = x - repmat(mean(x),rows(x),1);
disp("x - repmat(mean(x),rows(x),1)");
disp(time()-t0)
t0=time();
mc = (xc'*xc)/rows(x);
disp("(xc'*xc)/rows(x)");
disp(time()-t0)
t0=time();
[v,l]=eig(mc);
disp("eig");
disp(time()-t0)
disp(flipud(diag(l))(1:10));
|