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 / isAdmissible.m  Maximize  Restore  History

Download this file

88 lines (81 with data), 3.1 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

function isAdmissible

global svModel;

if svModel.temp.admissible==0

while (length(find(svModel.model.alpha<0))>0 | ...

length(find(svModel.model.alpha>svModel.C(svModel.temp.active)))>0) & ...

length(svModel.temp.active)>1

project;

updatemat;

linearsystem;

end

end

if svModel.temp.admissible==1

if svModel.temp.group == 4

% change from elbow to left

%svModel.temp.i1

ind = svModel.temp.active(svModel.temp.i1);

svModel.temp.active(svModel.temp.i1) = [];

svModel.model.alpha(svModel.temp.i1) = [];

svModel.temp.bounded = sort([svModel.temp.bounded;ind']);

svModel.temp.new_active = -ind;

svModel.temp.toC = 1;

end

if svModel.temp.group == 1

% change from left to elbow

%svModel.temp.iL

ind = svModel.temp.bounded(svModel.temp.iL);

svModel.temp.bounded(svModel.temp.iL) = [];

[svModel.temp.active,a] = sort([svModel.temp.active;ind']);

svModel.temp.new_active = ind;

svModel.temp.toC = 1;

svModel.model.alpha = [svModel.model.alpha;svModel.C(ind)];

svModel.model.alpha = svModel.model.alpha(a);

end

if svModel.temp.group == 2

% change from right to elbow

%svModel.temp.iR

ind = svModel.temp.inactive(svModel.temp.iR);

svModel.temp.inactive(svModel.temp.iR) = [];

[svModel.temp.active,a] = sort([svModel.temp.active;ind']);

svModel.temp.new_active = ind;

svModel.temp.toC = 0;

svModel.model.alpha = [svModel.model.alpha;zeros(length(ind),1)];

svModel.model.alpha = svModel.model.alpha(a);

end

if svModel.temp.group == 3

% change from elbow to right

%svModel.temp.i0

ind = svModel.temp.active(svModel.temp.i0);

svModel.temp.active(svModel.temp.i0) = [];

svModel.model.alpha(svModel.temp.i0) = [];

svModel.temp.inactive = sort([svModel.temp.inactive,ind']);

svModel.temp.new_active = -ind;

svModel.temp.toC = 0;

end

updatemat;

end

svModel.temp.g = svModel.model.G1(1:svModel.temp.n,...

[svModel.temp.bounded;svModel.temp.active])*...

[svModel.C(svModel.temp.bounded);svModel.model.alpha] - svModel.model.rho;

%error = sum(svModel.temp.g(svModel.temp.active))

if svModel.temp.admissible==0

[a, svModel.temp.inda] = min([svModel.temp.g(svModel.temp.inactive);...

-svModel.temp.g(svModel.temp.bounded)]);

if a>0 & svModel.temp.empty==0

svModel.temp.admissible=1;

svModel.lambda(svModel.temp.currentstep) = sum(svModel.model.alpha)+...

sum(svModel.C(svModel.temp.bounded));

svModel.temp.group=0;

else

svModel.temp.admissible=0;

if length(svModel.temp.active)<2

[a, svModel.temp.inda] = min(svModel.temp.g(svModel.temp.inactive));

end

end

else

[i] = [find(svModel.model.alpha>svModel.C(svModel.temp.active));find(svModel.model.alpha<0)];

if length(i)>0

fprintf('*');

svModel.temp.admissible=0;

end

end

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