-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnytro_test.m
24 lines (21 loc) · 975 Bytes
/
nytro_test.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
function [ output ] = nytro_test( Xtr , Xte , Yte , training_output)
%NYTRO_TEST Summary of this function goes here
% Detailed explanation goes here
% Compute test kernel
tic
KnmTe = training_output.config.kernel.kernelFunction(Xte , ...
Xtr(training_output.nysIdx,:) , ...
training_output.config.kernel.kernelParameters);
output.time.kernelComputation = toc;
% Perform prediction
tic
output.YtePred = KnmTe * training_output.best.alpha;
if ~isempty(training_output.config.crossValidation.codingFunction)
output.YtePred = training_output.config.crossValidation.codingFunction(output.YtePred);
end
output.time.prediction = toc;
% Evaluate test error
tic
output.testError = training_output.config.crossValidation.errorFunction(Yte , output.YtePred);
output.time.errorComputation = toc;
end