Join/Login

Business Software

Open Source Software

For Vendors

Blog

About

More

Articles

Create

SourceForge Podcast

Site Documentation

Subscribe to our Newsletter

Support Request

For Vendors Help Create Join Login

Business Software

Open Source Software

SourceForge Podcast

Resources

Articles

Case Studies

Blog

Menu

Help

Create

Join

Login

Home

Browse

The Simple SVM toolbox

Code

The Simple SVM toolbox Code

Brought to you by: gloosli

Summary

Files

Reviews

Support

Code

Menu ▾ ▴

Browse Commits

Browse Files

[r8]: / nuSVM / updatemat.m  Maximize  Restore  History

Download this file

59 lines (52 with data), 2.6 kB

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

function updatemat

global svModel;

if length(svModel.temp.new_active)>1

svModel.temp.new_active = sign(min(svModel.temp.new_active))*min(abs(svModel.temp.new_active));

end

if (svModel.temp.new_active>0) & (svModel.temp.toC==0)

svModel.model.G1(1:svModel.temp.n,svModel.temp.new_active) = kernelPol(svModel.kernel,...

svModel.data.trainvec, ...

svModel.data.trainvec(:,svModel.temp.new_active), ...

svModel.data.trainlab, ...

svModel.data.trainlab(svModel.temp.new_active))./svModel.temp.n;

svModel.model.G1(svModel.temp.new_active,svModel.temp.new_active) = ...

svModel.model.G1(svModel.temp.new_active,svModel.temp.new_active)+...

svModel.gap;

svModel.model.G2(svModel.temp.active,svModel.temp.active) =...

updatechol(find(svModel.temp.active==svModel.temp.new_active),...

svModel.model.G1(svModel.temp.active,svModel.temp.active),...

svModel.model.G2(svModel.temp.active,svModel.temp.active));

elseif svModel.temp.new_active>0 & svModel.temp.toC==1

svModel.model.G2(svModel.temp.active,svModel.temp.active) =...

updatechol(find(svModel.temp.active==svModel.temp.new_active),...

svModel.model.G1(svModel.temp.active,svModel.temp.active),...

svModel.model.G2(svModel.temp.active,svModel.temp.active));

elseif svModel.temp.new_active<0 & svModel.temp.toC==0

svModel.model.G1(1:svModel.temp.n,-svModel.temp.new_active) = 0;

i = find(svModel.temp.active<-svModel.temp.new_active,1,'last');

if isempty(i); i=1; end;

svModel.model.G2(svModel.temp.active,svModel.temp.active) =...

updatechol(max([i,1]),...

svModel.model.G1(svModel.temp.active,svModel.temp.active),...

svModel.model.G2(svModel.temp.active,svModel.temp.active));

elseif svModel.temp.new_active<0 & svModel.temp.toC==1

i = find(svModel.temp.active<-svModel.temp.new_active,1,'last');

if isempty(i); i=1; end;

svModel.model.G2(svModel.temp.active,svModel.temp.active) =...

updatechol(max([i,1]),...

svModel.model.G1(svModel.temp.active,svModel.temp.active),...

svModel.model.G2(svModel.temp.active,svModel.temp.active));

end

if length(svModel.temp.active)>0

svModel.temp.tu = svModel.model.G2(svModel.temp.active,svModel.temp.active)\...

(svModel.model.G2(svModel.temp.active,svModel.temp.active)'\...

ones(length(svModel.temp.active),1));

svModel.temp.t = 1./...

(ones(1,length(svModel.temp.active))*svModel.temp.tu);

else

svModel.temp.empty=1;

svModel.temp.admissible=0;

svModel.temp.tu = [];

svModel.temp.t = [];

end

svModel.temp.new_active = 0;

SourceForge

Create a Project

Open Source Software

Business Software

Top Downloaded Projects

Company

About

Team

SourceForge Headquarters
225 Broadway Suite 1600
San Diego, CA 92101
+1 (858) 422-6466

Resources

Support

Site Documentation

Site Status

SourceForge Reviews

© 2025 Slashdot Media. All Rights Reserved.

Terms Privacy Opt Out Advertise

×
Want the latest updates on software, tech news, and AI?

Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.

Submit