LOLIMOT

LOLIMOT Commit Details

Date:2011-10-14 09:48:27 (8 years 2 days ago)
Author:Vincent Couvert
Branch:cpp, master
Commit:4962cbdf670c050601bb0998604a476c82f3fdb5
Parents: ac4f11f7749b5d315c4324c701fa0ac285a98697
Message:Remove old .svn files

Changes:
D.svn/all-wcprops (full)
D.svn/entries (full)
D.svn/prop-base/builder.sce.svn-base (full)
D.svn/prop-base/changelog.txt.svn-base (full)
D.svn/prop-base/license.txt.svn-base (full)
D.svn/prop-base/lolimot_redist.iss.svn-base (full)
D.svn/prop-base/readme.txt.svn-base (full)
D.svn/text-base/builder.sce.svn-base (full)
D.svn/text-base/changelog.txt.svn-base (full)
D.svn/text-base/license.txt.svn-base (full)
D.svn/text-base/lolimot_redist.iss.svn-base (full)
D.svn/text-base/readme.txt.svn-base (full)
Ddemos/.svn/all-wcprops (full)
Ddemos/.svn/entries (full)
Ddemos/.svn/prop-base/lolimot.dem.gateway.sce.svn-base (full)
Ddemos/.svn/prop-base/testLolimot.sce.svn-base (full)
Ddemos/.svn/text-base/lolimot.dem.gateway.sce.svn-base (full)
Ddemos/.svn/text-base/testLolimot.sce.svn-base (full)
Detc/.svn/all-wcprops (full)
Detc/.svn/entries (full)
Detc/.svn/prop-base/lolimot.quit.svn-base (full)
Detc/.svn/prop-base/lolimot.start.svn-base (full)
Detc/.svn/text-base/lolimot.quit.svn-base (full)
Detc/.svn/text-base/lolimot.start.svn-base (full)
Dhelp/.svn/all-wcprops (full)
Dhelp/.svn/entries (full)
Dhelp/.svn/prop-base/builder_help.sce.svn-base (full)
Dhelp/.svn/text-base/builder_help.sce.svn-base (full)
Dhelp/en_US/.svn/all-wcprops (full)
Dhelp/en_US/.svn/entries (full)
Dhelp/en_US/.svn/prop-base/build_help.sce.svn-base (full)
Dhelp/en_US/.svn/prop-base/estim_der_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/estim_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/estim_vec_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/export_der_model.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/export_model.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/learn_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/learn_valid_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/plot_lolimot_part.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/read_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/update_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/prop-base/write_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/build_help.sce.svn-base (full)
Dhelp/en_US/.svn/text-base/estim_der_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/estim_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/estim_vec_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/export_der_model.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/export_model.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/learn_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/learn_valid_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/plot_lolimot_part.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/read_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/update_lolimot.xml.svn-base (full)
Dhelp/en_US/.svn/text-base/write_lolimot.xml.svn-base (full)
Dhelp/fr_FR/.svn/all-wcprops (full)
Dhelp/fr_FR/.svn/entries (full)
Dhelp/fr_FR/.svn/prop-base/build_help.sce.svn-base (full)
Dhelp/fr_FR/.svn/text-base/build_help.sce.svn-base (full)
Dmacros/.svn/all-wcprops (full)
Dmacros/.svn/entries (full)
Dmacros/.svn/prop-base/_learn_model.sci.svn-base (full)
Dmacros/.svn/prop-base/_phi_norm_data.sci.svn-base (full)
Dmacros/.svn/prop-base/_phi_norm_data_linear.sci.svn-base (full)
Dmacros/.svn/prop-base/buildmacros.sce.svn-base (full)
Dmacros/.svn/prop-base/estim_der_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/estim_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/estim_vec_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/export_der_model.sci.svn-base (full)
Dmacros/.svn/prop-base/export_model.sci.svn-base (full)
Dmacros/.svn/prop-base/learn_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/learn_valid_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/plot_lolimot_part.sci.svn-base (full)
Dmacros/.svn/prop-base/read_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/update_lolimot.sci.svn-base (full)
Dmacros/.svn/prop-base/write_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/_learn_model.sci.svn-base (full)
Dmacros/.svn/text-base/_phi_norm_data.sci.svn-base (full)
Dmacros/.svn/text-base/_phi_norm_data_linear.sci.svn-base (full)
Dmacros/.svn/text-base/buildmacros.sce.svn-base (full)
Dmacros/.svn/text-base/estim_der_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/estim_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/estim_vec_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/export_der_model.sci.svn-base (full)
Dmacros/.svn/text-base/export_model.sci.svn-base (full)
Dmacros/.svn/text-base/learn_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/learn_valid_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/plot_lolimot_part.sci.svn-base (full)
Dmacros/.svn/text-base/read_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/update_lolimot.sci.svn-base (full)
Dmacros/.svn/text-base/write_lolimot.sci.svn-base (full)
Dtests/.svn/all-wcprops (full)
Dtests/.svn/entries (full)
Dtests/unit_tests/.svn/all-wcprops (full)
Dtests/unit_tests/.svn/entries (full)

File differences

.svn/all-wcprops
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
K 25
svn:wc:ra_dav:version-url
V 31
/svn/!svn/ver/745/trunk/lolimot
END
builder.sce
K 25
svn:wc:ra_dav:version-url
V 42
/svn/!svn/ver/50/trunk/lolimot/builder.sce
END
license.txt
K 25
svn:wc:ra_dav:version-url
V 43
/svn/!svn/ver/213/trunk/lolimot/license.txt
END
changelog.txt
K 25
svn:wc:ra_dav:version-url
V 44
/svn/!svn/ver/50/trunk/lolimot/changelog.txt
END
lolimot_redist.iss
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/50/trunk/lolimot/lolimot_redist.iss
END
readme.txt
K 25
svn:wc:ra_dav:version-url
V 41
/svn/!svn/ver/50/trunk/lolimot/readme.txt
END
.svn/entries
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot
http://scilab-mip.googlecode.com/svn
2010-09-29T08:37:53.524590Z
745
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
builder.sce
file
2011-10-14T07:02:44.000000Z
2a806655c2d8f7884250a7ea03e7153f
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
1031
license.txt
file
2011-10-14T07:02:44.000000Z
01049d79662890ca0d6c3a7d1c959819
2009-10-15T14:17:21.210933Z
213
ycollet@freesurf.fr
has-props
146
tests
dir
macros
dir
changelog.txt
file
2011-10-14T07:02:44.000000Z
3a95241e397ce6c083151a05cf37b655
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
100
lolimot_redist.iss
file
2011-10-14T07:02:44.000000Z
b8ab5e1cd771768821386445e8a85211
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
2043
demos
dir
help
dir
etc
dir
readme.txt
file
2011-10-14T07:02:44.000000Z
68b329da9893e34099c7d8ad5cb9c940
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
1
.svn/prop-base/builder.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
.svn/prop-base/changelog.txt.svn-base
1
2
3
4
5
6
7
8
9
K 13
svn:eol-style
V 6
native
K 14
svn:executable
V 0
END
.svn/prop-base/license.txt.svn-base
1
2
3
4
5
6
7
8
9
K 13
svn:eol-style
V 6
native
K 14
svn:executable
V 0
END
.svn/prop-base/lolimot_redist.iss.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
.svn/prop-base/readme.txt.svn-base
1
2
3
4
5
6
7
8
9
K 13
svn:eol-style
V 6
native
K 14
svn:executable
V 0
END
.svn/text-base/builder.sce.svn-base
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
// ====================================================================
// Copyright INRIA 2008
// Allan CORNET
// Simon LIPP
// This file is released into the public domain
// ====================================================================
mode(-1);
lines(0);
try
getversion('scilab');
catch
error(gettext('Scilab 5.0 or more is required.'));
end;
// ====================================================================
if ~with_module('development_tools') then
error(msprintf(gettext('%s module not installed."),'development_tools'));
end
// ====================================================================
TOOLBOX_NAME = 'lolimot';
TOOLBOX_TITLE = 'Lolimot';
// ====================================================================
toolbox_dir = get_absolute_file_path('builder.sce');
tbx_builder_macros(toolbox_dir);
tbx_builder_help(toolbox_dir);
tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
clear toolbox_dir TOOLBOX_NAME TOOLBOX_TITLE;
// ====================================================================
.svn/text-base/changelog.txt.svn-base
1
2
3
4
5
Lolimot-2.0
- Conversion as a scilab-5 toolbo
-- Yann COLLETTE <ycollet@freesurf.fr> 21/01/2009
.svn/text-base/license.txt.svn-base
1
2
3
4
5
Licence of the Lolimot toolbox
Please note that Scilab is released under the terms of the CeCILL license :
http://www.cecill.info/index.en.html
.svn/text-base/lolimot_redist.iss.svn-base
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
;##############################################################################################################
; Inno Setup Install script for Toolbox_skeleton
; http://www.jrsoftware.org/isinfo.php
; Allan CORNET
; This file is released into the public domain
;##############################################################################################################
; modify this path where is toolbox_skeleton directory
#define BinariesSourcePath "D:\Scilab5\modules\Lolimot-2.0"
;
#define Toolbox_skeleton_version "2.0"
#define CurrentYear "2009"
#define Toolbox_skeletonDirFilename "Lolimot"
;##############################################################################################################
[Setup]
SourceDir={#BinariesSourcePath}
AppName=Toolbox skeleton
AppVerName=Lolimot version 2.0
DefaultDirName={pf}\{#Toolbox_skeletonDirFilename}
InfoAfterfile=readme.txt
LicenseFile=license.txt
WindowVisible=true
AppPublisher=Home made
BackColorDirection=lefttoright
Compression=lzma/max
InternalCompressLevel=normal
SolidCompression=true
VersionInfoVersion={#Toolbox_skeleton_version}
VersionInfoCompany=Your Company
;##############################################################################################################
[Files]
; Add here files that you want to add
Source: loader.sce; DestDir: {app}
Source: etc\lolimot.quit; DestDir: {app}\etc
Source: etc\lolimot.start; DestDir: {app}\etc
Source: macros\buildmacros.sce; DestDir: {app}\macros
Source: macros\lib; DestDir: {app}\macros
Source: macros\names; DestDir: {app}\macros
Source: macros\*.sci; DestDir: {app}\macros
Source: macros\*.bin; DestDir: {app}\macros
Source: tests\*.*; DestDir: {app}\tests; Flags: recursesubdirs
Source: demos\*.*; DestDir: {app}\locales; Flags: recursesubdirs
Source: help\*.*; DestDir: {app}\help; Flags: recursesubdirs
;
;##############################################################################################################
.svn/text-base/readme.txt.svn-base
1
demos/.svn/all-wcprops
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
K 25
svn:wc:ra_dav:version-url
V 37
/svn/!svn/ver/202/trunk/lolimot/demos
END
testLolimot.sce
K 25
svn:wc:ra_dav:version-url
V 53
/svn/!svn/ver/202/trunk/lolimot/demos/testLolimot.sce
END
lolimot.dem.gateway.sce
K 25
svn:wc:ra_dav:version-url
V 60
/svn/!svn/ver/50/trunk/lolimot/demos/lolimot.dem.gateway.sce
END
demos/.svn/entries
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
87
88
89
90
91
92
93
94
95
96
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/demos
http://scilab-mip.googlecode.com/svn
2009-10-15T13:56:50.585244Z
202
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
testLolimot.sce
file
2011-10-14T07:02:43.000000Z
d0ca5018700191c625132c89ef6ec8be
2009-10-15T13:56:50.585244Z
202
ycollet@freesurf.fr
has-props
10436
lolimot.dem.gateway.sce
file
2011-10-14T07:02:43.000000Z
9422030e8b035b1ff554f109adb33c4b
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
462
demos/.svn/prop-base/lolimot.dem.gateway.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
demos/.svn/prop-base/testLolimot.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
demos/.svn/text-base/lolimot.dem.gateway.sce.svn-base
1
2
3
4
5
6
7
8
9
10
11
// ====================================================================
// Yann COLLETTE
// Copyright 2009
// This file is released into the public domain
// ====================================================================
demopath = get_absolute_file_path("lolimot.dem.gateway.sce");
subdemolist = ["demo lolimot" ,"testLolimot.sce"];
subdemolist(:,2) = demopath + subdemolist(:,2);
// ====================================================================
demos/.svn/text-base/testLolimot.sce.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
//////////////////
// Test lolimot //
//////////////////
// Parameters
NbPts = 100;
NbPtsValid = 10;
sigma = 0.33;
nbpart = 10;
maximp = 0.05;
Log = %T;
Vec = %T; // Use vectorial estimation - faster - but uses a lot more memory
/////////////////////////////////////////
// Generation of the learning data set //
/////////////////////////////////////////
x1_learn = -5:10/sqrt(NbPts):5;
x2_learn = -5:10/sqrt(NbPts):5;
Index = 1;
for i=1:length(x1_learn)
for j=1:length(x2_learn)
y(Index) = x1_learn(i)^2 + x2_learn(j)^2;
data_learn(Index,:) = [x1_learn(i) x2_learn(j) y(Index)];
Index = Index + 1;
end
end
///////////////////////////////////////////
// Generation of the validation data set //
///////////////////////////////////////////
data_valid = data_learn(1:NbPtsValid,:);
printf('Learning a %d data set\n',size(data_learn,1));
/////////////////////
// Learning models //
/////////////////////
t_global_start = getdate();
tic();
[lolModel,stat] = learn_lolimot(data_learn,sigma,nbpart,maximp,2,Vec,Log);
t = toc();
printf('%f s required for learning - final residual = %f\n',t,lolModel('residual'));
tic();
[lolModel_lin,stat] = learn_lolimot(data_learn,sigma,nbpart,maximp,2,Vec,Log,pLinear=%T);
t = toc();
printf('%f s required for learning a non exponential model - final residual = %f\n',t,lolModel_lin('residual'));
Z_est = [];
Z_est_lin = [];
Z_est_vect = [];
Z_est_vect_lin = [];
Z_mes = [];
X = [];
Y = [];
Index = 1;
for i=1:length(x1_learn)
for j=1:length(x2_learn)
X(i,j) = x1_learn(i);
Y(i,j) = x2_learn(j);
Z_mes(i,j) = data_learn(Index,$);
Index = Index + 1;
end
end
tic();
Index = 1;
for i=1:length(x1_learn)
for j=1:length(x2_learn)
Z_est(i,j) = estim_lolimot(data_learn(Index,1:$-1),lolModel);
Z_est_lin(i,j) = estim_lolimot(data_learn(Index,1:$-1),lolModel_lin);
Index = Index + 1;
end
end
printf('Lolimot: %.2f s needed to compute sequentially the estimations\n', toc());
tic();
Index = 1;
for i=1:length(x1_learn)
for j=1:length(x2_learn)
Z_est_vec(i,j) = estim_vec_lolimot(data_learn(Index,1:$-1),lolModel);
Z_est_vec_lin(i,j) = estim_vec_lolimot(data_learn(Index,1:$-1),lolModel_lin);
Index = Index + 1;
end
end
printf('Lolimot: %.2f s needed to compute vectorially the estimations\n', toc());
//////////////////////
// Plot the results //
//////////////////////
cmap = graycolormap(128);
h = scf();
h.color_map = cmap;
drawlater;
subplot(2,2,1);
surf(X,Y,Z_mes);
xtitle('Measurement data set','X','Y','Z_mes');
subplot(2,2,2);
surf(X,Y,Z_est);
xtitle('Estimation data set','X','Y','Z_est');
subplot(2,2,3);
surf(X,Y,Z_est_vec);
xtitle('Estimation data set - Vect','X','Y','Z_est_vec');
drawnow;
printf('Writing and reading a learnt lolimot model\n');
///////////////////////////////////
// Save and read again the model //
///////////////////////////////////
err = write_lolimot('lolimot.txt',lolModel);
[err, modelOut] = read_lolimot('lolimot.txt');
Z_read = [];
Index = 1;
for i=1:length(x1_learn)
for j=1:length(x2_learn)
Z_read(i,j) = estim_lolimot(data_learn(Index,1:$-1),modelOut);
Index = Index + 1;
end
end
drawlater;
subplot(2,2,4);
surf(X,Y,Z_read);
xtitle('Estimation data set from saved lolimot','X','Y','Z_read');
drawnow;
//////////////////////
// Plot the results //
//////////////////////
h0 = scf();
h0.color_map = cmap;
drawlater;
subplot(2,2,1);
surf(X,Y,Z_mes);
xtitle('Measurement data set','X','Y','Z_mes');
subplot(2,2,2);
surf(X,Y,Z_est_lin);
xtitle('Estimation data set - piecewise linear membership function','X','Y','Z_est');
subplot(2,2,3);
surf(X,Y,Z_est_vec_lin);
xtitle('Estimation data set - piecewise linear membership function - Vect','X','Y','Z_est_vec');
printf('Writing and reading a learnt lolimot model\n');
subplot(2,2,4);
surf(X,Y,Z_read);
xtitle('Estimation data set from saved lolimot - piecewise linear membership function','X','Y','Z_read');
drawnow;
h1 = scf();
drawlater;
plot_lolimot_part(lolModel,'First model: Cuts');
drawnow;
h2 = scf();
h2.color_map = cmap;
for i=1:length(stat)
NbPart(i) = i;
Residual(i) = stat(i)(2);
Time(i) = stat(i)(3);
DimCut(i) = stat(i)(5);
end
drawlater;
subplot(2,2,1);
plot2d(NbPart,Residual);
xtitle('Residual vs Nb partition','Nb partition','Residual');
subplot(2,2,2);
plot2d(NbPart,Time);
xtitle('Time vs Nb partition','Nb partition','Time');
subplot(2,1,2);
plot2d(NbPart,DimCut);
xtitle('Dimension cut vs Nb partition','Nb partition','No dimension');
drawnow;
/////////////////////////////////////////////////
// Perform other learning phase on a new model //
/////////////////////////////////////////////////
nbpart = 5;
printf('learning a 5 partitions / 3 cuts per partition lolimot model\n');
tic();
[lolModel,stat] = learn_lolimot(data_learn,sigma,nbpart,maximp,3,Vec,Log);
t = toc();
printf('%f s required for learning - final residual = %f\n',t,lolModel('residual'));
h3 = scf();
plot_lolimot_part(lolModel,'Second model - phase 1: Cuts');
nbpart = 5;
printf('adding 5 partitions / 2 cuts per partition to the current lolimot model\n');
tic();
[lolModel,stat] = learn_lolimot(data_learn,sigma,nbpart,maximp,2,Vec,Log,lolModel);
t = toc();
printf('%f s required for learning - final residual = %f\n',t,lolModel('residual'));
h4 = scf();
drawlater;
plot_lolimot_part(lolModel,'Second model - phase 2: Cuts');
drawnow;
/////////////////////////////////////////////////
// Learning a model with a validation data set //
/////////////////////////////////////////////////
nbpart = 10;
printf('Learning a 10 partition / 2 cuts per partition lolimot model with a validation data set\n');
tic();
[modelOut,stat] = learn_valid_lolimot(data_learn,data_valid,sigma,nbpart,maximp,2,Vec,Log);
t = toc();
printf('%f s required for learning - final residual = %f\n',t,lolModel('residual'));
h5 = scf();
drawlater;
plot_lolimot_part(lolModel,'Third model: Cuts');
drawnow;
printf('computation of a derivative point\n');
df = estim_der_lolimot([0;0],lolModel);
printf('the derivative value:'); disp(df');
//////////////////////////////////////////////////
// Performing optimization on the lolimot model //
//////////////////////////////////////////////////
// With an exponential membership function
printf('performing the optimization of a lolimot model - exponential membership function\n');
nbpart = 20;
printf('learning a 20 partitions / 2 cuts per partition lolimot model for optimization\n');
[lolModel,stat] = learn_lolimot(data_learn,sigma,nbpart,maximp,2,Vec,Log,pLinear=%F);
deff('[f, df, ind_out] = f_optim(x,ind_in)','f=estim_lolimot(x,lolModel); df=estim_der_lolimot(x,lolModel); ind_out = ind_in;');
[f_opt,x_opt] = optim(f_optim,[4;4]);
printf('Final cost: %f - x_opt = \n',f_opt); disp(x_opt');
// With a piecewise linear exponential membership function
printf('performing the optimization of a lolimot model - piecewise linear membership function\n');
nbpart = 20;
printf('learning a 20 partitions / 2 cuts per partition lolimot model for optimization\n');
[lolModel,stat] = learn_lolimot(data_learn,sigma,nbpart,maximp,2,Vec,Log,pLinear=%T);
deff('[f, df, ind_out] = f_optim(x,ind_in)','f=estim_lolimot(x,lolModel); df=estim_der_lolimot(x,lolModel); ind_out = ind_in;');
[f_opt,x_opt] = optim(f_optim,[4;4]);
printf('Final cost: %f - x_opt = \n',f_opt); disp(x_opt');
///////////////////////////////////
// Testing the derivative model: //
///////////////////////////////////
nbpart = 10;
maximp = 0.05;
NbPts = 200;
X = -%pi/2:%pi/NbPts:%pi/2;
Y = sin(X);
dY = cos(X);
[lolModelSin,stat] = learn_lolimot([X',Y'],sigma,nbpart,maximp,2,Vec,Log,pLinear=%F);
[lolModelSin_lin,stat] = learn_lolimot([X',Y'],sigma,nbpart,maximp,2,Vec,Log,pLinear=%T);
Y_estim = []; Y_estim_lin = [];
Y_estim_der = []; Y_estim_der_lin = [];
for i=1:length(X)
Y_estim(i) = estim_lolimot(X(i),lolModelSin);
Y_estim_lin(i) = estim_lolimot(X(i),lolModelSin_lin);
Y_estim_der(i) = estim_der_lolimot(X(i),lolModelSin);
Y_estim_der_lin(i) = estim_der_lolimot(X(i),lolModelSin_lin);
end
h = scf();
drawlater;
subplot(2,1,1);
plot(X,Y,'k-');
plot(X,Y_estim+0.1,'r-');
plot(X,Y_estim_lin-0.1,'g-');
legend(['Measure','Estimations','Estimations lin']);
xtitle('The estimation model','X','Y');
subplot(2,1,2);
plot(X(1:$-1)+0.5*(X(2)-X(1)),-(Y_estim(1:$-1)-Y_estim(2:$))/(X(2)-X(1)),'r-');
plot(X,Y_estim_der,'g-');
plot(X,dY,'k-');
plot(X,Y_estim_der_lin,'b-');
legend(['Finite diff of estim','lolimot der.','anal. der','lolimot lin der.']);
xtitle('Test the derivative model','X','Y');
drawnow;
///////////////////////////////////////////
// Test of the partial derivatives model //
///////////////////////////////////////////
if MSDOS then
unix('del test_sin_f.sci');
unix('del test_sin_df.sci');
unix('del test_sin_lin_f.sci');
unix('del test_sin_lin_df.sci');
else
unix('rm test_sin_f.sci');
unix('rm test_sin_df.sci');
unix('rm test_sin_lin_f.sci');
unix('rm test_sin_lin_df.sci');
end
res = export_model('test_sin_f',lolModelSin,'scilab');
res = export_der_model('test_sin_df',lolModelSin,'scilab');
res = export_model('test_sin_lin_f',lolModelSin_lin,'scilab');
res = export_der_model('test_sin_lin_df',lolModelSin_lin,'scilab');
clear test_sin_f; getf('test_sin_f.sci');
clear test_sin_df; getf('test_sin_df.sci');
clear test_sin_lin_f; getf('test_sin_lin_f.sci');
clear test_sin_lin_df; getf('test_sin_lin_df.sci');
Y_estim = []; Y_estim_lin = [];
Y_estim_der = []; Y_estim_der_lin = [];
for i=1:length(X)
Y_estim(i) = test_sin_f(X(i));
Y_estim_lin(i) = test_sin_lin_f(X(i));
Y_estim_der(i) = test_sin_df(X(i));
Y_estim_der_lin(i) = test_sin_lin_df(X(i));
end
h = scf();
drawlater;
subplot(2,1,1);
plot(X,Y,'k-');
plot(X,Y_estim+0.1,'r-');
plot(X,Y_estim_lin-0.1,'g-');
legend(['Measure','Estimations','Estimations lin']);
xtitle('Generated function - The estimation model','X','Y');
subplot(2,1,2);
plot(X(1:$-1)+0.5*(X(2)-X(1)),-(Y_estim(1:$-1)-Y_estim(2:$))/(X(2)-X(1)),'r-');
plot(X,Y_estim_der+0.1,'g-');
plot(X,dY,'k-');
plot(X,Y_estim_der_lin-0.1,'b-');
legend(['Finite diff of estim','lolimot der.','anal. der','lolimot lin der.']);
xtitle('Generated function - Test the derivative model','X','Y');
drawnow;
t_global_end = getdate();
printf('Global elapsed time = %.2f s\n', etime(t_global_end,t_global_start));
etc/.svn/all-wcprops
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
K 25
svn:wc:ra_dav:version-url
V 35
/svn/!svn/ver/203/trunk/lolimot/etc
END
lolimot.quit
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/50/trunk/lolimot/etc/lolimot.quit
END
lolimot.start
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/203/trunk/lolimot/etc/lolimot.start
END
etc/.svn/entries
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
87
88
89
90
91
92
93
94
95
96
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/etc
http://scilab-mip.googlecode.com/svn
2009-10-15T13:57:01.243528Z
203
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
lolimot.quit
file
2011-10-14T07:02:44.000000Z
b24412bfcd02e217385971d4a24010e3
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
227
lolimot.start
file
2011-10-14T07:02:44.000000Z
a8743df01efc3c04dfd62f042c4fc17d
2009-10-15T13:57:01.243528Z
203
ycollet@freesurf.fr
has-props
1762
etc/.svn/prop-base/lolimot.quit.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
etc/.svn/prop-base/lolimot.start.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
etc/.svn/text-base/lolimot.quit.svn-base
1
2
3
4
5
// ====================================================================
// Yann COLLETTE
// Copyright 2009
// This file is released into the public domain
// ====================================================================
etc/.svn/text-base/lolimot.start.svn-base
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
// ====================================================================
// Yann COLLETTE
// Copyright 2009
// This file is released into the public domain
// ====================================================================
warning_mode = warning('query');
warning('off');
mprintf("Start Lolimot\n");
if isdef("lolimotlib") then
warning("Lolimot library is already loaded");
return;
end
etc_tlbx = get_absolute_file_path('lolimot.start');
etc_tlbx = getshortpathname(etc_tlbx);
root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length('\etc\') );
//Load functions library
// =============================================================================
mprintf("\tLoad macros\n");
pathmacros = pathconvert( root_tlbx ) + "macros" + filesep();
lolimotlib = lib(pathmacros);
// Load and add help chapter
// =============================================================================
if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad help\n");
path_addchapter = pathconvert(root_tlbx+"/jar");
if ( isdir(path_addchapter) <> [] ) then
add_help_chapter("Lolimot", path_addchapter, %F);
clear add_help_chapter;
end
clear path_addchapter;
end
// Load demos
// =============================================================================
if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad demos\n");
pathdemos = pathconvert(root_tlbx+"/demos/lolimot.dem.gateway.sce",%F,%T);
add_demo("Lolimot",pathdemos);
clear pathdemos add_demo;
end
// ====================================================================
clear warning_mode;
clear path_addchapter;
clear root_tlbx;
clear etc_tlbx;
clear pathmacros;
clear pathconvert;
// ====================================================================
help/.svn/all-wcprops
1
2
3
4
5
6
7
8
9
10
11
K 25
svn:wc:ra_dav:version-url
V 36
/svn/!svn/ver/204/trunk/lolimot/help
END
builder_help.sce
K 25
svn:wc:ra_dav:version-url
V 52
/svn/!svn/ver/50/trunk/lolimot/help/builder_help.sce
END
help/.svn/entries
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
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/help
http://scilab-mip.googlecode.com/svn
2009-10-15T13:57:19.562550Z
204
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
builder_help.sce
file
2011-10-14T07:02:44.000000Z
4d5d4315ca4a4ee3a8377aa93d3c1d75
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
384
en_US
dir
fr_FR
dir
help/.svn/prop-base/builder_help.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/.svn/text-base/builder_help.sce.svn-base
1
2
3
4
5
6
7
8
9
10
11
// ====================================================================
// Yann COLLETTE
// Copyright 2009
// This file is released into the public domain
// ====================================================================
help_dir = get_absolute_file_path('builder_help.sce');
tbx_builder_help_lang("en_US", help_dir);
tbx_builder_help_lang("fr_FR", help_dir);
clear help_dir;
help/en_US/.svn/all-wcprops
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
K 25
svn:wc:ra_dav:version-url
V 42
/svn/!svn/ver/204/trunk/lolimot/help/en_US
END
learn_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 60
/svn/!svn/ver/193/trunk/lolimot/help/en_US/learn_lolimot.xml
END
estim_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 60
/svn/!svn/ver/193/trunk/lolimot/help/en_US/estim_lolimot.xml
END
export_model.xml
K 25
svn:wc:ra_dav:version-url
V 59
/svn/!svn/ver/193/trunk/lolimot/help/en_US/export_model.xml
END
update_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 61
/svn/!svn/ver/193/trunk/lolimot/help/en_US/update_lolimot.xml
END
build_help.sce
K 25
svn:wc:ra_dav:version-url
V 56
/svn/!svn/ver/50/trunk/lolimot/help/en_US/build_help.sce
END
plot_lolimot_part.xml
K 25
svn:wc:ra_dav:version-url
V 64
/svn/!svn/ver/193/trunk/lolimot/help/en_US/plot_lolimot_part.xml
END
write_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 60
/svn/!svn/ver/193/trunk/lolimot/help/en_US/write_lolimot.xml
END
estim_der_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 64
/svn/!svn/ver/193/trunk/lolimot/help/en_US/estim_der_lolimot.xml
END
read_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 59
/svn/!svn/ver/193/trunk/lolimot/help/en_US/read_lolimot.xml
END
export_der_model.xml
K 25
svn:wc:ra_dav:version-url
V 63
/svn/!svn/ver/193/trunk/lolimot/help/en_US/export_der_model.xml
END
estim_vec_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 64
/svn/!svn/ver/193/trunk/lolimot/help/en_US/estim_vec_lolimot.xml
END
learn_valid_lolimot.xml
K 25
svn:wc:ra_dav:version-url
V 66
/svn/!svn/ver/193/trunk/lolimot/help/en_US/learn_valid_lolimot.xml
END
help/en_US/.svn/entries
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/help/en_US
http://scilab-mip.googlecode.com/svn
2009-10-15T13:57:19.562550Z
204
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
learn_lolimot.xml
file
2011-10-14T07:02:44.000000Z
f67572f2b9bf9cae5dc98d1bb5089449
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
5957
estim_lolimot.xml
file
2011-10-14T07:02:44.000000Z
9615089a5cddbb374458c5480f023e0c
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
2815
export_model.xml
file
2011-10-14T07:02:44.000000Z
aa2ddc4eaec8750df0d5574694f7e905
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
3229
update_lolimot.xml
file
2011-10-14T07:02:44.000000Z
d2d66de4cabc4f3c97ca82926aef8622
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
3165
build_help.sce
file
2011-10-14T07:02:44.000000Z
aee6931c49ee5b9c08e56c4c2ac3b28b
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
355
plot_lolimot_part.xml
file
2011-10-14T07:02:44.000000Z
6b9d1f9f2150bc910860467223f887f0
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
2535
write_lolimot.xml
file
2011-10-14T07:02:44.000000Z
b5c87613d5967c810a3e52d35133114e
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
2708
estim_der_lolimot.xml
file
2011-10-14T07:02:44.000000Z
1ea5a9077ebee3ac214db803a62bdfc5
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
2811
read_lolimot.xml
file
2011-10-14T07:02:44.000000Z
ab951398cb859696f0a09f231a4276ad
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
2770
export_der_model.xml
file
2011-10-14T07:02:44.000000Z
591325aca3de37f5c752f784e0e0ff43
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
3126
estim_vec_lolimot.xml
file
2011-10-14T07:02:44.000000Z
4395fa11baafc37d9b628e1535ca56d8
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
2999
learn_valid_lolimot.xml
file
2011-10-14T07:02:44.000000Z
502f6bd71cbe24e6d049918ed4d236dd
2009-10-12T12:46:40.870100Z
193
ycollet@freesurf.fr
has-props
6696
help/en_US/.svn/prop-base/build_help.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/estim_der_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/estim_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/estim_vec_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/export_der_model.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/export_model.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/learn_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/learn_valid_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/plot_lolimot_part.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/read_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/update_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/prop-base/write_lolimot.xml.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/en_US/.svn/text-base/build_help.sce.svn-base
1
2
3
4
5
6
7
8
9
10
11
// ====================================================================
// Yann COLLETTE
// Copyright 2009
// This file is released into the public domain
// ====================================================================
help_lang_dir = get_absolute_file_path('build_help.sce');
tbx_build_help(TOOLBOX_TITLE, help_lang_dir);
clear help_lang_dir;
help/en_US/.svn/text-base/estim_der_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="estim_der_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>estim_der_lolimot</refname>
<refpurpose> Analytical Lolimot derivative of a learnt model </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>f = estim_der_lolimot(x,lolModel)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>x</term>
<listitem>
<para>a vector of coordinates where you want to compute the derivative.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>a Lolimot structure learnt via the learn_lolimot function. It handles the definition of a model.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>f</term>
<listitem>
<para>the value of the analytical derivative of the Lolimot model.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<itemizedlist>
<listitem>
<para>This function computes the analytical derivative of a Lolimot model. See testLolimot.sce in the demos directory.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/estim_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="estim_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>estim_lolimot</refname>
<refpurpose> Computes the Lolimot estimation for a given vector </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>f = estim_lolimot(x,lolModel)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>x</term>
<listitem>
<para>a vector of coordinates where you want to compute the derivative.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>a Lolimot structure learnt via the learn_lolimot function. It handles the definition of a model.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>f</term>
<listitem>
<para>the value of the Lolimot model estimation.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<itemizedlist>
<listitem>
<para>This function computes the estimation of a given input vector for a given learnt model. See testLolimot.sce in the demos directory.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/estim_vec_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="estim_vec_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>estim_vec_lolimot</refname>
<refpurpose> Computes the Lolimot estimation for a given vector </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>f = estim_vec_lolimot(x,lolModel)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>x</term>
<listitem>
<para>a vector of coordinates where you want to compute the derivative.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>a Lolimot structure learnt via the learn_lolimot function. It handles the definition of a model.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>f</term>
<listitem>
<para>the value of the Lolimot model estimation.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><title>Description</title>
<itemizedlist>
<listitem>
<para>This function computes the estimation of a given input vector for a given learnt model. See testLolimot.sce in the demos directory.
Compared to estim_lolimot, this function is faster but consums more memory.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/export_der_model.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="export_der_model">
<info>
<pubdate>2-Apr-2008</pubdate>
</info>
<refnamediv>
<refname>export_der_model</refname>
<refpurpose> Export the partial derivative of a Lolimot model into a .sci file </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>err = export_der_model(modelname,lolModel,file_type)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>modelname</term>
<listitem>
<para>the name of the which will be given to the function. The filename will be "modelname.sci".</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>a structure which contains the Lolimot model.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>file_type</term>
<listitem>
<para>'scilab' or 'matlab'. The type of file which is to be generated.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>err</term>
<listitem>
<para>if a problem occurred during the creation of the file, err is set to %T.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><title>Description</title>
<itemizedlist>
<listitem>
<para>This function exports a the partial derivative of model of a Lolimot model into a .sci file.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
<member>
<link linkend="export_model">export_model</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/export_model.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="export_model">
<info>
<pubdate>2-Apr-2008</pubdate>
</info>
<refnamediv>
<refname>export_model</refname>
<refpurpose> Export a Lolimot model to a .sci file </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>err = export_model(modelname,lolModel,file_type)</synopsis>
</refsynopsisdiv>
<refsection><title>Parameters</title>
<variablelist>
<varlistentry>
<term>modelname</term>
<listitem>
<para>the name of the which will be given to the function. The filename will be "modelname.sci".
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>a structure which contains the Lolimot model.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>file_type</term>
<listitem>
<para>'scilab' or 'matlab'. The type of file which is to be generated.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>err</term>
<listitem>
<para>if a problem occurred during the creation of the file, err is set to %T.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><title>Description</title>
<itemizedlist>
<listitem>
<para>
This function exports a Lolimot model into a .sci file.
</para>
</listitem>
</itemizedlist>
</refsection>
<refsection><title>See Also</title><simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
<member>
<link linkend="export_der_model">export_der_model</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry><term>Yann COLLETTE</term><listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/learn_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab"
xml:lang="en"
xml:id="learn_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>learn_lolimot</refname>
<refpurpose> Learns a Lolimot model for a given inputs/output data set </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>[modelOut,stat] = learn_lolimot(data,sigma,nbpart,maximp,nbCut,vec,Log,modelIn,pLinear)</synopsis>
</refsynopsisdiv>
<refsection><title>Parameters</title>
<variablelist>
<varlistentry>
<term>data</term>
<listitem>
<para>the learning data set. The first columns of the data set contain the inputs and the last column contains the output.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>sigma</term>
<listitem>
<para>The value of the smoothing parameter. Usually, a value of 0.33 (default value) is a good start.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nbpart</term>
<listitem>
<para>Number of partition to generate. You always should have size(data,1) greater than nbpart.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>maximp</term>
<listitem>
<para>If the relative residual improvement is below maximp, we stop the learning process. If you want a Lolimot model with a given number
of partitions, set maximp to 0. Otherwise, a value of 0.05 is a good start.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nbCut</term>
<listitem>
<para>the number of division with respect to dimension which are tested. If nbCut = 2 then, we will cut each dimension in two halves.
If nbCut = 3 then, we will test a 1/3 - 2/3 cut then, we will test a 2/3 - 1/3 cut. We do this for every dimension and then we
retain the best cutting. Usually, nbCut = 2 or 3 is a good start.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vec</term>
<listitem>
<para>a boolean which tell the learning method to use estim_vec_lolimot during the learning process (if vec is set to true) or
estim_lolimot (if vec is set to false).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Log</term>
<listitem>
<para>if set to true, some messages are printed on the console during the learning phase.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>modelIn</term>
<listitem>
<para>if not empty, we will continue the learning phase of the Lolimot model contained in modelIn (modelIn must a lolimot structure).
The structure containts:</para>
<para> - modelIn('nbdim'): the number of inputs </para>
<para> - modelIn('sigma'): the value of the smoothing coefficient </para>
<para> - modelIn('listofmod'): a matrix NbPartitions x NbDim+1 which contains the linear model for each partition </para>
<para> - modelIn('listofcutinf'): the lower boundary of each partition </para>
<para> - modelIn('listofcutplus'): the upper boundary of each partition </para>
<para> - modelIn('listofresidual'): the learning residual associated to each partition </para>
<para> - modelIn('residual'): the global residual associated to the Lolimot model </para>
</listitem>
</varlistentry>
<varlistentry>
<term>pLinear</term>
<listitem>
<para>replace the exponential membership function by a piecewise linear function.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>modelOut</term>
<listitem>
<para>this structure contains the learnt Lolimot model.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>stat</term>
<listitem>
<para>this structure contains some statistical informations related to the learning phase.</para>
<para> - stat(i)(1) contains the residual at iteration i </para>
<para> - stat(i)(2) contains the time required for adding 1 partition at iteration i </para>
<para> - stat(i)(3) contains the number of partition which has been cut </para>
<para> - stat(i)(4) contains the number of dimension which has been cut </para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<itemizedlist>
<listitem>
<para>This function allows to learn a Lolimot model given a learning data set.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
<member>
<link linkend="export_model">export_model</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/learn_valid_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="learn_valid_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>learn_valid_lolimot</refname>
<refpurpose> Learns a Lolimot model for a given inputs/output data set and using a validation data set </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>[modelOut,stat] = learn_valid_lolimot(data_learn,data_valid,sigma,nbpart,maximp,nbCut,vec,Log,modelIn,pLinear)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>data_learn</term>
<listitem>
<para>the learning data set. The first columns of the data set contain the inputs and the last column contains the output.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>data_valid</term>
<listitem>
<para>the validation data set. The first columns of the data set contain the inputs and the last column contains the output.
The learning phase will stop when the residual computed on the validation data set will start to rise.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>sigma</term>
<listitem>
<para>The value of the smoothing parameter. Usually, a value of 0.33 (default value) is a good start.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nbpart</term>
<listitem>
<para>Number of partition to generate. You always should have size(data,1) greater than nbpart.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>maximp</term>
<listitem>
<para>If the relative residual improvement is below maximp, we stop the learning process. If you want a Lolimot model with a given
number of partitions, set maximp to 0. Otherwise, a value of 0.05 is a good start.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nbCut</term>
<listitem>
<para>the number of division with respect to dimension which are tested. If nbCut = 2 then, we will cut each dimension in two halves.
If nbCut = 3 then, we will test a 1/3 - 2/3 cut then, we will test a 2/3 - 1/3 cut. We do this for every dimension and then we
retain the best cutting. Usually, nbCut = 2 or 3 is a good start.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vec</term>
<listitem>
<para>a boolean which tell the learning method to use estim_vec_lolimot during the learning process (if vec is set to true) or
estim_lolimot (if vec is set to false).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Log</term>
<listitem>
<para>if set to true, some messages are printed on the console during the learning phase.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>modelIn</term>
<listitem>
<para>if not empty, we will continue the learning phase of the Lolimot model contained in modelIn (modelIn must a lolimot structure).
The structure containts:</para>
<para> - modelIn('nbdim'): the number of inputs </para>
<para> - modelIn('sigma'): the value of the smoothing coefficient </para>
<para> - modelIn('listofmod'): a matrix NbPartitions x NbDim+1 which contains the linear model for each partition </para>
<para> - modelIn('listofcutinf'): the lower boundary of each partition </para>
<para> - modelIn('listofcutplus'): the upper boundary of each partition </para>
<para> - modelIn('listofresidual'): the learning residual associated to each partition </para>
<para> - modelIn('residual'): the global residual associated to the Lolimot model </para>
</listitem>
</varlistentry>
<varlistentry>
<term>pLinear</term>
<listitem>
<para>replace the exponential membership function by a piecewise linear function.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>modelOut</term>
<listitem>
<para>this structure contains the learnt Lolimot model.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>stat</term>
<listitem>
<para>this structure contains some statistical informations related to the learning phase.</para>
<para> - stat(i)(1) contains the residual at iteration i </para>
<para> - stat(i)(2) contains the time required for adding 1 partition at iteration i </para>
<para> - stat(i)(3) contains the number of partition which has been cut </para>
<para> - stat(i)(4) contains the number of dimension which has been cut </para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><title>Description</title>
<itemizedlist>
<listitem>
<para>
This function allows to learn a Lolimot model given a learning data set. The learning process stops when the residual computed
on the validation data set starts to rise.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection><title>See Also</title><simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>
(ycollet@freesurf.fr)
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/plot_lolimot_part.xml.svn-base
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
87
88
89
90
91
92
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="plot_lolimot_part">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>plot_lolimot_part</refname>
<refpurpose> Plot the Lolimot cuts for a 2D model </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>plot_lolimot_part(lolModel,lol_title)</synopsis>
</refsynopsisdiv>
<refsection><title>Parameters</title>
<variablelist>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>the Lolimot structure which containts the informations related to the partitions to plot. Works only for 2D models.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lol_title</term>
<listitem>
<para>the title of the graphics.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<itemizedlist>
<listitem>
<para>This function plots the cutting of a 2D Lolimot model.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
<member>
<link linkend="export_model">export_model</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/read_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="read_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>read_lolimot</refname>
<refpurpose> Read a Lolimot model </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>[err,modelOut] = read_lolimot(Filename)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>Filename</term>
<listitem>
<para>the name of a Lolimot model</para>
</listitem>
</varlistentry>
<varlistentry>
<term>err</term>
<listitem>
<para>an error flag (the same meaning as with the mopen functions).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>modelOut</term>
<listitem>
<para>a Lolimot structure which contains the read Lolimot model.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<itemizedlist>
<listitem>
<para>This functions allows to read a previously saved Lolimot model.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
<member>
<link linkend="export_model">export_model</link>
</member>
<member>
<link linkend="update_lolimot">update_lolimot</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/update_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab"
xml:lang="en"
xml:id="update_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>update_lolimot</refname>
<refpurpose> The function update the linear models of a given Lolimot model for a given learning data set </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>modelOut = update_lolimot(data,lolModel,vec)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>data</term>
<listitem>
<para>the learning data set. The first columns of the data set contain the inputs and the last column contains the output.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>a Lolimot structure which contains the Lolimot model to be updated</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vec</term>
<listitem>
<para>a boolean which tell the learning method to use estim_vec_lolimot during the learning process (if vec is set to true) or
estim_lolimot (if vec is set to false).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>modelOut</term>
<listitem>
<para>this structure contains the learnt Lolimot model.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<itemizedlist>
<listitem>
<para>This function update the linear models associated to a given Lolimot model with a given data set.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="write_lolimot">write_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
</simplelist></refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/en_US/.svn/text-base/write_lolimot.xml.svn-base
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
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook"
version="5.0-subset Scilab"
xml:lang="en"
xml:id="write_lolimot">
<info>
<pubdate>29-May-2007</pubdate>
</info>
<refnamediv>
<refname>write_lolimot</refname>
<refpurpose> Saves a Lolimot model in a file </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>err = write_lolimot(Filename,lolModel)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>Filename</term>
<listitem>
<para>the file name of the Lolimot model to be saved</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lolModel</term>
<listitem>
<para>the Lolimot structure which contains the Lolimot model to be saved</para>
</listitem>
</varlistentry>
<varlistentry>
<term>err</term>
<listitem>
<para>an error flag (the same meaning as with the mopen functions).</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><title>Description</title>
<itemizedlist>
<listitem>
<para>This function allows to save a previously learnt Lolimot model in a file.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection><title>See Also</title><simplelist type="inline">
<member>
<link linkend="estim_der_lolimot">estim_der_lolimot</link>
</member>
<member>
<link linkend="estim_lolimot">estim_lolimot</link>
</member>
<member>
<link linkend="estim_vec_lolimot">estim_vec_lolimot</link>
</member>
<member>
<link linkend="learn_lolimot">learn_lolimot</link>
</member>
<member>
<link linkend="learn_valid_lolimot">learn_valid_lolimot</link>
</member>
<member>
<link linkend="read_lolimot">read_lolimot</link>
</member>
<member>
<link linkend="export_model">export_model</link>
</member>
<member>
<link linkend="plot_lolimot_part">plot_lolimot_part</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>Yann COLLETTE</term>
<listitem>
<para>(ycollet@freesurf.fr)</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>
help/fr_FR/.svn/all-wcprops
1
2
3
4
5
6
7
8
9
10
11
K 25
svn:wc:ra_dav:version-url
V 41
/svn/!svn/ver/50/trunk/lolimot/help/fr_FR
END
build_help.sce
K 25
svn:wc:ra_dav:version-url
V 56
/svn/!svn/ver/50/trunk/lolimot/help/fr_FR/build_help.sce
END
help/fr_FR/.svn/entries
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
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/help/fr_FR
http://scilab-mip.googlecode.com/svn
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
build_help.sce
file
2011-10-14T07:02:44.000000Z
b9edd97b188f8bd05f9926bfebb19ae8
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
344
help/fr_FR/.svn/prop-base/build_help.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
help/fr_FR/.svn/text-base/build_help.sce.svn-base
1
2
3
4
5
6
7
8
9
10
// ====================================================================
// Copyright INRIA 2008
// This file is released into the public domain
// ====================================================================
help_lang_dir = get_absolute_file_path('build_help.sce');
tbx_build_help(TOOLBOX_TITLE, help_lang_dir);
clear help_lang_dir;
macros/.svn/all-wcprops
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
87
88
89
90
91
92
93
94
95
K 25
svn:wc:ra_dav:version-url
V 38
/svn/!svn/ver/745/trunk/lolimot/macros
END
_phi_norm_data.sci
K 25
svn:wc:ra_dav:version-url
V 56
/svn/!svn/ver/50/trunk/lolimot/macros/_phi_norm_data.sci
END
plot_lolimot_part.sci
K 25
svn:wc:ra_dav:version-url
V 59
/svn/!svn/ver/50/trunk/lolimot/macros/plot_lolimot_part.sci
END
read_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 54
/svn/!svn/ver/50/trunk/lolimot/macros/read_lolimot.sci
END
estim_der_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 59
/svn/!svn/ver/50/trunk/lolimot/macros/estim_der_lolimot.sci
END
estim_vec_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 59
/svn/!svn/ver/50/trunk/lolimot/macros/estim_vec_lolimot.sci
END
learn_valid_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 61
/svn/!svn/ver/50/trunk/lolimot/macros/learn_valid_lolimot.sci
END
_learn_model.sci
K 25
svn:wc:ra_dav:version-url
V 55
/svn/!svn/ver/745/trunk/lolimot/macros/_learn_model.sci
END
estim_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 55
/svn/!svn/ver/50/trunk/lolimot/macros/estim_lolimot.sci
END
update_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 56
/svn/!svn/ver/50/trunk/lolimot/macros/update_lolimot.sci
END
write_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 55
/svn/!svn/ver/50/trunk/lolimot/macros/write_lolimot.sci
END
export_der_model.sci
K 25
svn:wc:ra_dav:version-url
V 58
/svn/!svn/ver/50/trunk/lolimot/macros/export_der_model.sci
END
_phi_norm_data_linear.sci
K 25
svn:wc:ra_dav:version-url
V 63
/svn/!svn/ver/50/trunk/lolimot/macros/_phi_norm_data_linear.sci
END
buildmacros.sce
K 25
svn:wc:ra_dav:version-url
V 53
/svn/!svn/ver/50/trunk/lolimot/macros/buildmacros.sce
END
learn_lolimot.sci
K 25
svn:wc:ra_dav:version-url
V 55
/svn/!svn/ver/50/trunk/lolimot/macros/learn_lolimot.sci
END
export_model.sci
K 25
svn:wc:ra_dav:version-url
V 54
/svn/!svn/ver/50/trunk/lolimot/macros/export_model.sci
END
macros/.svn/entries
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/macros
http://scilab-mip.googlecode.com/svn
2010-09-29T08:37:53.524590Z
745
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
_phi_norm_data.sci
file
2011-10-14T07:02:43.000000Z
70e059f360d708ad211d650c21b0a1fa
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
814
plot_lolimot_part.sci
file
2011-10-14T07:02:43.000000Z
a6431e8cef861df29bd2455b864907d7
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
1101
read_lolimot.sci
file
2011-10-14T07:02:43.000000Z
b6292fc2db1ff95652511c831da8282a
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
1810
estim_der_lolimot.sci
file
2011-10-14T07:02:43.000000Z
4a8af9a1ed9addee7b1996302e05045c
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
4828
estim_vec_lolimot.sci
file
2011-10-14T07:02:43.000000Z
0011bbbb676748a4d6314b5152b49dde
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
618
learn_valid_lolimot.sci
file
2011-10-14T07:02:43.000000Z
aae8c6c7884fd1a5b11e9db6171e1165
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
3792
_learn_model.sci
file
2011-10-14T07:02:43.000000Z
68a305965559bd901332bbb45e3fd7ac
2010-09-29T08:37:53.524590Z
745
ycollet@freesurf.fr
has-props
1123
estim_lolimot.sci
file
2011-10-14T07:02:43.000000Z
2deb614aa087e4e9f77c77cd198852b4
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
558
update_lolimot.sci
file
2011-10-14T07:02:43.000000Z
a34d1238b69d649b6f641f62691a953f
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
998
write_lolimot.sci
file
2011-10-14T07:02:43.000000Z
46d57fee267116ba72ca96ee7bc2dcba
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
1595
export_der_model.sci
file
2011-10-14T07:02:43.000000Z
ab47cffda09e582378d0ea091587456b
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
6185
_phi_norm_data_linear.sci
file
2011-10-14T07:02:43.000000Z
a844ec48ac6dff889a3bf5267bf1e26d
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
2014
buildmacros.sce
file
2011-10-14T07:02:43.000000Z
12512080c8ce6ab296accbf80e04d210
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
328
learn_lolimot.sci
file
2011-10-14T07:02:43.000000Z
1879eed8766c27dafda4ab3c16f114d2
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
5222
export_model.sci
file
2011-10-14T07:02:43.000000Z
c0e5c014e6f75412d30885fc1ea90259
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
has-props
4535
macros/.svn/prop-base/_learn_model.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/_phi_norm_data.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/_phi_norm_data_linear.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/buildmacros.sce.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/estim_der_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/estim_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/estim_vec_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/export_der_model.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/export_model.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/learn_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/learn_valid_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/plot_lolimot_part.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/read_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/update_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/prop-base/write_lolimot.sci.svn-base
1
2
3
4
5
K 14
svn:executable
V 0
END
macros/.svn/text-base/_learn_model.sci.svn-base
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
/////////////////////////////////////////////////////////
// _learn_model //
// //
// Learn the linear model corresponding to a partition //
/////////////////////////////////////////////////////////
function modelOut = _learn_model(data,nopart,lolModel,pLinear)
modelOut = lolModel;
// We build the weighted data set for a partition
if pLinear then
for i=1:size(data,1)
phi_coeff = _phi_norm_data_linear(data(i,1:($-1)),nopart,modelOut);
Input(i,:) = phi_coeff*[1 data(i,1:($-1))];
Output(i) = phi_coeff*data(i,$);
end
else
for i=1:size(data,1)
phi_coeff = _phi_norm_data(data(i,1:($-1)),nopart,modelOut);
Input(i,:) = phi_coeff*[1 data(i,1:($-1))];
Output(i) = phi_coeff*data(i,$);
end
end
lin_model = Input \ Output;
tmp_res = 0;
for i=1:size(Input,1)
tmp_res = tmp_res + (lin_model' * Input(i,:)' - Output(i))^2;
end
// Updating lolModel
modelOut('listofmod')(nopart,:) = lin_model';
modelOut('listofresidual')(nopart) = tmp_res;
endfunction
macros/.svn/text-base/_phi_norm_data.sci.svn-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/////////////////////////////////////////////////////////////////////
// _phi_norm_data //
// //
// For a partition, computes the membership level of a given point //
/////////////////////////////////////////////////////////////////////
function vect_phi = _phi_norm_data(x,nopart,lolModel)
// data: data(:,1:$-1) les entrees, data(:,$) la sortie
for i=1:size(lolModel('listofcutinf'),1)
xc = (lolModel('listofcutinf')(i,:) + lolModel('listofcutplus')(i,:))/2;
dx = lolModel('listofcutplus')(i,:) - lolModel('listofcutinf')(i,:);
phi_tmp(i) = exp(-sum(((x(:)-xc(:)).^2)./(2*lolModel('sigma')^2*dx(:).^2)))
end
vect_phi = phi_tmp(nopart) / max([sum(phi_tmp) %eps]);
endfunction
macros/.svn/text-base/_phi_norm_data_linear.sci.svn-base
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
/////////////////////////////////////////////////////////////////////
// _phi_norm_data_linear //
// //
// For a partition, computes a piecewise linear membership level //
// of a given point //
/////////////////////////////////////////////////////////////////////
function vect_phi = _phi_norm_data_linear(x,nopart,lolModel)
k_overlap = 1.0/lolModel('sigma'); // 0.5 avant
// data: data(:,1:$-1) the inputs, data(:,$) the output
// Use a piecewise linear membership function instead of a gaussian one
for i=1:size(lolModel('listofcutinf'),1)
xc = (lolModel('listofcutinf')(i,:) + lolModel('listofcutplus')(i,:))/2;
dx = lolModel('listofcutplus')(i,:) - lolModel('listofcutinf')(i,:);
phi_tmp(i) = 1;
for j=1:length(xc)
if ((xc(j) - lolModel('sigma')*dx(j)/2 <= x(j))&(x(j) <= xc(j) + lolModel('sigma')*dx(j)/2)) then
phi_aux = 1.0;
elseif ((lolModel('listofcutinf')(i,j) - k_overlap * lolModel('sigma')*dx(j)/2 <= x(j))&(x(j) <= xc(j) - lolModel('sigma')*dx(j)/2)) then
phi_aux = (x(j) - (lolModel('listofcutinf')(i,j) - k_overlap * lolModel('sigma')*dx(j)/2)) / ...
((xc(j) - lolModel('sigma')*dx(j)/2) - (lolModel('listofcutinf')(i,j) - k_overlap * lolModel('sigma')*dx(j)/2));
elseif ((xc(j) + lolModel('sigma')*dx(j)/2 <= x(j))&(x(j) <= lolModel('listofcutplus')(i,j) + k_overlap * lolModel('sigma')*dx(j)/2)) then
phi_aux = (x(j) - (lolModel('listofcutplus')(i,j) + k_overlap * lolModel('sigma')*dx(j)/2)) / ...
((xc(j) + lolModel('sigma')*dx(j) / 2) - (lolModel('listofcutplus')(i,j) + k_overlap * lolModel('sigma')*dx(j)/2));
else
phi_aux = 0;
end
phi_tmp(i) = min(phi_tmp(i), phi_aux); // Certainly simpler most the analytical derivative ...
end
end
vect_phi = phi_tmp(nopart) / max([sum(phi_tmp) %eps]);
endfunction
macros/.svn/text-base/buildmacros.sce.svn-base
1
2
3
4
5
6
7
8
9
// ====================================================================
// Yann COLLETTE
// Copyright 2009
// This file is released into the public domain
// ====================================================================
tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
clear tbx_build_macros;
macros/.svn/text-base/estim_der_lolimot.sci.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//////////////////////////////////////////////////////////////////////////
// estim_der_lolimot //
// For a learnt Lolimot model, computes the estimation of a given point //
//////////////////////////////////////////////////////////////////////////
function f = estim_der_lolimot(x,lolModel)
if lolModel('type')=='exp' then
//////////////////////////////////////////////////////////////////////////////////
// Expression of the partial derivative for the exponential membership function //
//////////////////////////////////////////////////////////////////////////////////
u = 0;
v = 0;
for i=1:size(lolModel('listofcutplus'),1)
// u(x) = sum(i=1,Np) (Li(x) . Ei(x))
xc = (lolModel('listofcutplus')(i,:) + lolModel('listofcutinf')(i,:))/2;
dx = (lolModel('listofcutplus')(i,:) - lolModel('listofcutinf')(i,:))*lolModel('sigma');
Li = lolModel('listofmod')(i,1) + sum(x(:)' .* lolModel('listofmod')(i,2:$));
u = u + Li * exp(- sum((x(:)' - xc(:)') ./ dx(:)').^2);
// v(x) = sum(i=1,Np) (Ei(x))
v = v + exp(- sum((x(:)' - xc(:)') ./ dx(:)').^2);
end
for i=1:length(x)
dv = 0;
du = 0;
for j=1:size(lolModel('listofcutplus'),1)
xc = (lolModel('listofcutplus')(j,:) + lolModel('listofcutinf')(j,:))/2;
dx = ((lolModel('listofcutplus')(j,:) - lolModel('listofcutinf')(j,:))*lolModel('sigma'));
Lj = (lolModel('listofmod')(j,1) + sum(x(:)' .* lolModel('listofmod')(j,2:$)));
// dvk(x) = -2 * sum(i=1,Np) (((xk-xk_centre)/sigmak^2) . Ei(x))
dv = dv - 2 * ((x(i) - xc(i)) / dx(i)^2) * exp(- sum((x(:)' - xc(:)') ./ dx(:)').^2);
// duk(x) = sum(i=1,Np)((ak - 2 * ((xk-xk_centre)/sigmak^2).Li(x)).Ei(x))
du = du + (lolModel('listofmod')(j,i+1) - 2*((x(i) - xc(i)) / dx(i)^2) * Lj) * exp(- sum((x(:)' - xc(:)') ./ dx(:)').^2);
end
f(i,1) = (du * v - dv * u) / max(v^2,%eps);
end
else
///////////////////////////////////////////////////////////////////////////////////////
// Expression of the partial derivative for the piecewise linear membership function //
///////////////////////////////////////////////////////////////////////////////////////
k_overlap = 0.5/lolModel('sigma');
L = [];
Mf = [];
dMf = [];
U = 0; dU = [];
V = 0; dV = [];
for i=1:size(lolModel('listofcutinf'),1)
xc = (lolModel('listofcutinf')(i,:) + lolModel('listofcutplus')(i,:))/2;
dx = (lolModel('listofcutplus')(i,:) - lolModel('listofcutinf')(i,:))*lolModel('sigma');
// Compute the value of membership functions
// Mf = [nb_part x nb_dim] Mf(i,j) = 1;
for j=1:length(xc)
if ((xc(j) - dx(j)/2 < x(j))&(x(j) < xc(j) + dx(j)/2)) then
phi_aux = 1.0;
elseif ((lolModel('listofcutinf')(i,j) - k_overlap * dx(j)/2 <= x(j))&(x(j) <= xc(j) - dx(j)/2)) then
phi_aux = (x(j) - (lolModel('listofcutinf')(i,j) - k_overlap * dx(j)/2)) / ...
((xc(j) - dx(j)/2) - (lolModel('listofcutinf')(i,j) - k_overlap * dx(j)/2));
elseif ((xc(j) + dx(j)/2 <= x(j))&(x(j) <= lolModel('listofcutplus')(i,j) + k_overlap * dx(j)/2)) then
phi_aux = (x(j) - (lolModel('listofcutplus')(i,j) + k_overlap * dx(j)/2)) / ...
((xc(j) + dx(j)/2) - (lolModel('listofcutplus')(i,j) + k_overlap * dx(j)/2));
else
phi_aux = 0;
end
Mf(i,j) = phi_aux;
end
// Compute the value of the linear models
// L = [nb_part x 1]
L(i,1) = lolModel('listofmod')(i,1) + sum(x(:)' .* lolModel('listofmod')(i,2:$));
// Compute the derivative of the membership function
// dMf = [nb_part x nb_dim]
// Which dimension of the current partition has the smallest value of membership function ?
[_tmp,Index] = min(Mf(i,:)); Index = Index(1);
dMf_tmp = 0;
if ((lolModel('listofcutinf')(i,Index) - k_overlap * dx(Index)/2 <= x(Index))&(x(Index) <= xc(Index) - dx(Index)/2)) then
dMf_tmp = 1 / ((xc(Index) - dx(Index)/2) - (lolModel('listofcutinf')(i,Index) - k_overlap * dx(Index)/2));
end
if ((xc(Index) + dx(Index)/2 <= x(Index))&(x(Index) <= lolModel('listofcutplus')(i,Index) + k_overlap * dx(Index)/2)) then
dMf_tmp = 1 / ((xc(Index) + dx(Index)/2) - (lolModel('listofcutplus')(i,Index) + k_overlap * dx(Index)/2));
end
dMf(i,:) = zeros(1,length(x));
dMf(i,Index) = dMf_tmp;
// Compute U
U = U + Mf(i,Index)*L(i);
// Compute V
V = V + Mf(i,Index);
// Compute dU/dxk
dU = dU + lolModel('listofmod')(i,2:$) * Mf(i,Index) + dMf(i,:) * L(i);
// Compute dV/dxk
dV = dV + dMf(i,:);
end
// Compute df/dxk
f = (dU*V-U*dV)/max(V^2,%eps);
end
endfunction
macros/.svn/text-base/estim_lolimot.sci.svn-base
1
2
3
4
5
6
7
8
9
10
11
12
13
//////////////////////////////////////////////////////////////////////////
// estim_lolimot //
// For a learnt Lolimot model, computes the estimation of a given point //
//////////////////////////////////////////////////////////////////////////
function f = estim_lolimot(x,lolModel)
f = 0;
for i=1:size(lolModel('listofcutinf'),1)
vect_phi = _phi_norm_data(x,i,lolModel);
f = f + vect_phi * (lolModel('listofmod')(i,1) + sum(x(:)' .* lolModel('listofmod')(i,2:$)));
end
endfunction
macros/.svn/text-base/estim_vec_lolimot.sci.svn-base
1
2
3
4
5
6
7
8
9
10
11
/////////////////////////////////////////////////////////////////////////////
// estim_vec_lolimot //
// For a learnt Lolimot model, computes the estimation of a several points //
/////////////////////////////////////////////////////////////////////////////
function f = estim_vec_lolimot(x,lolModel)
f = 0;
vect_phi = _phi_norm_data(x,1:size(lolModel('listofcutinf'),1),lolModel); // NbPts x NbParams
f = vect_phi' * (lolModel('listofmod')(:,1) + sum(x(:)' .*. ones(size(lolModel('listofmod'),1),1) .* lolModel('listofmod')(:,2:$),'c'));
endfunction
macros/.svn/text-base/export_der_model.sci.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
//////////////////////////////////////////////////
// export_der_model //
// //
// export a derivative model to scilab / matlab //
//////////////////////////////////////////////////
function err = export_der_model(modelname, lolModel, file_type)
[nargout,nargin] = argn();
if nargin<2 then
error('export_der_model: modelname and lolModel are mandatory. file_type is optional');
end
if ~isdef('file_type','local') then
file_type = 'scilab';
end
if file_type=='scilab' then
comment = '//';
extension = '.sci';
else
comment = '%';
extension = '.m';
end
[fid, err] = mopen(modelname+extension,'w');
if err then return; end
mfprintf(fid,'function y = %s(x)\n',modelname);
// Center of the partitions
mfprintf(fid,'%s Center of the partitions\n',comment);
for i=1:size(lolModel('listofcutinf'),1)
mfprintf(fid,'xc(%d,:) = [',i);
for j=1:size(lolModel('listofcutinf'),2)
mfprintf(fid,' %f ', (lolModel('listofcutinf')(i,j) + lolModel('listofcutplus')(i,j))/2);
end
mfprintf(fid,'];\n');
end
mfprintf(fid,'\n');
// Size of the partitions
mfprintf(fid,'%s Size of the partitions\n',comment);
for i=1:size(lolModel('listofcutinf'),1)
mfprintf(fid,'dx(%d,:) = [',i);
for j=1:size(lolModel('listofcutinf'),2)
mfprintf(fid,' %f ', (lolModel('listofcutplus')(i,j) - lolModel('listofcutinf')(i,j))*lolModel('sigma'));
end
mfprintf(fid,'];\n');
end
mfprintf(fid,'\n');
// Models of the partitions
mfprintf(fid,'%s Models of the partitions\n',comment);
for i=1:size(lolModel('listofmod'),1)
mfprintf(fid,'models(%d,:) = [',i);
for j=1:size(lolModel('listofmod'),2)
mfprintf(fid,' %f ', lolModel('listofmod')(i,j));
end
mfprintf(fid,'];\n');
end
mfprintf(fid,'\n');
if lolModel('type')=='exp' then
// Exponential model
mfprintf(fid,'%s Computation of the derivative of the Lolimot model with exponential membership function\n',comment);
mfprintf(fid,'u = 0; v = 0;\n');
mfprintf(fid,'for i=1:%d\n',size(lolModel('listofcutplus'),1));
mfprintf(fid,' Li = (models(i,1) + sum(x(:)'' .* models(i,2:$)));\n');
mfprintf(fid,' u = u + Li * exp(-sum((x(:)'' - xc(i,:)'')./dx(i,:)'').^2);\n');
mfprintf(fid,' v = v + exp(-sum((x(:)'' - xc(i,:)'')./dx(i,:)'').^2);\n');
mfprintf(fid,'end\n');
mfprintf(fid,'for i=1:%d\n',size(lolModel('listofcutplus'),2));
mfprintf(fid,' du = 0; dv = 0;\n');
mfprintf(fid,' for j=1:%d\n',size(lolModel('listofcutplus'),1));
mfprintf(fid,' Lj = (models(j,1) + sum(x(:)'' .* models(j,2:$)));\n');
mfprintf(fid,' dv = dv - 2 * ((x(i) - xc(j,i)) / dx(j,i)^2) * exp(-sum((x(:)'' - xc(j,:)'')./dx(j,:)'').^2);\n');
mfprintf(fid,' du = du + (models(j,i+1) - 2 * ((x(i) - xc(j,i)) / dx(j,i)^2) * Lj) * exp(-sum((x(:)'' - xc(j,:)'')./dx(j,:)'').^2);\n');
mfprintf(fid,' end\n');
if file_type=='scilab' then
mfprintf(fid,' y(i,1) = (du * v - dv * u) / max(v^2,\%eps);\n');
else
mfprintf(fid,' y(i,1) = (du * v - dv * u) / max(v^2,eps);\n');
end
mfprintf(fid,'end\n');
else
mfprintf(fid,'%s Computation of the derivative of the Lolimot model with piecewise linear membership function\n',comment);
mfprintf(fid,'k_overlap = 0.5 / %f\n',lolModel('sigma'));
mfprintf(fid,'L = []; Mf = []; dMf = []; U = 0; dU = []; V = 0; dV = [];\n');
mfprintf(fid,'for i=1:%d\n',size(lolModel('listofcutplus'),1));
mfprintf(fid,' for j=1:%d\n',size(lolModel('listofcutplus'),2));
mfprintf(fid,' if ((xc(i,j) - dx(i,j)/2 < x(j))&(x(j) < xc(i,j) + dx(i,j)/2)) then\n');
mfprintf(fid,' phi_aux = 1.0;\n');
mfprintf(fid,' elseif ((xc(i,j) - dx(i,j)/%f/2 - k_overlap * dx(i,j)/2 <= x(j))&(x(j) <= xc(i,j) - dx(i,j)/2)) then\n',lolModel('sigma'));
mfprintf(fid,' phi_aux = (x(j) - (xc(i,j) - dx(i,j)/%f/2 - k_overlap *dx(i,j)/2)) / ... \n',lolModel('sigma'));
mfprintf(fid,' ((xc(i,j) - dx(i,j)/2) - (xc(i,j) - dx(i,j)/%f / 2 - k_overlap * dx(i,j)/2));\n',lolModel('sigma'));
mfprintf(fid,' elseif ((xc(i,j) + dx(i,j)/2 <= x(j))&(x(j) <= xc(i,j) + dx(i,j)/%f/2 + k_overlap * dx(i,j)/2)) then\n',lolModel('sigma'));
mfprintf(fid,' phi_aux = (x(j) - (xc(i,j) + dx(i,j)/%f/2 + k_overlap * dx(i,j)/2)) / ...\n',lolModel('sigma'));
mfprintf(fid,' ((xc(i,j) + dx(i,j)/2) - (xc(i,j) + dx(i,j)/%f/2 + k_overlap * dx(i,j)/2))\n',lolModel('sigma'));
mfprintf(fid,' else\n');
mfprintf(fid,' phi_aux = 0;\n');
mfprintf(fid,' end\n');
mfprintf(fid,' Mf(i,j) = phi_aux;\n');
mfprintf(fid,' end\n');
mfprintf(fid,' Li = models(i,1) + sum(x(:)'' .* models(i,2:$));\n');
mfprintf(fid,' [_tmp,Index] = min(Mf(i,:)); Index = Index(1);\n');
mfprintf(fid,' dMf_tmp = 0;\n');
mfprintf(fid,' if ((xc(i,Index) - dx(i,Index)/%f/2 - k_overlap * dx(i,Index)/2 <= x(Index))&(x(Index) <= xc(i,Index) - dx(i,Index)/2)) then\n',lolModel('sigma'));
mfprintf(fid,' dMf_tmp = 1 / ((xc(i,Index) - dx(i,Index)/2) - (xc(i,Index) - dx(i,Index)/%f/2 - k_overlap * dx(i,Index)/2));\n',lolModel('sigma'));
mfprintf(fid,' end\n');
mfprintf(fid,' if ((xc(i,Index) + dx(i,Index)/2 <= x(Index))&(x(Index) <= xc(i,Index) + dx(i,Index)/%f/2 + k_overlap * dx(i,Index)/2)) then\n',lolModel('sigma'));
mfprintf(fid,' dMf_tmp = 1 / ((xc(i,Index) + dx(i,Index)/2) - (xc(i,Index) + dx(i,Index)/%f/2 + k_overlap * dx(i,Index)/2));\n',lolModel('sigma'));
mfprintf(fid,' end\n');
mfprintf(fid,' dMf(i,:) = zeros(1,length(x));\n');
mfprintf(fid,' dMf(i,Index) = dMf_tmp;\n');
mfprintf(fid,' U = U + Mf(i,Index)*Li;\n');i
mfprintf(fid,' V = V + Mf(i,Index);\n');
mfprintf(fid,' dU = dU + models(i,2:$) * Mf(i,Index) + dMf(i,:) * Li;\n');
mfprintf(fid,' dV = dV + dMf(i,:);\n');
mfprintf(fid,'end\n');
if file_type=='scilab' then
mfprintf(fid,'y = (dU*V-U*dV)/max(V^2,\%eps);\n');
else
mfprintf(fid,'y = (dU*V-U*dV)/max(V^2,eps);\n');
end
end
if file_type=='scilab' then
mfprintf(fid,'endfunction\n');
end
mclose(fid);
res = err;
endfunction
macros/.svn/text-base/export_model.sci.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
///////////////////////////////////////
// export_model //
// //
// export a model to scilab / matlab //
///////////////////////////////////////
function err = export_model(modelname, lolModel, file_type)
[nargout,nargin] = argn();
if nargin<2 then
error('export_model: modelname and lolModel are mandatory. file_type is optional');
end
if ~isdef('file_type','local') then
file_type = 'scilab';
end
if file_type=='scilab' then
comment = '//';
extension = '.sci';
else
comment = '%';
extension = '.m';
end
[fid, err] = mopen(modelname+extension,'w');
if err then return; end
mfprintf(fid,'function y = %s(x)\n',modelname);
mfprintf(fid,'SumPhi = 0; y = 0;\n');
// Center of the partitions
mfprintf(fid,'%s Center of the partitions\n',comment);
for i=1:size(lolModel('listofcutinf'),1)
mfprintf(fid,'xc(%d,:) = [',i);
for j=1:size(lolModel('listofcutinf'),2)
mfprintf(fid,' %f ', (lolModel('listofcutinf')(i,j) + lolModel('listofcutplus')(i,j))/2);
end
mfprintf(fid,'];\n');
end
mfprintf(fid,'\n');
// Size of the partitions
mfprintf(fid,'%s Size of the partitions\n',comment);
for i=1:size(lolModel('listofcutinf'),1)
mfprintf(fid,'dx(%d,:) = [',i);
for j=1:size(lolModel('listofcutinf'),2)
mfprintf(fid,' %f ', (lolModel('listofcutplus')(i,j) - lolModel('listofcutinf')(i,j)));
end
mfprintf(fid,'];\n');
end
mfprintf(fid,'\n');
// Models of the partitions
mfprintf(fid,'%s Models of the partitions\n',comment);
for i=1:size(lolModel('listofmod'),1)
mfprintf(fid,'models(%d,:) = [',i);
for j=1:size(lolModel('listofmod'),2)
mfprintf(fid,' %f ', lolModel('listofmod')(i,j));
end
mfprintf(fid,'];\n');
end
mfprintf(fid,'\n');
if lolModel('type')=='exp' then
// Generation of the parameters related to the partitions - exponential membership function
mfprintf(fid,'%s Computing the membership function values\n',comment);
mfprintf(fid,'for i=1:%d\n',size(lolModel('listofcutinf'),1));
mfprintf(fid,' Phi(i) = 0;\n');
mfprintf(fid,' for j=1:%d\n',size(lolModel('listofcutinf'),2));
mfprintf(fid,' Phi(i) = Phi(i) + (x(j) - xc(i,j))^2/(sqrt(2)*%f*dx(i,j))^2;\n',lolModel('sigma'));
mfprintf(fid,' end\n');
mfprintf(fid,' Phi(i) = exp(-Phi(i));\n');
mfprintf(fid,' SumPhi = SumPhi + Phi(i)\n');
mfprintf(fid,'end\n');
else
// Generation of the parameters related to the partitions - piecewise linear membership function
mfprintf(fid,'\nk_overlap = 0.5/%f\n',lolModel('sigma'));
mfprintf(fid,'for i=1:%d\n',size(lolModel('listofcutinf'),1));
mfprintf(fid,' Phi(i) = 1.0;\n');
mfprintf(fid,' for j=1:%d\n',size(lolModel('listofcutinf'),2));
mfprintf(fid,' if (xc(i,j) - %f*dx(i,j)/2 < x(j)) & (x(j) < xc(i,j) + %f*dx(i,j)/2) then\n',lolModel('sigma'),lolModel('sigma'));
mfprintf(fid,' tmp = 1.0;\n');
mfprintf(fid,' elseif (xc(i,j) - dx(i,j) - k_overlap * %f*dx(i,j)/2 <= x(j)) & (x(j) <= xc(i,j) - %f*dx(i,j)/2) then\n',lolModel('sigma'),lolModel('sigma'));
mfprintf(fid,' tmp = (x(j) - xc(i,j) + dx(i,j) + k_overlap * %f*dx(i,j)/2) / (xc(i,j) - %f*dx(i,j)/2 - xc(i,j) + dx(i,j) + k_overlap * %f*dx(i,j)/2);\n',lolModel('sigma'),lolModel('sigma'),lolModel('sigma'));
mfprintf(fid,' elseif (xc(i,j) + %f*dx(i,j)/2 <= x(j)) & (x(j) <= xc(i,j) + dx(i,j) + k_overlap * %f*dx(i,j)/2) then\n', lolModel('sigma'),lolModel('sigma'));
mfprintf(fid,' tmp = (xc(i,j) + dx(i,j) + k_overlap * %f*dx(i,j)/2 - x(j)) / (xc(i,j) + dx(i,j) + k_overlap * %f*dx(i,j)/2 - xc(i,j) + %f*dx(i,j)/2);\n',lolModel('sigma'),lolModel('sigma'),lolModel('sigma'));
mfprintf(fid,' else\n');
mfprintf(fid,' tmp = 0;\n');
mfprintf(fid,' end\n');
mfprintf(fid,' Phi(i) = min(Phi(i), tmp);\n');
mfprintf(fid,' end\n');
mfprintf(fid,' SumPhi = SumPhi + Phi(i)\n');
mfprintf(fid,'end\n');
end
if file_type=='scilab' then
mfprintf(fid,'\nSumPhi = max(SumPhi,\%eps);\n\n');
else
mfprintf(fid,'\nSumPhi = max(SumPhi,eps);\n\n');
end
// Generation of the Lolimot model
mfprintf(fid,'%s Computing the Lolimot model\n',comment);
mfprintf(fid,'for i=1:%d\n',size(lolModel('listofcutinf'),1));
mfprintf(fid,' tmp = models(i,1);\n');
mfprintf(fid,' for j=1:%d\n',size(lolModel('listofcutinf'),2));
mfprintf(fid,' tmp = tmp + x(j)*models(i,j+1);\n');
mfprintf(fid,' end\n');
mfprintf(fid,' y = y + tmp*Phi(i)/SumPhi;\n');
mfprintf(fid,'end\n');
if file_type=='scilab' then
mfprintf(fid,'endfunction\n');
end
mclose(fid);
res = err;
endfunction
macros/.svn/text-base/learn_lolimot.sci.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
//////////////////////////////////////////////////////////////
// learn_lolimot //
// //
// This function build a Lolimot model for a given data set //
//////////////////////////////////////////////////////////////
function [modelOut,stat] = learn_lolimot(data,sigma,nbpart,maximp,nbCut,vec,Log,modelIn,pLinear)
if ~isdef('sigma','local') then
sigma = 0.33;
end
if ~isdef('nbpart','local') then
nbpart = 10;
end
if ~isdef('maximp','local') then
maximp = 0;
end
if ~isdef('nbCut','local') then
nbCut = 2;
end
if ~isdef('vec','local') then
vec = %F;
end
if ~isdef('Log','local') then
Log = %F;
end
if ~isdef('pLinear','local') then
pLinear = %F;
end
if nbCut==1 then nbCut = 2; end
[nargout,nargin] = argn();
stat_is_defined = (nargout==2);
if isdef('modelIn','local') then
if typeof(modelIn)~='lolimot' then
error('learn_lolimot: error - modelIn argument must be a ''lolimot'' structure\n');
end
modelOut = modelIn;
if modelOut('nbdim')~=size(data,2)-1 then
error('learn_lolimot: nbdim of the model doesn''t correspond to the numbre of dimensions in the data set\n');
end
modelOut('sigma') = sigma;
modelOut = _learn_model(data,1,modelOut,pLinear);
modelOut = update_lolimot(data,modelOut,vec);
old_residual = modelOut('residual');
else
// Initialisation of the Lolimot structure
modelOut = mlist(['lolimot','type','nbdim','sigma','listofmod','listofcutinf','listofcutplus','listofresidual','residual', 'min', 'max', ...
[], [], [], [], [], [], [], [] [] []]);
// Initialisation of the first partition
modelOut('nbdim') = size(data,2)-1;
modelOut('listofcutplus') = max(data(:,1:$-1),'r');
modelOut('listofcutinf') = min(data(:,1:$-1),'r');
modelOut('sigma') = sigma;
modelOut('min') = modelOut('listofcutinf');
modelOut('max') = modelOut('listofcutplus');
if pLinear==%T then
modelOut('type') = 'lin';
else
modelOut('type') = 'exp';
end
modelOut = _learn_model(data,1,modelOut,pLinear);
modelOut = update_lolimot(data,modelOut,vec);
old_residual = modelOut('residual');
end
if stat_is_defined then
stat = list();
end
for i=1:nbpart-1
t_start = getdate();
if Log then
printf('learn_lolimot: partition %d / %d - residual = %.2f', i, nbpart,modelOut('residual'));
end
if stat_is_defined then
stat($+1) = [];
stat($)($+1) = modelOut('residual'); // Residual before adding a partition
end
// Find the partition with the maximum residual
[tmp,Index] = max(modelOut('listofresidual')); Index = Index(1);
// We copy the selected cut at the end of the list
modelOut('listofmod') = [modelOut('listofmod'); modelOut('listofmod')(Index,:)];
modelOut('listofcutinf') = [modelOut('listofcutinf'); modelOut('listofcutinf')(Index,:)];
modelOut('listofcutplus') = [modelOut('listofcutplus'); modelOut('listofcutplus')(Index,:)];
// Test some cuttings
Index_ToCut = 0;
Max_ToCut = %inf;
for j=1:modelOut('nbdim')
for k=2:nbCut
mid_pos = (modelOut('listofcutplus')(Index,j) - modelOut('listofcutinf')(Index,j)) * (k-1) / nbCut + modelOut('listofcutinf')(Index,j);
modelOut('listofcutinf')($,j) = mid_pos;
modelOut('listofcutplus')(Index,j) = mid_pos;
modelOut = update_lolimot(data,modelOut,vec);
if modelOut('residual')<Max_ToCut then
Max_ToCut = modelOut('residual');
Index_ToCut = j;
CutPos = k;
end
// Undo the change
modelOut('listofcutinf')($,j) = modelOut('listofcutinf')(Index,j);
modelOut('listofcutplus')(Index,j) = modelOut('listofcutplus')($,j);
end
end
// Perform again the best cutting
mid_pos = (modelOut('listofcutplus')(Index,Index_ToCut) - modelOut('listofcutinf')(Index,Index_ToCut)) * (CutPos-1) / nbCut + modelOut('listofcutinf')(Index,Index_ToCut);
modelOut('listofcutinf')($,Index_ToCut) = mid_pos;
modelOut('listofcutplus')(Index,Index_ToCut) = mid_pos;
modelOut = update_lolimot(data,modelOut,vec);
t_end = getdate();
if Log then
printf(' / %.2f - improvement = %3.2f %% - elapsed time = %.2f s\n', ...
modelOut('residual'),100*abs(old_residual - modelOut('residual')) / max([modelOut('residual') %eps]), etime(t_end,t_start));
end
if stat_is_defined then
stat($)($+1) = modelOut('residual'); // Residual after adding a partition
stat($)($+1) = etime(t_end,t_start); // time required for learning
stat($)($+1) = Index; // Which partition has been cut
stat($)($+1) = Index_ToCut; // The cut dimension
end
if abs(old_residual - modelOut('residual')) / max([modelOut('residual') %eps]) < maximp then
if Log then
printf('learn_lolimot: %f improvement reached - learning phase stopped\n', maximp);
end
break;
end
old_residual = modelOut('residual');
end
endfunction
macros/.svn/text-base/learn_valid_lolimot.sci.svn-base
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//////////////////////////////////////////////////////////////////////////////////////////////
// learn_valid_lolimot //
// //
// This function build a Lolimot model for a given data set and a given validation data set //
//////////////////////////////////////////////////////////////////////////////////////////////
function [modelOut,stat] = learn_valid_lolimot(data_learn, data_valid,sigma,nbpart,maximp,nbCut,vec,Log,modelIn,pLinear)
if ~isdef('sigma','local') then
sigma = 0.33;
end
if ~isdef('nbpart','local') then
nbpart = 10;
end
if ~isdef('maximp','local') then
maximp = 0;
end
if ~isdef('nbCut','local') then
nbCut = 2;
end
if ~isdef('vec','local') then
vec = %F;
end
if ~isdef('Log','local') then
Log = %F;
end
if ~isdef('data_learn','local') then
error('learn_valid_lolimot: data_learn is required\n');
end
if ~isdef('data_valid','local') then
error('learn_valid_lolimot: data_valid is required\n');
end
if size(data_valid,2)~=size(data_learn,2) then
error('learn_valid_lolimot: data_learn and data_valid must have the same number of dimensions\n');
end
if ~isdef('pLinear','local') then
pLinear = %F;
end
if nbCut==1 then nbCut = 2; end
[nargout,nargin] = argn();
stat_is_defined = (nargout==2);
if stat_is_defined then
stat = list();
end
if isdef('modelIn','local') then
// Learn a model with 1 partition
if stat_is_defined then
[modelOut,stat_aux] = learn_lolimot(data_learn,sigma,2,maximp,nbCut,vec,Log,modelIn,pLinear);
stat = lstcat(stat,stat_aux);
else
modelOut = learn_lolimot(data_learn,sigma,2,maximp,nbCut,vec,Log,modelIn,pLinear);
end
else
// Learn a model with 1 partition
if stat_is_defined then
[modelOut,stat_aux] = learn_lolimot(data_learn,sigma,2,maximp,nbCut,vec,Log,pLinear=pLinear);
stat = lstcat(stat,stat_aux);
else
modelOut = learn_lolimot(data_learn,sigma,2,maximp,nbCut,vec,Log,pLinear=pLinear);
end
end
// Perform the validation
Res = 0;
if vec then
for j=1:size(data_valid,1)
Res = Res + (estim_vec_lolimot(data_valid(j,1:$-1),modelOut) - data_valid(j,$))^2;
end
else
for j=1:size(data_valid,1)
Res = Res + (estim_lolimot(data_valid(j,1:$-1),modelOut) - data_valid(j,$))^2;
end
end
Min_Valid = Res;
if Log then
printf('learn_valid_lolimot: Partition %d / %d - validation residual = %.2f\n',1,nbpart,Min_Valid);
end
for i=2:nbpart
old_model = modelOut;
// Learn a model with part+1 partition
if stat_is_defined then
[modelOut,stat_aux] = learn_lolimot(data_learn,sigma,2,maximp,nbCut,vec,Log,modelOut,pLinear);
stat = lstcat(stat,stat_aux);
else
modelOut = learn_lolimot(data_learn,sigma,2,maximp,nbCut,vec,Log,modelOut,pLinear);
end
// Perform the validation
Res = 0;
if Vec then
for j=1:size(data_valid,1)
Res = Res + (estim_vec_lolimot(data_valid(j,1:$-1),modelOut) - data_valid(j,$))^2;
end
else
for j=1:size(data_valid,1)
Res = Res + (estim_lolimot(data_valid(j,1:$-1),modelOut) - data_valid(j,$))^2;
end
end
if Res<Min_Valid then
Min_Valid = Res;
if Log then
printf('learn_valid_lolimot: Partition %d / %d - validation residual = %.2f\n',i,nbpart,Min_Valid);
end
else
if Log then
printf('learn_valid_lolimot: Partition %d / %d - validation residual = %.2f - best residual %.2f - learning phase stopped\n',i,nbpart,Res,Min_Valid);
end
// We switch back to the previous model which was better wrt the validation residual
modelOut = old_model;
break;
end
end
endfunction
macros/.svn/text-base/plot_lolimot_part.sci.svn-base
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
//////////////////////////////////////////////////
// plot_lolimot_part //
// //
// Plot the partitions of a lolimot model in 2D //
//////////////////////////////////////////////////
function plot_lolimot_part(lolModel,lol_title)
if typeof(lolModel)~='lolimot' then
error('plot_lolimot_part: parameter must be of type ''lolimot''\n');
end
if lolModel('nbdim')~=2 then
return
end
listofrects = [];
for i=1:size(lolModel('listofcutinf'),1)
// (x,y): point in the upper left corner
x = lolModel('listofcutinf')(i,1);
y = lolModel('listofcutplus')(i,2);
w = lolModel('listofcutplus')(i,1) - lolModel('listofcutinf')(i,1);
h = lolModel('listofcutplus')(i,2) - lolModel('listofcutinf')(i,2);
listofrects = [listofrects;[x,y,w,h]];
end
xrects(listofrects');
h = gcf();
h.children.data_bounds = [min(lolModel('listofcutinf'),'r'); max(lolModel('listofcutplus'),'r')];
if isdef('lol_title','local') then
xtitle(lol_title,'x','y');
else
xtitle('Cuts','x','y');
end
endfunction
macros/.svn/text-base/read_lolimot.sci.svn-base
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
/////////////////////////////////////////////////////
// read_lolimot //
// //
// Read a lolimot model previously stored on drive //
/////////////////////////////////////////////////////
function [err,modelOut] = read_lolimot(Filename)
[fid, err] = mopen(Filename,'r');
if err then return; end;
modelOut = mlist(['lolimot','type','nbdim','sigma','listofmod','listofcutinf','listofcutplus','listofresidual','residual', 'min', 'max', ...
[], [], [], [], [], [], [], [] [] []]);
txt = mgetl(fid,1); modelOut('nbdim') = eval(txt);
txt = mgetl(fid,1); modelOut('sigma') = eval(txt);
txt = mgetl(fid,1); modelOut('residual') = eval(txt);
txt = mgetl(fid,1); nopart = eval(txt);
// We read the list of models
modelOut('listofmod') = [];
for i=1:nopart
txt = mgetl(fid,1);
modelOut('listofmod') = [modelOut('listofmod'); eval(tokens(txt,' '))'];
end
// We read the list of inf cuts
modelOut('listofcutinf') = [];
for i=1:nopart
txt = mgetl(fid,1);
modelOut('listofcutinf') = [modelOut('listofcutinf'); eval(tokens(txt,' '))'];
end
// We save the list of inf plus
modelOut('listofcutplus') = [];
for i=1:nopart
txt = mgetl(fid,1);
modelOut('listofcutplus') = [modelOut('listofcutplus'); eval(tokens(txt,' '))'];
end
// We save the list of residuals
txt = mgetl(fid,1);
modelOut('listofresidual') = eval(tokens(txt,' '))';
// We read the min bounds
txt = mgetl(fid,1);
modelOut('min') = eval(tokens(txt,' '))';
// We read the max bounds
txt = mgetl(fid,1);
modelOut('max') = eval(tokens(txt,' '))';
txt = mgetl(fid,1);
modelOut('type') = txt;
mclose(fid);
endfunction
macros/.svn/text-base/update_lolimot.sci.svn-base
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
//////////////////////////////////////////////////////////////////////////
// update_lolimot //
// //
// We recompute the linear model of each partition in the Lolimot model //
//////////////////////////////////////////////////////////////////////////
function modelOut = update_lolimot(data,lolModel,vec)
modelOut = lolModel;
if ~isdef('vec','local') then
vec = %F;
end
// Update the linear model of each partition
for i=1:size(modelOut('listofcutinf'),1)
modelOut = _learn_model(data,i,modelOut);
end
// Compute the global residual
tmp_res = 0;
if vec then
for i=1:size(data,1)
tmp_res = tmp_res + (data(i,$) - estim_vec_lolimot(data(i,1:$-1),modelOut))^2;
end
else
for i=1:size(data,1)
tmp_res = tmp_res + (data(i,$) - estim_lolimot(data(i,1:$-1),modelOut))^2;
end
end
modelOut('residual') = tmp_res;
endfunction
macros/.svn/text-base/write_lolimot.sci.svn-base
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
///////////////////////////////////
// write_lolimot //
// //
// Store a learnt model on drive //
///////////////////////////////////
function err = write_lolimot(Filename, lolModel)
[fid, err] = mopen(Filename,'w');
if err then return; end;
mfprintf(fid,'%d\n',lolModel('nbdim'));
mfprintf(fid,'%f\n',lolModel('sigma'));
mfprintf(fid,'%f\n',lolModel('residual'));
mfprintf(fid,'%d\n',size(lolModel('listofmod'),1)); // The number of partitions
// We save the list of models
for i=1:size(lolModel('listofmod'),1)
for j=1:size(lolModel('listofmod'),2)
mfprintf(fid,'%f ',lolModel('listofmod')(i,j));
end
mfprintf(fid,'\n');
end
// We save the list of inf cuts
for i=1:size(lolModel('listofcutinf'),1)
for j=1:size(lolModel('listofcutinf'),2)
mfprintf(fid,'%f ',lolModel('listofcutinf')(i,j));
end
mfprintf(fid,'\n');
end
// We save the list of inf plus
for i=1:size(lolModel('listofcutplus'),1)
for j=1:size(lolModel('listofcutplus'),2)
mfprintf(fid,'%f ',lolModel('listofcutplus')(i,j));
end
mfprintf(fid,'\n');
end
// We save the list of residuals
for i=1:size(lolModel('listofresidual'),1)
mfprintf(fid,'%f ',lolModel('listofresidual')(i));
end
mfprintf(fid,'\n');
// We save the min and max bounds
for i=1:length(lolModel('min'))
mfprintf(fid,'%f ',lolModel('min')(i));
end
mfprintf(fid,'\n');
for i=1:length(lolModel('max'))
mfprintf(fid,'%f ',lolModel('max')(i));
end
mfprintf(fid,'\n');
mfprintf(fid,'%s\n',lolModel('type'));
mclose(fid);
endfunction
tests/.svn/all-wcprops
1
2
3
4
5
K 25
svn:wc:ra_dav:version-url
V 36
/svn/!svn/ver/50/trunk/lolimot/tests
END
tests/.svn/entries
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
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/tests
http://scilab-mip.googlecode.com/svn
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872
unit_tests
dir
tests/unit_tests/.svn/all-wcprops
1
2
3
4
5
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/50/trunk/lolimot/tests/unit_tests
END
tests/unit_tests/.svn/entries
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
10
dir
774
http://scilab-mip.googlecode.com/svn/trunk/lolimot/tests/unit_tests
http://scilab-mip.googlecode.com/svn
2009-03-25T21:01:31.384786Z
50
ycollet@freesurf.fr
8467c916-e554-0410-ae6b-61d3f510c872

Archive Download the corresponding diff file

Branches