-
Notifications
You must be signed in to change notification settings - Fork 0
/
uo_nn_main.m
32 lines (29 loc) · 1.08 KB
/
uo_nn_main.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
clear;
%
% Parameters for dataset generation
%
num_target = [3];
tr_freq = .5;
tr_p = 250;
te_q = 250;
tr_seed = 123456;
te_seed = 789101;
%
% Parameters for optimization
%
la = .0; % L2 regularization.
epsG = 10^-6; kmax = 10000; % Stopping criterium.
ils=3; ialmax = 2; kmaxBLS=30; epsal=10^-3;c1=0.01; c2=0.45; % Linesearch.
isd = 7; icg = 2; irc = 1 ; nu = 1.0; % Search direction.
sg_seed = 565544; sg_al0 = 2; sg_be = 0.3; sg_ga = 0.01; % SGM iteration.
sg_emax = kmax; sg_ebest = floor(0.01*sg_emax); % SGM stopping condition.
%
% Optimization
%
t1=clock;
[Xtr,ytr,wo,fo,tr_acc,Xte,yte,te_acc,niter,tex]=uo_nn_solve(num_target,tr_freq,tr_seed,tr_p,te_seed,te_q,la,epsG,kmax,ils,ialmax,kmaxBLS,epsal,c1,c2,isd,sg_al0,sg_be,sg_ga,sg_emax,sg_ebest,sg_seed,icg,irc,nu);
t2=clock;
fprintf(' wall time = %6.1d s.\n', etime(t2,t1));
% uo_nn_Xyplot(Xte, yte, wo);
% uo_nn_Xyplot(wo,0,[]);
%