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]: / CSVM / selectConstraintToRelax.m  Maximize  Restore  History

Download this file

44 lines (40 with data), 1.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

function selectConstraintToRelax

global svModel;

svModel.temp.test=0;

while (svModel.temp.test==0)

svModel.temp.indpoints = [svModel.temp.bounded;...

svModel.temp.inactive([svModel.temp.j*svModel.step+...

1:min((svModel.temp.j+1)*svModel.step,length(svModel.temp.inactive))])'];

if svModel.temp.nb_test<=ceil(svModel.temp.n_inactive/svModel.step) & ...

svModel.temp.n_inactive>0 &...

length(find(svModel.temp.countVS>10))<1

relaxConstraint;

else % has converged

if length(find(svModel.temp.countVS>10))>0

disp('no convergence found');

end

svModel.temp.objectif = 1;

svModel.model.indices=sort([svModel.temp.active ; svModel.temp.bounded]);

svModel.temp.xt = zeros(svModel.temp.n,1);

svModel.temp.xt(svModel.temp.active) = svModel.model.alpha;

svModel.temp.xt(svModel.temp.bounded) = svModel.C(svModel.temp.bounded);

indout = 1:svModel.temp.n;

indout(svModel.model.indices)=[];

svModel.model.alpha = svModel.temp.xt;

svModel.model.alpha(indout)=[];

svModel.temp.test=1;

end

if ((svModel.temp.j+1)*svModel.step>=length(svModel.temp.inactive))

svModel.temp.j=0;

svModel.temp.nb_boucle = svModel.temp.nb_boucle+1;

if svModel.verbose>0

fprintf(svModel.fid,'.');

end

else

svModel.temp.j = svModel.temp.j+1;

end

end

svModel.temp.n_active = length(svModel.temp.active);

svModel.temp.n_bounded = length(svModel.temp.bounded);

svModel.temp.n_inactive = length(svModel.temp.inactive);

svModel.temp.nb_test=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