122 double *a =
Malloc(
double, 5);
123 double *b =
Malloc(
double, 5);
125 a[0] = 0.5203363837176203;
126 a[1] = 0.3860628599460129;
127 a[2] = 0.3592536954640216;
128 a[3] = 0.6824659760765744;
129 a[4] = 0.5390520090020700;
131 b[0] = 0.1782643262351465;
132 b[1] = 0.0314270210724957;
133 b[2] = 0.5887219369641497;
134 b[3] = 0.7710042954911620;
135 b[4] = 0.8805451245738238;
140 mu_assert(fabs(dot - 0.657117701533133) < 1e-14,
"Incorrect dot (1)");
144 mu_assert(fabs(dot - 0.122522495044048) < 1e-14,
"Incorrect dot (2)");
156 double *a =
Malloc(
double, 5);
157 double *b =
Malloc(
double, 5);
159 a[0] = 0.5203363837176203;
160 a[1] = 0.3860628599460129;
161 a[2] = 0.3592536954640216;
162 a[3] = 0.6824659760765744;
163 a[4] = 0.5390520090020700;
165 b[0] = 0.1782643262351465;
166 b[1] = 0.0314270210724957;
167 b[2] = 0.5887219369641497;
168 b[3] = 0.7710042954911620;
169 b[4] = 0.8805451245738238;
176 mu_assert(fabs(dot - 2.31723456944910) < 1e-14,
"Incorrect dot (1)");
182 mu_assert(fabs(dot - 189.6989652572890179) < 1e-14,
"Incorrect dot (2)");
193 double *a =
Malloc(
double, 5);
194 double *b =
Malloc(
double, 5);
196 a[0] = 0.5203363837176203;
197 a[1] = 0.3860628599460129;
198 a[2] = 0.3592536954640216;
199 a[3] = 0.6824659760765744;
200 a[4] = 0.5390520090020700;
202 b[0] = 0.1782643262351465;
203 b[1] = 0.0314270210724957;
204 b[2] = 0.5887219369641497;
205 b[3] = 0.7710042954911620;
206 b[4] = 0.8805451245738238;
212 mu_assert(fabs(dot - 0.9807642810850747) < 1e-14,
"Incorrect dot (1)");
217 mu_assert(fabs(dot - 0.9997410009167159) < 1e-14,
"Incorrect dot (2)");
237 mu_assert(data->
r == 10,
"Incorrect GenData::r");
256 model->
gamma = 0.348;
259 data->
Z =
Calloc(
double, data->
n * (data->
m + 1));
263 matrix_set(data->
Z, data->
m+1, 0, 0, 1.0000000000000000);
264 matrix_set(data->
Z, data->
m+1, 0, 1, 0.8056271362589000);
265 matrix_set(data->
Z, data->
m+1, 0, 2, 0.4874175854113872);
266 matrix_set(data->
Z, data->
m+1, 0, 3, 0.4453015882771756);
267 matrix_set(data->
Z, data->
m+1, 0, 4, 0.8233234072519983);
268 matrix_set(data->
Z, data->
m+1, 0, 5, 0.2728942849022845);
269 matrix_set(data->
Z, data->
m+1, 1, 0, 1.0000000000000000);
270 matrix_set(data->
Z, data->
m+1, 1, 1, 0.7940590105180981);
271 matrix_set(data->
Z, data->
m+1, 1, 2, 0.1861049005485224);
272 matrix_set(data->
Z, data->
m+1, 1, 3, 0.8469394287449229);
273 matrix_set(data->
Z, data->
m+1, 1, 4, 0.7956168453294307);
274 matrix_set(data->
Z, data->
m+1, 1, 5, 0.2665038412777220);
275 matrix_set(data->
Z, data->
m+1, 2, 0, 1.0000000000000000);
276 matrix_set(data->
Z, data->
m+1, 2, 1, 0.0294257611061681);
277 matrix_set(data->
Z, data->
m+1, 2, 2, 0.0242717976065267);
278 matrix_set(data->
Z, data->
m+1, 2, 3, 0.5039128672814752);
279 matrix_set(data->
Z, data->
m+1, 2, 4, 0.5777227081256917);
280 matrix_set(data->
Z, data->
m+1, 2, 5, 0.1126634767453339);
281 matrix_set(data->
Z, data->
m+1, 3, 0, 1.0000000000000000);
282 matrix_set(data->
Z, data->
m+1, 3, 1, 0.1746563833537603);
283 matrix_set(data->
Z, data->
m+1, 3, 2, 0.9135736087631979);
284 matrix_set(data->
Z, data->
m+1, 3, 3, 0.5270258081021366);
285 matrix_set(data->
Z, data->
m+1, 3, 4, 0.4426030703804438);
286 matrix_set(data->
Z, data->
m+1, 3, 5, 0.9577384085295405);
287 matrix_set(data->
Z, data->
m+1, 4, 0, 1.0000000000000000);
288 matrix_set(data->
Z, data->
m+1, 4, 1, 0.0022298761599785);
289 matrix_set(data->
Z, data->
m+1, 4, 2, 0.3773482059713607);
290 matrix_set(data->
Z, data->
m+1, 4, 3, 0.8009654729622842);
291 matrix_set(data->
Z, data->
m+1, 4, 4, 0.7701104553132680);
292 matrix_set(data->
Z, data->
m+1, 4, 5, 0.4421972387164297);
293 matrix_set(data->
Z, data->
m+1, 5, 0, 1.0000000000000000);
294 matrix_set(data->
Z, data->
m+1, 5, 1, 0.6638830667081945);
295 matrix_set(data->
Z, data->
m+1, 5, 2, 0.6467607601353914);
296 matrix_set(data->
Z, data->
m+1, 5, 3, 0.0434948735457108);
297 matrix_set(data->
Z, data->
m+1, 5, 4, 0.3267543833513200);
298 matrix_set(data->
Z, data->
m+1, 5, 5, 0.3993579061297995);
299 matrix_set(data->
Z, data->
m+1, 6, 0, 1.0000000000000000);
300 matrix_set(data->
Z, data->
m+1, 6, 1, 0.0770493004546461);
301 matrix_set(data->
Z, data->
m+1, 6, 2, 0.3699566427075194);
302 matrix_set(data->
Z, data->
m+1, 6, 3, 0.7863539761080217);
303 matrix_set(data->
Z, data->
m+1, 6, 4, 0.3693175185473680);
304 matrix_set(data->
Z, data->
m+1, 6, 5, 0.9137371110726166);
305 matrix_set(data->
Z, data->
m+1, 7, 0, 1.0000000000000000);
306 matrix_set(data->
Z, data->
m+1, 7, 1, 0.2685233952731509);
307 matrix_set(data->
Z, data->
m+1, 7, 2, 0.8539966432782011);
308 matrix_set(data->
Z, data->
m+1, 7, 3, 0.0967159557826836);
309 matrix_set(data->
Z, data->
m+1, 7, 4, 0.2456426390463990);
310 matrix_set(data->
Z, data->
m+1, 7, 5, 0.0191704319054138);
311 matrix_set(data->
Z, data->
m+1, 8, 0, 1.0000000000000000);
312 matrix_set(data->
Z, data->
m+1, 8, 1, 0.1163951898554611);
313 matrix_set(data->
Z, data->
m+1, 8, 2, 0.7667861436369238);
314 matrix_set(data->
Z, data->
m+1, 8, 3, 0.5031912600213351);
315 matrix_set(data->
Z, data->
m+1, 8, 4, 0.1102697774064020);
316 matrix_set(data->
Z, data->
m+1, 8, 5, 0.4826593547737735);
317 matrix_set(data->
Z, data->
m+1, 9, 0, 1.0000000000000000);
318 matrix_set(data->
Z, data->
m+1, 9, 1, 0.2290251898688216);
319 matrix_set(data->
Z, data->
m+1, 9, 2, 0.4401981048538806);
320 matrix_set(data->
Z, data->
m+1, 9, 3, 0.0884616753393881);
321 matrix_set(data->
Z, data->
m+1, 9, 4, 0.8659836346403005);
322 matrix_set(data->
Z, data->
m+1, 9, 5, 0.1028774221216107);
330 fabs(1.0000000000000000)) < eps,
331 "Incorrect data->Z at 0, 0");
333 fabs(2.4632837902141640)) < eps,
334 "Incorrect data->Z at 0, 1");
336 fabs(-0.3037489220604925)) < eps,
337 "Incorrect data->Z at 0, 2");
339 fabs(-0.0061287029147240)) < eps,
340 "Incorrect data->Z at 0, 3");
342 fabs(0.1822712619914593)) < eps,
343 "Incorrect data->Z at 0, 4");
345 fabs(0.0252737053303148)) < eps,
346 "Incorrect data->Z at 0, 5");
348 fabs(-0.0078753266252524)) < eps,
349 "Incorrect data->Z at 0, 6");
351 fabs(-0.0012800124996018)) < eps,
352 "Incorrect data->Z at 0, 7");
354 fabs(1.0000000000000000)) < eps,
355 "Incorrect data->Z at 1, 0");
357 fabs(2.2923640983040641)) < eps,
358 "Incorrect data->Z at 1, 1");
360 fabs(-0.3048037728463330)) < eps,
361 "Incorrect data->Z at 1, 2");
363 fabs(-0.2586192720897897)) < eps,
364 "Incorrect data->Z at 1, 3");
366 fabs(0.1747912247100736)) < eps,
367 "Incorrect data->Z at 1, 4");
369 fabs(-0.0623497873850738)) < eps,
370 "Incorrect data->Z at 1, 5");
372 fabs(-0.0199493291395259)) < eps,
373 "Incorrect data->Z at 1, 6");
375 fabs(0.0068540206892510)) < eps,
376 "Incorrect data->Z at 1, 7");
378 fabs(1.0000000000000000)) < eps,
379 "Incorrect data->Z at 2, 0");
381 fabs(2.4167201742337761)) < eps,
382 "Incorrect data->Z at 2, 1");
384 fabs(-0.1499385272847361)) < eps,
385 "Incorrect data->Z at 2, 2");
387 fabs(-0.1781619658696836)) < eps,
388 "Incorrect data->Z at 2, 3");
390 fabs(-0.2363293887681946)) < eps,
391 "Incorrect data->Z at 2, 4");
393 fabs(-0.0362117307160720)) < eps,
394 "Incorrect data->Z at 2, 5");
396 fabs(0.0366137533260933)) < eps,
397 "Incorrect data->Z at 2, 6");
399 fabs(0.0227049982868101)) < eps,
400 "Incorrect data->Z at 2, 7");
402 fabs(1.0000000000000000)) < eps,
403 "Incorrect data->Z at 3, 0");
405 fabs(2.3339314848494390)) < eps,
406 "Incorrect data->Z at 3, 1");
408 fabs(0.4067278927345656)) < eps,
409 "Incorrect data->Z at 3, 2");
411 fabs(0.0198947146890620)) < eps,
412 "Incorrect data->Z at 3, 3");
414 fabs(0.1187106614859180)) < eps,
415 "Incorrect data->Z at 3, 4");
417 fabs(0.0734848412140159)) < eps,
418 "Incorrect data->Z at 3, 5");
420 fabs(-0.0166955533210990)) < eps,
421 "Incorrect data->Z at 3, 6");
423 fabs(0.0229112619510384)) < eps,
424 "Incorrect data->Z at 3, 7");
426 fabs(1.0000000000000000)) < eps,
427 "Incorrect data->Z at 4, 0");
429 fabs(2.5061509421266424)) < eps,
430 "Incorrect data->Z at 4, 1");
432 fabs(0.0574469229922174)) < eps,
433 "Incorrect data->Z at 4, 2");
435 fabs(-0.2858649955147738)) < eps,
436 "Incorrect data->Z at 4, 3");
438 fabs(-0.0995031375002134)) < eps,
439 "Incorrect data->Z at 4, 4");
441 fabs(0.0223790101651578)) < eps,
442 "Incorrect data->Z at 4, 5");
444 fabs(-0.0355571480867735)) < eps,
445 "Incorrect data->Z at 4, 6");
447 fabs(-0.0219026472149696)) < eps,
448 "Incorrect data->Z at 4, 7");
450 fabs(1.0000000000000000)) < eps,
451 "Incorrect data->Z at 5, 0");
453 fabs(2.4482858151168982)) < eps,
454 "Incorrect data->Z at 5, 1");
456 fabs(-0.0670998214520230)) < eps,
457 "Incorrect data->Z at 5, 2");
459 fabs(0.3147064295566219)) < eps,
460 "Incorrect data->Z at 5, 3");
462 fabs(0.1070535630418465)) < eps,
463 "Incorrect data->Z at 5, 4");
465 fabs(-0.0052824396955993)) < eps,
466 "Incorrect data->Z at 5, 5");
468 fabs(0.0614363461130733)) < eps,
469 "Incorrect data->Z at 5, 6");
471 fabs(-0.0075355247061472)) < eps,
472 "Incorrect data->Z at 5, 7");
474 fabs(1.0000000000000000)) < eps,
475 "Incorrect data->Z at 6, 0");
477 fabs(2.3638928644404329)) < eps,
478 "Incorrect data->Z at 6, 1");
480 fabs(0.3482541374011597)) < eps,
481 "Incorrect data->Z at 6, 2");
483 fabs(-0.2422541976251498)) < eps,
484 "Incorrect data->Z at 6, 3");
486 fabs(0.0251886519764033)) < eps,
487 "Incorrect data->Z at 6, 4");
489 fabs(-0.0079397861684362)) < eps,
490 "Incorrect data->Z at 6, 5");
492 fabs(0.0424975213407462)) < eps,
493 "Incorrect data->Z at 6, 6");
495 fabs(-0.0204279932276333)) < eps,
496 "Incorrect data->Z at 6, 7");
498 fabs(1.0000000000000000)) < eps,
499 "Incorrect data->Z at 7, 0");
501 fabs(2.3607306299135344)) < eps,
502 "Incorrect data->Z at 7, 1");
504 fabs(-0.0220102589508912)) < eps,
505 "Incorrect data->Z at 7, 2");
507 fabs(0.3913398731540265)) < eps,
508 "Incorrect data->Z at 7, 3");
510 fabs(-0.0941469673695446)) < eps,
511 "Incorrect data->Z at 7, 4");
513 fabs(-0.0477595489009114)) < eps,
514 "Incorrect data->Z at 7, 5");
516 fabs(-0.0367688438245860)) < eps,
517 "Incorrect data->Z at 7, 6");
519 fabs(-0.0133498576642393)) < eps,
520 "Incorrect data->Z at 7, 7");
522 fabs(1.0000000000000000)) < eps,
523 "Incorrect data->Z at 8, 0");
525 fabs(2.5023932475093376)) < eps,
526 "Incorrect data->Z at 8, 1");
528 fabs(0.2929602950386334)) < eps,
529 "Incorrect data->Z at 8, 2");
531 fabs(0.1371647327912284)) < eps,
532 "Incorrect data->Z at 8, 3");
534 fabs(-0.0270505649533715)) < eps,
535 "Incorrect data->Z at 8, 4");
537 fabs(-0.0685258491091892)) < eps,
538 "Incorrect data->Z at 8, 5");
540 fabs(-0.0213385621647371)) < eps,
541 "Incorrect data->Z at 8, 6");
543 fabs(0.0121305554343051)) < eps,
544 "Incorrect data->Z at 8, 7");
546 fabs(1.0000000000000000)) < eps,
547 "Incorrect data->Z at 9, 0");
549 fabs(2.4579608302226870)) < eps,
550 "Incorrect data->Z at 9, 1");
552 fabs(-0.2538863526247282)) < eps,
553 "Incorrect data->Z at 9, 2");
555 fabs(0.0991005899665861)) < eps,
556 "Incorrect data->Z at 9, 3");
558 fabs(-0.1374781282330359)) < eps,
559 "Incorrect data->Z at 9, 4");
561 fabs(0.1043628273525485)) < eps,
562 "Incorrect data->Z at 9, 5");
564 fabs(-0.0024213407513349)) < eps,
565 "Incorrect data->Z at 9, 6");
567 fabs(0.0007673936590348)) < eps,
568 "Incorrect data->Z at 9, 7");
571 1.0000000000000000) < eps,
572 "Incorrect data->RAW at 0, 0");
574 0.8056271362589000) < eps,
575 "Incorrect data->RAW at 0, 1");
577 0.4874175854113872) < eps,
578 "Incorrect data->RAW at 0, 2");
580 0.4453015882771756) < eps,
581 "Incorrect data->RAW at 0, 3");
583 0.8233234072519983) < eps,
584 "Incorrect data->RAW at 0, 4");
586 0.2728942849022845) < eps,
587 "Incorrect data->RAW at 0, 5");
589 1.0000000000000000) < eps,
590 "Incorrect data->RAW at 1, 0");
592 0.7940590105180981) < eps,
593 "Incorrect data->RAW at 1, 1");
595 0.1861049005485224) < eps,
596 "Incorrect data->RAW at 1, 2");
598 0.8469394287449229) < eps,
599 "Incorrect data->RAW at 1, 3");
601 0.7956168453294307) < eps,
602 "Incorrect data->RAW at 1, 4");
604 0.2665038412777220) < eps,
605 "Incorrect data->RAW at 1, 5");
607 1.0000000000000000) < eps,
608 "Incorrect data->RAW at 2, 0");
610 0.0294257611061681) < eps,
611 "Incorrect data->RAW at 2, 1");
613 0.0242717976065267) < eps,
614 "Incorrect data->RAW at 2, 2");
616 0.5039128672814752) < eps,
617 "Incorrect data->RAW at 2, 3");
619 0.5777227081256917) < eps,
620 "Incorrect data->RAW at 2, 4");
622 0.1126634767453339) < eps,
623 "Incorrect data->RAW at 2, 5");
625 1.0000000000000000) < eps,
626 "Incorrect data->RAW at 3, 0");
628 0.1746563833537603) < eps,
629 "Incorrect data->RAW at 3, 1");
631 0.9135736087631979) < eps,
632 "Incorrect data->RAW at 3, 2");
634 0.5270258081021366) < eps,
635 "Incorrect data->RAW at 3, 3");
637 0.4426030703804438) < eps,
638 "Incorrect data->RAW at 3, 4");
640 0.9577384085295405) < eps,
641 "Incorrect data->RAW at 3, 5");
643 1.0000000000000000) < eps,
644 "Incorrect data->RAW at 4, 0");
646 0.0022298761599785) < eps,
647 "Incorrect data->RAW at 4, 1");
649 0.3773482059713607) < eps,
650 "Incorrect data->RAW at 4, 2");
652 0.8009654729622842) < eps,
653 "Incorrect data->RAW at 4, 3");
655 0.7701104553132680) < eps,
656 "Incorrect data->RAW at 4, 4");
658 0.4421972387164297) < eps,
659 "Incorrect data->RAW at 4, 5");
661 1.0000000000000000) < eps,
662 "Incorrect data->RAW at 5, 0");
664 0.6638830667081945) < eps,
665 "Incorrect data->RAW at 5, 1");
667 0.6467607601353914) < eps,
668 "Incorrect data->RAW at 5, 2");
670 0.0434948735457108) < eps,
671 "Incorrect data->RAW at 5, 3");
673 0.3267543833513200) < eps,
674 "Incorrect data->RAW at 5, 4");
676 0.3993579061297995) < eps,
677 "Incorrect data->RAW at 5, 5");
679 1.0000000000000000) < eps,
680 "Incorrect data->RAW at 6, 0");
682 0.0770493004546461) < eps,
683 "Incorrect data->RAW at 6, 1");
685 0.3699566427075194) < eps,
686 "Incorrect data->RAW at 6, 2");
688 0.7863539761080217) < eps,
689 "Incorrect data->RAW at 6, 3");
691 0.3693175185473680) < eps,
692 "Incorrect data->RAW at 6, 4");
694 0.9137371110726166) < eps,
695 "Incorrect data->RAW at 6, 5");
697 1.0000000000000000) < eps,
698 "Incorrect data->RAW at 7, 0");
700 0.2685233952731509) < eps,
701 "Incorrect data->RAW at 7, 1");
703 0.8539966432782011) < eps,
704 "Incorrect data->RAW at 7, 2");
706 0.0967159557826836) < eps,
707 "Incorrect data->RAW at 7, 3");
709 0.2456426390463990) < eps,
710 "Incorrect data->RAW at 7, 4");
712 0.0191704319054138) < eps,
713 "Incorrect data->RAW at 7, 5");
715 1.0000000000000000) < eps,
716 "Incorrect data->RAW at 8, 0");
718 0.1163951898554611) < eps,
719 "Incorrect data->RAW at 8, 1");
721 0.7667861436369238) < eps,
722 "Incorrect data->RAW at 8, 2");
724 0.5031912600213351) < eps,
725 "Incorrect data->RAW at 8, 3");
727 0.1102697774064020) < eps,
728 "Incorrect data->RAW at 8, 4");
730 0.4826593547737735) < eps,
731 "Incorrect data->RAW at 8, 5");
733 1.0000000000000000) < eps,
734 "Incorrect data->RAW at 9, 0");
736 0.2290251898688216) < eps,
737 "Incorrect data->RAW at 9, 1");
739 0.4401981048538806) < eps,
740 "Incorrect data->RAW at 9, 2");
742 0.0884616753393881) < eps,
743 "Incorrect data->RAW at 9, 3");
745 0.8659836346403005) < eps,
746 "Incorrect data->RAW at 9, 4");
748 0.1028774221216107) < eps,
749 "Incorrect data->RAW at 9, 5");
775 mu_assert(test->
r == 10,
"Incorrect test->r");
795 train->
RAW =
Calloc(
double, train->
n * (train->
m + 1));
800 test->
RAW =
Calloc(
double, test->
n * (test->
m + 1));
803 model->
gamma = 1.132;
867 train->
Z = train->
RAW;
930 1.0000000000000000) < eps,
931 "Incorrect test->Z at 0, 0");
933 1.7919375085966578) < eps,
934 "Incorrect test->Z at 0, 1");
936 9.3749010505955841) < eps,
937 "Incorrect test->Z at 0, 2");
939 5.4188812347396071) < eps,
940 "Incorrect test->Z at 0, 3");
942 14.1749662709433490) < eps,
943 "Incorrect test->Z at 0, 4");
945 2.0967148208956785) < eps,
946 "Incorrect test->Z at 0, 5");
948 1.0000000000000000) < eps,
949 "Incorrect test->Z at 1, 0");
951 1.4492639390367632) < eps,
952 "Incorrect test->Z at 1, 1");
954 10.3598279425411341) < eps,
955 "Incorrect test->Z at 1, 2");
957 4.9086179135381158) < eps,
958 "Incorrect test->Z at 1, 3");
960 11.5763085861210531) < eps,
961 "Incorrect test->Z at 1, 4");
963 2.4474439570061368) < eps,
964 "Incorrect test->Z at 1, 5");
966 1.0000000000000000) < eps,
967 "Incorrect test->Z at 2, 0");
969 1.7125210555223442) < eps,
970 "Incorrect test->Z at 2, 1");
972 10.1267642728449463) < eps,
973 "Incorrect test->Z at 2, 2");
975 7.4711312071081304) < eps,
976 "Incorrect test->Z at 2, 3");
978 16.7954195638576316) < eps,
979 "Incorrect test->Z at 2, 4");
981 2.9867291329866701) < eps,
982 "Incorrect test->Z at 2, 5");
984 1.0000000000000000) < eps,
985 "Incorrect test->Z at 3, 0");
987 1.5599347974839732) < eps,
988 "Incorrect test->Z at 3, 1");
990 8.1287657651835250) < eps,
991 "Incorrect test->Z at 3, 2");
993 4.4627669627170601) < eps,
994 "Incorrect test->Z at 3, 3");
996 10.5382257909839403) < eps,
997 "Incorrect test->Z at 3, 4");
999 2.0425829022313486) < eps,
1000 "Incorrect test->Z at 3, 5");
1002 1.0000000000000000) < eps,
1003 "Incorrect test->Z at 4, 0");
1005 1.1070615251210820) < eps,
1006 "Incorrect test->Z at 4, 1");
1008 3.8591733667970094) < eps,
1009 "Incorrect test->Z at 4, 2");
1011 3.1420027555179613) < eps,
1012 "Incorrect test->Z at 4, 3");
1014 7.3657520580430189) < eps,
1015 "Incorrect test->Z at 4, 4");
1017 1.0570891668650841) < eps,
1018 "Incorrect test->Z at 4, 5");
1020 1.0000000000000000) < eps,
1021 "Incorrect test->Z at 5, 0");
1023 2.0048972078646314) < eps,
1024 "Incorrect test->Z at 5, 1");
1026 8.5523796391619555) < eps,
1027 "Incorrect test->Z at 5, 2");
1029 6.2297195520069808) < eps,
1030 "Incorrect test->Z at 5, 3");
1032 16.1775074795210649) < eps,
1033 "Incorrect test->Z at 5, 4");
1035 2.0441111634728997) < eps,
1036 "Incorrect test->Z at 5, 5");
1038 1.0000000000000000) < eps,
1039 "Incorrect test->Z at 6, 0");
1041 1.2742361109643845) < eps,
1042 "Incorrect test->Z at 6, 1");
1044 10.4770471122282736) < eps,
1045 "Incorrect test->Z at 6, 2");
1047 6.4647232181010859) < eps,
1048 "Incorrect test->Z at 6, 3");
1050 12.6115089203184212) < eps,
1051 "Incorrect test->Z at 6, 4");
1053 3.0535665607782896) < eps,
1054 "Incorrect test->Z at 6, 5");
1056 1.0000000000000000) < eps,
1057 "Incorrect test->Z at 7, 0");
1059 1.3901612934200134) < eps,
1060 "Incorrect test->Z at 7, 1");
1062 6.1897209583367783) < eps,
1063 "Incorrect test->Z at 7, 2");
1065 3.8589726502511379) < eps,
1066 "Incorrect test->Z at 7, 3");
1068 11.0809129571265199) < eps,
1069 "Incorrect test->Z at 7, 4");
1071 1.5298881436115606) < eps,
1072 "Incorrect test->Z at 7, 5");
1090 data->
RAW =
Calloc(
double, data->
n * (data->
m + 1));
1095 model->
gamma = 0.348;
1097 double *
K =
Calloc(
double, data->
n * data->
n);
1147 1.0000000000000000) < eps,
1148 "Incorrect K at 0, 0");
1150 0.9159640457437349) < eps,
1151 "Incorrect K at 0, 1");
1153 0.7516316505770226) < eps,
1154 "Incorrect K at 0, 2");
1156 0.8154041985130495) < eps,
1157 "Incorrect K at 0, 3");
1159 0.7612049732149070) < eps,
1160 "Incorrect K at 0, 4");
1162 0.9305199788157297) < eps,
1163 "Incorrect K at 0, 5");
1165 0.7945280927801784) < eps,
1166 "Incorrect K at 0, 6");
1168 0.8274209897573236) < eps,
1169 "Incorrect K at 0, 7");
1171 0.8239539297657018) < eps,
1172 "Incorrect K at 0, 8");
1174 0.8514726457528513) < eps,
1175 "Incorrect K at 0, 9");
1177 0.9159640457437349) < eps,
1178 "Incorrect K at 1, 0");
1180 1.0000000000000000) < eps,
1181 "Incorrect K at 1, 1");
1183 0.7760600552154528) < eps,
1184 "Incorrect K at 1, 2");
1186 0.7023700752771812) < eps,
1187 "Incorrect K at 1, 3");
1189 0.7932181642748459) < eps,
1190 "Incorrect K at 1, 4");
1192 0.7375760206683935) < eps,
1193 "Incorrect K at 1, 5");
1195 0.8253497074841124) < eps,
1196 "Incorrect K at 1, 6");
1198 0.6394060322576254) < eps,
1199 "Incorrect K at 1, 7");
1201 0.7274031225620441) < eps,
1202 "Incorrect K at 1, 8");
1204 0.7162170274961248) < eps,
1205 "Incorrect K at 1, 9");
1207 0.7516316505770226) < eps,
1208 "Incorrect K at 2, 0");
1210 0.7760600552154528) < eps,
1211 "Incorrect K at 2, 1");
1213 1.0000000000000000) < eps,
1214 "Incorrect K at 2, 2");
1216 0.7537124265723788) < eps,
1217 "Incorrect K at 2, 3");
1219 0.9283488505800269) < eps,
1220 "Incorrect K at 2, 4");
1222 0.7056043340833220) < eps,
1223 "Incorrect K at 2, 5");
1225 0.9322674240595221) < eps,
1226 "Incorrect K at 2, 6");
1228 0.7282038382529162) < eps,
1229 "Incorrect K at 2, 7");
1231 0.8232508450896556) < eps,
1232 "Incorrect K at 2, 8");
1234 0.8744753760805232) < eps,
1235 "Incorrect K at 2, 9");
1237 0.8154041985130495) < eps,
1238 "Incorrect K at 3, 0");
1240 0.7023700752771812) < eps,
1241 "Incorrect K at 3, 1");
1243 0.7537124265723788) < eps,
1244 "Incorrect K at 3, 2");
1246 1.0000000000000000) < eps,
1247 "Incorrect K at 3, 3");
1249 0.8723850250880842) < eps,
1250 "Incorrect K at 3, 4");
1252 0.8274320954451651) < eps,
1253 "Incorrect K at 3, 5");
1255 0.8784822458273475) < eps,
1256 "Incorrect K at 3, 6");
1258 0.9335699405227060) < eps,
1259 "Incorrect K at 3, 7");
1261 0.9911621491714698) < eps,
1262 "Incorrect K at 3, 8");
1264 0.8642062408184789) < eps,
1265 "Incorrect K at 3, 9");
1267 0.7612049732149070) < eps,
1268 "Incorrect K at 4, 0");
1270 0.7932181642748459) < eps,
1271 "Incorrect K at 4, 1");
1273 0.9283488505800269) < eps,
1274 "Incorrect K at 4, 2");
1276 0.8723850250880842) < eps,
1277 "Incorrect K at 4, 3");
1279 1.0000000000000000) < eps,
1280 "Incorrect K at 4, 4");
1282 0.6857259898857532) < eps,
1283 "Incorrect K at 4, 5");
1285 0.9979606873291865) < eps,
1286 "Incorrect K at 4, 6");
1288 0.7585568540994299) < eps,
1289 "Incorrect K at 4, 7");
1291 0.9156042422655802) < eps,
1292 "Incorrect K at 4, 8");
1294 0.8220610108488617) < eps,
1295 "Incorrect K at 4, 9");
1297 0.9305199788157297) < eps,
1298 "Incorrect K at 5, 0");
1300 0.7375760206683935) < eps,
1301 "Incorrect K at 5, 1");
1303 0.7056043340833220) < eps,
1304 "Incorrect K at 5, 2");
1306 0.8274320954451651) < eps,
1307 "Incorrect K at 5, 3");
1309 0.6857259898857532) < eps,
1310 "Incorrect K at 5, 4");
1312 1.0000000000000000) < eps,
1313 "Incorrect K at 5, 5");
1315 0.7128058155310608) < eps,
1316 "Incorrect K at 5, 6");
1318 0.9320891767185483) < eps,
1319 "Incorrect K at 5, 7");
1321 0.8328818339901494) < eps,
1322 "Incorrect K at 5, 8");
1324 0.9218622704537242) < eps,
1325 "Incorrect K at 5, 9");
1327 0.7945280927801784) < eps,
1328 "Incorrect K at 6, 0");
1330 0.8253497074841124) < eps,
1331 "Incorrect K at 6, 1");
1333 0.9322674240595221) < eps,
1334 "Incorrect K at 6, 2");
1336 0.8784822458273475) < eps,
1337 "Incorrect K at 6, 3");
1339 0.9979606873291865) < eps,
1340 "Incorrect K at 6, 4");
1342 0.7128058155310608) < eps,
1343 "Incorrect K at 6, 5");
1345 1.0000000000000000) < eps,
1346 "Incorrect K at 6, 6");
1348 0.7712042211054879) < eps,
1349 "Incorrect K at 6, 7");
1351 0.9201278964602475) < eps,
1352 "Incorrect K at 6, 8");
1354 0.8358974835836517) < eps,
1355 "Incorrect K at 6, 9");
1357 0.8274209897573236) < eps,
1358 "Incorrect K at 7, 0");
1360 0.6394060322576254) < eps,
1361 "Incorrect K at 7, 1");
1363 0.7282038382529162) < eps,
1364 "Incorrect K at 7, 2");
1366 0.9335699405227060) < eps,
1367 "Incorrect K at 7, 3");
1369 0.7585568540994299) < eps,
1370 "Incorrect K at 7, 4");
1372 0.9320891767185483) < eps,
1373 "Incorrect K at 7, 5");
1375 0.7712042211054879) < eps,
1376 "Incorrect K at 7, 6");
1378 1.0000000000000000) < eps,
1379 "Incorrect K at 7, 7");
1381 0.9340756478568407) < eps,
1382 "Incorrect K at 7, 8");
1384 0.9416191361969405) < eps,
1385 "Incorrect K at 7, 9");
1387 0.8239539297657018) < eps,
1388 "Incorrect K at 8, 0");
1390 0.7274031225620441) < eps,
1391 "Incorrect K at 8, 1");
1393 0.8232508450896556) < eps,
1394 "Incorrect K at 8, 2");
1396 0.9911621491714698) < eps,
1397 "Incorrect K at 8, 3");
1399 0.9156042422655802) < eps,
1400 "Incorrect K at 8, 4");
1402 0.8328818339901494) < eps,
1403 "Incorrect K at 8, 5");
1405 0.9201278964602475) < eps,
1406 "Incorrect K at 8, 6");
1408 0.9340756478568407) < eps,
1409 "Incorrect K at 8, 7");
1411 1.0000000000000000) < eps,
1412 "Incorrect K at 8, 8");
1414 0.9035820400773296) < eps,
1415 "Incorrect K at 8, 9");
1417 0.8514726457528513) < eps,
1418 "Incorrect K at 9, 0");
1420 0.7162170274961248) < eps,
1421 "Incorrect K at 9, 1");
1423 0.8744753760805232) < eps,
1424 "Incorrect K at 9, 2");
1426 0.8642062408184789) < eps,
1427 "Incorrect K at 9, 3");
1429 0.8220610108488617) < eps,
1430 "Incorrect K at 9, 4");
1432 0.9218622704537242) < eps,
1433 "Incorrect K at 9, 5");
1435 0.8358974835836517) < eps,
1436 "Incorrect K at 9, 6");
1438 0.9416191361969405) < eps,
1439 "Incorrect K at 9, 7");
1441 0.9035820400773296) < eps,
1442 "Incorrect K at 9, 8");
1444 1.0000000000000000) < eps,
1445 "Incorrect K at 9, 9");
1464 data->
RAW =
Calloc(
double, data->
n * (data->
m + 1));
1473 double *
K =
Calloc(
double, data->
n * data->
n);
1523 15.2859595967658617) < eps,
1524 "Incorrect K at 0, 0");
1526 15.4864409009677200) < eps,
1527 "Incorrect K at 0, 1");
1529 8.7847919771675169) < eps,
1530 "Incorrect K at 0, 2");
1532 13.0338783338890352) < eps,
1533 "Incorrect K at 0, 3");
1535 10.8336465195648390) < eps,
1536 "Incorrect K at 0, 4");
1538 13.4376986903046944) < eps,
1539 "Incorrect K at 0, 5");
1541 11.2170859716846412) < eps,
1542 "Incorrect K at 0, 6");
1544 11.8649726239060982) < eps,
1545 "Incorrect K at 0, 7");
1547 11.9910642907247134) < eps,
1548 "Incorrect K at 0, 8");
1550 10.0579319882111839) < eps,
1551 "Incorrect K at 0, 9");
1553 15.4864409009677200) < eps,
1554 "Incorrect K at 1, 0");
1556 18.0085663057827681) < eps,
1557 "Incorrect K at 1, 1");
1559 10.1772186353572813) < eps,
1560 "Incorrect K at 1, 2");
1562 12.4990693290747981) < eps,
1563 "Incorrect K at 1, 3");
1565 12.4611344803924595) < eps,
1566 "Incorrect K at 1, 4");
1568 11.9338476573364556) < eps,
1569 "Incorrect K at 1, 5");
1571 12.8317520536684597) < eps,
1572 "Incorrect K at 1, 6");
1574 10.1728085503000116) < eps,
1575 "Incorrect K at 1, 7");
1577 11.7519359337010130) < eps,
1578 "Incorrect K at 1, 8");
1580 9.3372389753548415) < eps,
1581 "Incorrect K at 1, 9");
1583 8.7847919771675169) < eps,
1584 "Incorrect K at 2, 0");
1586 10.1772186353572813) < eps,
1587 "Incorrect K at 2, 1");
1589 8.7533569584420832) < eps,
1590 "Incorrect K at 2, 2");
1592 9.0141355927477953) < eps,
1593 "Incorrect K at 2, 3");
1595 9.8706020767326290) < eps,
1596 "Incorrect K at 2, 4");
1598 7.4311529847899962) < eps,
1599 "Incorrect K at 2, 5");
1601 9.8317460227342295) < eps,
1602 "Incorrect K at 2, 6");
1604 7.5616330506213130) < eps,
1605 "Incorrect K at 2, 7");
1607 8.8935156801233308) < eps,
1608 "Incorrect K at 2, 8");
1610 7.4623650201501697) < eps,
1611 "Incorrect K at 2, 9");
1613 13.0338783338890352) < eps,
1614 "Incorrect K at 3, 0");
1616 12.4990693290747981) < eps,
1617 "Incorrect K at 3, 1");
1619 9.0141355927477953) < eps,
1620 "Incorrect K at 3, 2");
1622 15.8010293983089412) < eps,
1623 "Incorrect K at 3, 3");
1625 12.5976572300545939) < eps,
1626 "Incorrect K at 3, 4");
1628 12.2952603928598840) < eps,
1629 "Incorrect K at 3, 5");
1631 12.5864308488164252) < eps,
1632 "Incorrect K at 3, 6");
1634 13.5095269679848702) < eps,
1635 "Incorrect K at 3, 7");
1637 14.4248904770779447) < eps,
1638 "Incorrect K at 3, 8");
1640 10.4303067289663023) < eps,
1641 "Incorrect K at 3, 9");
1643 10.8336465195648390) < eps,
1644 "Incorrect K at 4, 0");
1646 12.4611344803924595) < eps,
1647 "Incorrect K at 4, 1");
1649 9.8706020767326290) < eps,
1650 "Incorrect K at 4, 2");
1652 12.5976572300545939) < eps,
1653 "Incorrect K at 4, 3");
1655 12.7332028710821596) < eps,
1656 "Incorrect K at 4, 4");
1658 8.9267358166744923) < eps,
1659 "Incorrect K at 4, 5");
1661 12.6168065443066961) < eps,
1662 "Incorrect K at 4, 6");
1664 9.7796024413467819) < eps,
1665 "Incorrect K at 4, 7");
1667 11.9994372472037618) < eps,
1668 "Incorrect K at 4, 8");
1670 8.6300134557803005) < eps,
1671 "Incorrect K at 4, 9");
1673 13.4376986903046944) < eps,
1674 "Incorrect K at 5, 0");
1676 11.9338476573364556) < eps,
1677 "Incorrect K at 5, 1");
1679 7.4311529847899962) < eps,
1680 "Incorrect K at 5, 2");
1682 12.2952603928598840) < eps,
1683 "Incorrect K at 5, 3");
1685 8.9267358166744923) < eps,
1686 "Incorrect K at 5, 4");
1688 13.3667509754465605) < eps,
1689 "Incorrect K at 5, 5");
1691 9.2374362113086974) < eps,
1692 "Incorrect K at 5, 6");
1694 12.3359255360486753) < eps,
1695 "Incorrect K at 5, 7");
1697 11.2365407617438784) < eps,
1698 "Incorrect K at 5, 8");
1700 10.0736132325944858) < eps,
1701 "Incorrect K at 5, 9");
1703 11.2170859716846412) < eps,
1704 "Incorrect K at 6, 0");
1706 12.8317520536684597) < eps,
1707 "Incorrect K at 6, 1");
1709 9.8317460227342295) < eps,
1710 "Incorrect K at 6, 2");
1712 12.5864308488164252) < eps,
1713 "Incorrect K at 6, 3");
1715 12.6168065443066961) < eps,
1716 "Incorrect K at 6, 4");
1718 9.2374362113086974) < eps,
1719 "Incorrect K at 6, 5");
1721 12.5482922903136540) < eps,
1722 "Incorrect K at 6, 6");
1724 9.8694581744218173) < eps,
1725 "Incorrect K at 6, 7");
1727 11.9652582335280364) < eps,
1728 "Incorrect K at 6, 8");
1730 8.7166346335015064) < eps,
1731 "Incorrect K at 6, 9");
1733 11.8649726239060982) < eps,
1734 "Incorrect K at 7, 0");
1736 10.1728085503000116) < eps,
1737 "Incorrect K at 7, 1");
1739 7.5616330506213130) < eps,
1740 "Incorrect K at 7, 2");
1742 13.5095269679848702) < eps,
1743 "Incorrect K at 7, 3");
1745 9.7796024413467819) < eps,
1746 "Incorrect K at 7, 4");
1748 12.3359255360486753) < eps,
1749 "Incorrect K at 7, 5");
1751 9.8694581744218173) < eps,
1752 "Incorrect K at 7, 6");
1754 12.9524293684505221) < eps,
1755 "Incorrect K at 7, 7");
1757 12.3355075975696309) < eps,
1758 "Incorrect K at 7, 8");
1760 10.1132148127652659) < eps,
1761 "Incorrect K at 7, 9");
1763 11.9910642907247134) < eps,
1764 "Incorrect K at 8, 0");
1766 11.7519359337010130) < eps,
1767 "Incorrect K at 8, 1");
1769 8.8935156801233308) < eps,
1770 "Incorrect K at 8, 2");
1772 14.4248904770779447) < eps,
1773 "Incorrect K at 8, 3");
1775 11.9994372472037618) < eps,
1776 "Incorrect K at 8, 4");
1778 11.2365407617438784) < eps,
1779 "Incorrect K at 8, 5");
1781 11.9652582335280364) < eps,
1782 "Incorrect K at 8, 6");
1784 12.3355075975696309) < eps,
1785 "Incorrect K at 8, 7");
1787 13.3150520649955109) < eps,
1788 "Incorrect K at 8, 8");
1790 9.8405270375666198) < eps,
1791 "Incorrect K at 8, 9");
1793 10.0579319882111839) < eps,
1794 "Incorrect K at 9, 0");
1796 9.3372389753548415) < eps,
1797 "Incorrect K at 9, 1");
1799 7.4623650201501697) < eps,
1800 "Incorrect K at 9, 2");
1802 10.4303067289663023) < eps,
1803 "Incorrect K at 9, 3");
1805 8.6300134557803005) < eps,
1806 "Incorrect K at 9, 4");
1808 10.0736132325944858) < eps,
1809 "Incorrect K at 9, 5");
1811 8.7166346335015064) < eps,
1812 "Incorrect K at 9, 6");
1814 10.1132148127652659) < eps,
1815 "Incorrect K at 9, 7");
1817 9.8405270375666198) < eps,
1818 "Incorrect K at 9, 8");
1820 8.7441654683119356) < eps,
1821 "Incorrect K at 9, 9");
1839 data->
RAW =
Calloc(
double, data->
n * (data->
m + 1));
1844 model->
gamma = 1.23;
1847 double *
K =
Calloc(
double, data->
n * data->
n);
1897 0.9943637704548856) < eps,
1898 "Incorrect K at 0, 0");
1900 0.9946686121177555) < eps,
1901 "Incorrect K at 0, 1");
1903 0.9578937155783831) < eps,
1904 "Incorrect K at 0, 2");
1906 0.9892315762620929) < eps,
1907 "Incorrect K at 0, 3");
1909 0.9787589339778296) < eps,
1910 "Incorrect K at 0, 4");
1912 0.9904431525124753) < eps,
1913 "Incorrect K at 0, 5");
1915 0.9812018448276493) < eps,
1916 "Incorrect K at 0, 6");
1918 0.9846502712939124) < eps,
1919 "Incorrect K at 0, 7");
1921 0.9852360775152181) < eps,
1922 "Incorrect K at 0, 8");
1924 0.9726553489464377) < eps,
1925 "Incorrect K at 0, 9");
1927 0.9946686121177555) < eps,
1928 "Incorrect K at 1, 0");
1930 0.9972853441139281) < eps,
1931 "Incorrect K at 1, 1");
1933 0.9737099505662699) < eps,
1934 "Incorrect K at 1, 2");
1936 0.9873570938969980) < eps,
1937 "Incorrect K at 1, 3");
1939 0.9872109867697908) < eps,
1940 "Incorrect K at 1, 4");
1942 0.9849733935382557) < eps,
1943 "Incorrect K at 1, 5");
1945 0.9885619953841569) < eps,
1946 "Incorrect K at 1, 6");
1948 0.9736717805509784) < eps,
1949 "Incorrect K at 1, 7");
1951 0.9841030912139471) < eps,
1952 "Incorrect K at 1, 8");
1954 0.9651822304880787) < eps,
1955 "Incorrect K at 1, 9");
1957 0.9578937155783831) < eps,
1958 "Incorrect K at 2, 0");
1960 0.9737099505662699) < eps,
1961 "Incorrect K at 2, 1");
1963 0.9574301966133943) < eps,
1964 "Incorrect K at 2, 2");
1966 0.9611091259460700) < eps,
1967 "Incorrect K at 2, 3");
1969 0.9709023602232207) < eps,
1970 "Incorrect K at 2, 4");
1972 0.9315907625390656) < eps,
1973 "Incorrect K at 2, 5");
1975 0.9705232203974647) < eps,
1976 "Incorrect K at 2, 6");
1978 0.9348012913572012) < eps,
1979 "Incorrect K at 2, 7");
1981 0.9594537644613513) < eps,
1982 "Incorrect K at 2, 8");
1984 0.9323746182879774) < eps,
1985 "Incorrect K at 2, 9");
1987 0.9892315762620929) < eps,
1988 "Incorrect K at 3, 0");
1990 0.9873570938969980) < eps,
1991 "Incorrect K at 3, 1");
1993 0.9611091259460700) < eps,
1994 "Incorrect K at 3, 2");
1996 0.9951110594420507) < eps,
1997 "Incorrect K at 3, 3");
1999 0.9877282227805176) < eps,
2000 "Incorrect K at 3, 4");
2002 0.9865497273302540) < eps,
2003 "Incorrect K at 3, 5");
2005 0.9876865775961812) < eps,
2006 "Incorrect K at 3, 6");
2008 0.9906424333748519) < eps,
2009 "Incorrect K at 3, 7");
2011 0.9928175000327435) < eps,
2012 "Incorrect K at 3, 8");
2014 0.9758002897316713) < eps,
2015 "Incorrect K at 3, 9");
2017 0.9787589339778296) < eps,
2018 "Incorrect K at 4, 0");
2020 0.9872109867697908) < eps,
2021 "Incorrect K at 4, 1");
2023 0.9709023602232207) < eps,
2024 "Incorrect K at 4, 2");
2026 0.9877282227805176) < eps,
2027 "Incorrect K at 4, 3");
2029 0.9882189022474748) < eps,
2030 "Incorrect K at 4, 4");
2032 0.9599174207778631) < eps,
2033 "Incorrect K at 4, 5");
2035 0.9877988987284404) < eps,
2036 "Incorrect K at 4, 6");
2038 0.9700057126716283) < eps,
2039 "Incorrect K at 4, 7");
2041 0.9852740882958205) < eps,
2042 "Incorrect K at 4, 8");
2044 0.9555553363633501) < eps,
2045 "Incorrect K at 4, 9");
2047 0.9904431525124753) < eps,
2048 "Incorrect K at 5, 0");
2050 0.9849733935382557) < eps,
2051 "Incorrect K at 5, 1");
2053 0.9315907625390656) < eps,
2054 "Incorrect K at 5, 2");
2056 0.9865497273302540) < eps,
2057 "Incorrect K at 5, 3");
2059 0.9599174207778631) < eps,
2060 "Incorrect K at 5, 4");
2062 0.9902416959670991) < eps,
2063 "Incorrect K at 5, 5");
2065 0.9639775155470058) < eps,
2066 "Incorrect K at 5, 6");
2068 0.9867152808385368) < eps,
2069 "Incorrect K at 5, 7");
2071 0.9813171680326727) < eps,
2072 "Incorrect K at 5, 8");
2074 0.9727966479866800) < eps,
2075 "Incorrect K at 5, 9");
2077 0.9812018448276493) < eps,
2078 "Incorrect K at 6, 0");
2080 0.9885619953841569) < eps,
2081 "Incorrect K at 6, 1");
2083 0.9705232203974647) < eps,
2084 "Incorrect K at 6, 2");
2086 0.9876865775961812) < eps,
2087 "Incorrect K at 6, 3");
2089 0.9877988987284404) < eps,
2090 "Incorrect K at 6, 4");
2092 0.9639775155470058) < eps,
2093 "Incorrect K at 6, 5");
2095 0.9875439243202984) < eps,
2096 "Incorrect K at 6, 6");
2098 0.9708912767839261) < eps,
2099 "Incorrect K at 6, 7");
2101 0.9851182379707764) < eps,
2102 "Incorrect K at 6, 8");
2104 0.9568814495759891) < eps,
2105 "Incorrect K at 6, 9");
2107 0.9846502712939124) < eps,
2108 "Incorrect K at 7, 0");
2110 0.9736717805509784) < eps,
2111 "Incorrect K at 7, 1");
2113 0.9348012913572012) < eps,
2114 "Incorrect K at 7, 2");
2116 0.9906424333748519) < eps,
2117 "Incorrect K at 7, 3");
2119 0.9700057126716283) < eps,
2120 "Incorrect K at 7, 4");
2122 0.9867152808385368) < eps,
2123 "Incorrect K at 7, 5");
2125 0.9708912767839261) < eps,
2126 "Incorrect K at 7, 6");
2128 0.9889671313757883) < eps,
2129 "Incorrect K at 7, 7");
2131 0.9867135908997623) < eps,
2132 "Incorrect K at 7, 8");
2134 0.9731498666169363) < eps,
2135 "Incorrect K at 7, 9");
2137 0.9852360775152181) < eps,
2138 "Incorrect K at 8, 0");
2140 0.9841030912139471) < eps,
2141 "Incorrect K at 8, 1");
2143 0.9594537644613513) < eps,
2144 "Incorrect K at 8, 2");
2146 0.9928175000327435) < eps,
2147 "Incorrect K at 8, 3");
2149 0.9852740882958205) < eps,
2150 "Incorrect K at 8, 4");
2152 0.9813171680326727) < eps,
2153 "Incorrect K at 8, 5");
2155 0.9851182379707764) < eps,
2156 "Incorrect K at 8, 6");
2158 0.9867135908997623) < eps,
2159 "Incorrect K at 8, 7");
2161 0.9900919372870961) < eps,
2162 "Incorrect K at 8, 8");
2164 0.9706093824836438) < eps,
2165 "Incorrect K at 8, 9");
2167 0.9726553489464377) < eps,
2168 "Incorrect K at 9, 0");
2170 0.9651822304880787) < eps,
2171 "Incorrect K at 9, 1");
2173 0.9323746182879774) < eps,
2174 "Incorrect K at 9, 2");
2176 0.9758002897316713) < eps,
2177 "Incorrect K at 9, 3");
2179 0.9555553363633501) < eps,
2180 "Incorrect K at 9, 4");
2182 0.9727966479866800) < eps,
2183 "Incorrect K at 9, 5");
2185 0.9568814495759891) < eps,
2186 "Incorrect K at 9, 6");
2188 0.9731498666169363) < eps,
2189 "Incorrect K at 9, 7");
2191 0.9706093824836438) < eps,
2192 "Incorrect K at 9, 8");
2194 0.9572935857028608) < eps,
2195 "Incorrect K at 9, 9");
2209 double *
K =
Calloc(
double, n*n);
2314 double *
Sigma = NULL;
2318 mu_assert(r == 7,
"Incorrect number of eigenvalues kept");
2324 fabs(0.2153575812884510)) < eps,
2325 "Incorrect P at 0, 0");
2327 fabs(0.2745973925101974)) < eps,
2328 "Incorrect P at 0, 1");
2330 fabs(0.4550895791914591)) < eps,
2331 "Incorrect P at 0, 2");
2333 fabs(-0.3884421314028316)) < eps,
2334 "Incorrect P at 0, 3");
2336 fabs(0.1160315888082866)) < eps,
2337 "Incorrect P at 0, 4");
2339 fabs(0.4302035203307312)) < eps,
2340 "Incorrect P at 0, 5");
2342 fabs(-0.4669338527728559)) < eps,
2343 "Incorrect P at 0, 6");
2345 fabs(0.3217489710376946)) < eps,
2346 "Incorrect P at 1, 0");
2348 fabs(-0.4945822605094066)) < eps,
2349 "Incorrect P at 1, 1");
2351 fabs(0.3769753694343475)) < eps,
2352 "Incorrect P at 1, 2");
2354 fabs(-0.2972948635736606)) < eps,
2355 "Incorrect P at 1, 3");
2357 fabs(-0.1011097319500622)) < eps,
2358 "Incorrect P at 1, 4");
2360 fabs(0.0306004375001570)) < eps,
2361 "Incorrect P at 1, 5");
2363 fabs(0.5322704452300250)) < eps,
2364 "Incorrect P at 1, 6");
2366 fabs(0.3239269538650612)) < eps,
2367 "Incorrect P at 2, 0");
2369 fabs(0.1131046585105233)) < eps,
2370 "Incorrect P at 2, 1");
2372 fabs(-0.5683419560926302)) < eps,
2373 "Incorrect P at 2, 2");
2375 fabs(-0.0566442945574068)) < eps,
2376 "Incorrect P at 2, 3");
2378 fabs(-0.2195800248661894)) < eps,
2379 "Incorrect P at 2, 4");
2381 fabs(-0.0120101816760300)) < eps,
2382 "Incorrect P at 2, 5");
2384 fabs(-0.0868590923278641)) < eps,
2385 "Incorrect P at 2, 6");
2387 fabs(0.3643049297817086)) < eps,
2388 "Incorrect P at 3, 0");
2390 fabs(0.3137060295518203)) < eps,
2391 "Incorrect P at 3, 1");
2393 fabs(0.1059271459195730)) < eps,
2394 "Incorrect P at 3, 2");
2396 fabs(0.2260527473443755)) < eps,
2397 "Incorrect P at 3, 3");
2399 fabs(0.2873469240341838)) < eps,
2400 "Incorrect P at 3, 4");
2402 fabs(-0.3577074997001115)) < eps,
2403 "Incorrect P at 3, 5");
2405 fabs(-0.1176008886950781)) < eps,
2406 "Incorrect P at 3, 6");
2408 fabs(0.2685490754867729)) < eps,
2409 "Incorrect P at 4, 0");
2411 fabs(-0.3602884322676240)) < eps,
2412 "Incorrect P at 4, 1");
2414 fabs(-0.4208535241232802)) < eps,
2415 "Incorrect P at 4, 2");
2417 fabs(-0.5004289581783992)) < eps,
2418 "Incorrect P at 4, 3");
2420 fabs(0.0581201143184524)) < eps,
2421 "Incorrect P at 4, 4");
2423 fabs(-0.1560533086067875)) < eps,
2424 "Incorrect P at 4, 5");
2426 fabs(-0.2808692440831040)) < eps,
2427 "Incorrect P at 4, 6");
2429 fabs(0.3097165272244328)) < eps,
2430 "Incorrect P at 5, 0");
2432 fabs(-0.3150295049924597)) < eps,
2433 "Incorrect P at 5, 1");
2435 fabs(0.2661795640562757)) < eps,
2436 "Incorrect P at 5, 2");
2438 fabs(0.3687999410293836)) < eps,
2439 "Incorrect P at 5, 3");
2441 fabs(0.0756501054032381)) < eps,
2442 "Incorrect P at 5, 4");
2444 fabs(-0.4702905504198338)) < eps,
2445 "Incorrect P at 5, 5");
2447 fabs(-0.2502907081561355)) < eps,
2448 "Incorrect P at 5, 6");
2450 fabs(0.3303343184191819)) < eps,
2451 "Incorrect P at 6, 0");
2453 fabs(0.0877791634967746)) < eps,
2454 "Incorrect P at 6, 1");
2456 fabs(-0.2291903024112904)) < eps,
2457 "Incorrect P at 6, 2");
2459 fabs(0.3378230216485225)) < eps,
2460 "Incorrect P at 6, 3");
2462 fabs(0.2813505143218815)) < eps,
2463 "Incorrect P at 6, 4");
2465 fabs(0.4390481386320075)) < eps,
2466 "Incorrect P at 6, 5");
2468 fabs(0.3960648555497706)) < eps,
2469 "Incorrect P at 6, 6");
2471 fabs(0.2867008390424503)) < eps,
2472 "Incorrect P at 7, 0");
2474 fabs(0.5529782699385689)) < eps,
2475 "Incorrect P at 7, 1");
2477 fabs(0.0595354369281301)) < eps,
2478 "Incorrect P at 7, 2");
2480 fabs(-0.3535615166878320)) < eps,
2481 "Incorrect P at 7, 3");
2483 fabs(-0.0706307412848860)) < eps,
2484 "Incorrect P at 7, 4");
2486 fabs(-0.3515408303354066)) < eps,
2487 "Incorrect P at 7, 5");
2489 fabs(0.3840483694579672)) < eps,
2490 "Incorrect P at 7, 6");
2492 fabs(0.3474605686018905)) < eps,
2493 "Incorrect P at 8, 0");
2495 fabs(-0.1590687116733123)) < eps,
2496 "Incorrect P at 8, 1");
2498 fabs(-0.0565892834229501)) < eps,
2499 "Incorrect P at 8, 2");
2501 fabs(0.0725995550169575)) < eps,
2502 "Incorrect P at 8, 3");
2504 fabs(0.4060731268950495)) < eps,
2505 "Incorrect P at 8, 4");
2507 fabs(0.2797250817800897)) < eps,
2508 "Incorrect P at 8, 5");
2510 fabs(-0.0976363581213828)) < eps,
2511 "Incorrect P at 8, 6");
2513 fabs(0.3638159501275298)) < eps,
2514 "Incorrect P at 9, 0");
2516 fabs(0.0305969903511121)) < eps,
2517 "Incorrect P at 9, 1");
2519 fabs(0.0964657835567429)) < eps,
2520 "Incorrect P at 9, 2");
2522 fabs(0.2749121311297592)) < eps,
2523 "Incorrect P at 9, 3");
2525 fabs(-0.7664116168127906)) < eps,
2526 "Incorrect P at 9, 4");
2528 fabs(0.2139473364333364)) < eps,
2529 "Incorrect P at 9, 5");
2531 fabs(-0.1478517167777606)) < eps,
2532 "Incorrect P at 9, 6");
2535 mu_assert(fabs(Sigma[0] - 22.9663721202447704) < eps,
2536 "Incorrect Sigma at 0");
2537 mu_assert(fabs(Sigma[1] - 2.2569857335186856) < eps,
2538 "Incorrect Sigma at 1");
2539 mu_assert(fabs(Sigma[2] - 1.4177404640754938) < eps,
2540 "Incorrect Sigma at 2");
2541 mu_assert(fabs(Sigma[3] - 1.0075496644459232) < eps,
2542 "Incorrect Sigma at 3");
2543 mu_assert(fabs(Sigma[4] - 0.7919296491505164) < eps,
2544 "Incorrect Sigma at 4");
2545 mu_assert(fabs(Sigma[5] - 0.6808726728950240) < eps,
2546 "Incorrect Sigma at 5");
2547 mu_assert(fabs(Sigma[6] - 0.2909718164349679) < eps,
2548 "Incorrect Sigma at 6");
2568 data_1->
RAW =
Calloc(
double, data_1->
n * (data_1->
m + 1));
2572 data_2->
RAW =
Calloc(
double, data_2->
n * (data_2->
m + 1));
2577 model->
gamma = 0.348;
2645 0.9807518230471629) < eps,
2646 "Incorrect K2 at 0, 0");
2648 0.8852741170384059) < eps,
2649 "Incorrect K2 at 0, 1");
2651 0.7635716665765656) < eps,
2652 "Incorrect K2 at 0, 2");
2654 0.7492080432261149) < eps,
2655 "Incorrect K2 at 0, 3");
2657 0.7170903046043821) < eps,
2658 "Incorrect K2 at 0, 4");
2660 0.9391346724948219) < eps,
2661 "Incorrect K2 at 0, 5");
2663 0.7511075325872592) < eps,
2664 "Incorrect K2 at 0, 6");
2666 0.8068193111978309) < eps,
2667 "Incorrect K2 at 0, 7");
2669 0.7712432709418185) < eps,
2670 "Incorrect K2 at 0, 8");
2672 0.8700312205062914) < eps,
2673 "Incorrect K2 at 0, 9");
2675 0.9841138078975342) < eps,
2676 "Incorrect K2 at 1, 0");
2678 0.8790397003296203) < eps,
2679 "Incorrect K2 at 1, 1");
2681 0.7669459160670393) < eps,
2682 "Incorrect K2 at 1, 2");
2684 0.7703671633763146) < eps,
2685 "Incorrect K2 at 1, 3");
2687 0.7272525607549757) < eps,
2688 "Incorrect K2 at 1, 4");
2690 0.9511025236778456) < eps,
2691 "Incorrect K2 at 1, 5");
2693 0.7605364853756941) < eps,
2694 "Incorrect K2 at 1, 6");
2696 0.8282285706223327) < eps,
2697 "Incorrect K2 at 1, 7");
2699 0.7905551836844474) < eps,
2700 "Incorrect K2 at 1, 8");
2702 0.8829411638604122) < eps,
2703 "Incorrect K2 at 1, 9");
2705 0.9259609685011719) < eps,
2706 "Incorrect K2 at 2, 0");
2708 0.8145263140370310) < eps,
2709 "Incorrect K2 at 2, 1");
2711 0.8395046061962322) < eps,
2712 "Incorrect K2 at 2, 2");
2714 0.7622039915518654) < eps,
2715 "Incorrect K2 at 2, 3");
2717 0.7511426474507734) < eps,
2718 "Incorrect K2 at 2, 4");
2720 0.9415384710796756) < eps,
2721 "Incorrect K2 at 2, 5");
2723 0.7783683734706774) < eps,
2724 "Incorrect K2 at 2, 6");
2726 0.8503122106685652) < eps,
2727 "Incorrect K2 at 2, 7");
2729 0.8011956519011766) < eps,
2730 "Incorrect K2 at 2, 8");
2732 0.9458326999989332) < eps,
2733 "Incorrect K2 at 2, 9");
2735 0.8296567517703916) < eps,
2736 "Incorrect K2 at 3, 0");
2738 0.9519346106202000) < eps,
2739 "Incorrect K2 at 3, 1");
2741 0.8748910369012700) < eps,
2742 "Incorrect K2 at 3, 2");
2744 0.7304409952010390) < eps,
2745 "Incorrect K2 at 3, 3");
2747 0.9040565707355339) < eps,
2748 "Incorrect K2 at 3, 4");
2750 0.6649291594794616) < eps,
2751 "Incorrect K2 at 3, 5");
2753 0.9229382678947169) < eps,
2754 "Incorrect K2 at 3, 6");
2756 0.6306350314426549) < eps,
2757 "Incorrect K2 at 3, 7");
2759 0.7718806233578666) < eps,
2760 "Incorrect K2 at 3, 8");
2762 0.7285359056939609) < eps,
2763 "Incorrect K2 at 3, 9");
2765 0.9509298370980613) < eps,
2766 "Incorrect K2 at 4, 0");
2768 0.8040728104591074) < eps,
2769 "Incorrect K2 at 4, 1");
2771 0.6448137876591025) < eps,
2772 "Incorrect K2 at 4, 2");
2774 0.8810145544703872) < eps,
2775 "Incorrect K2 at 4, 3");
2777 0.7167145071888406) < eps,
2778 "Incorrect K2 at 4, 4");
2780 0.9268433969926227) < eps,
2781 "Incorrect K2 at 4, 5");
2783 0.7452783549758193) < eps,
2784 "Incorrect K2 at 4, 6");
2786 0.8788513369285231) < eps,
2787 "Incorrect K2 at 4, 7");
2789 0.8577568482722602) < eps,
2790 "Incorrect K2 at 4, 8");
2792 0.8117847908337736) < eps,
2793 "Incorrect K2 at 4, 9");
2814 data_1->
RAW =
Calloc(
double, data_1->
n * (data_1->
m + 1));
2818 data_2->
RAW =
Calloc(
double, data_2->
n * (data_2->
m + 1));
2893 14.0660499715713421) < eps,
2894 "Incorrect K2 at 0, 0");
2896 14.0798736090876808) < eps,
2897 "Incorrect K2 at 0, 1");
2899 8.1700400917705256) < eps,
2900 "Incorrect K2 at 0, 2");
2902 11.1676455855990469) < eps,
2903 "Incorrect K2 at 0, 3");
2905 9.3728783610105122) < eps,
2906 "Incorrect K2 at 0, 4");
2908 12.6182273329088108) < eps,
2909 "Incorrect K2 at 0, 5");
2911 9.7694076615604182) < eps,
2912 "Incorrect K2 at 0, 6");
2914 10.7135530249071351) < eps,
2915 "Incorrect K2 at 0, 7");
2917 10.3924703115971937) < eps,
2918 "Incorrect K2 at 0, 8");
2920 9.4643617813593419) < eps,
2921 "Incorrect K2 at 0, 9");
2923 14.0284757046542925) < eps,
2924 "Incorrect K2 at 1, 0");
2926 13.9144650311002316) < eps,
2927 "Incorrect K2 at 1, 1");
2929 8.1499265608165583) < eps,
2930 "Incorrect K2 at 1, 2");
2932 11.4045391037528390) < eps,
2933 "Incorrect K2 at 1, 3");
2935 9.4504735861367735) < eps,
2936 "Incorrect K2 at 1, 4");
2938 12.6901332253769485) < eps,
2939 "Incorrect K2 at 1, 5");
2941 9.8317381138302018) < eps,
2942 "Incorrect K2 at 1, 6");
2944 10.9280234697682062) < eps,
2945 "Incorrect K2 at 1, 7");
2947 10.5883823060327860) < eps,
2948 "Incorrect K2 at 1, 8");
2950 9.5490652847135138) < eps,
2951 "Incorrect K2 at 1, 9");
2953 11.5485754684510606) < eps,
2954 "Incorrect K2 at 2, 0");
2956 11.2735171075936282) < eps,
2957 "Incorrect K2 at 2, 1");
2959 7.5769874635472778) < eps,
2960 "Incorrect K2 at 2, 2");
2962 9.6665605291258849) < eps,
2963 "Incorrect K2 at 2, 3");
2965 8.2678047879187648) < eps,
2966 "Incorrect K2 at 2, 4");
2968 10.8709836661754018) < eps,
2969 "Incorrect K2 at 2, 5");
2971 8.5376169230827301) < eps,
2972 "Incorrect K2 at 2, 6");
2974 9.6025396489681700) < eps,
2975 "Incorrect K2 at 2, 7");
2977 9.1503562342971971) < eps,
2978 "Incorrect K2 at 2, 8");
2980 8.7190361363030764) < eps,
2981 "Incorrect K2 at 2, 9");
2983 13.1667427919927871) < eps,
2984 "Incorrect K2 at 3, 0");
2986 16.1629665429693823) < eps,
2987 "Incorrect K2 at 3, 1");
2989 10.5015908640040099) < eps,
2990 "Incorrect K2 at 3, 2");
2992 11.9214318530013443) < eps,
2993 "Incorrect K2 at 3, 3");
2995 12.9437638270688211) < eps,
2996 "Incorrect K2 at 3, 4");
2998 9.8267375915304900) < eps,
2999 "Incorrect K2 at 3, 5");
3001 13.0942580006333298) < eps,
3002 "Incorrect K2 at 3, 6");
3004 9.1036164336081900) < eps,
3005 "Incorrect K2 at 3, 7");
3007 11.4137186988419348) < eps,
3008 "Incorrect K2 at 3, 8");
3010 8.6105081033670565) < eps,
3011 "Incorrect K2 at 3, 9");
3013 16.6753988505663493) < eps,
3014 "Incorrect K2 at 4, 0");
3016 15.8396512236024520) < eps,
3017 "Incorrect K2 at 4, 1");
3019 8.8303654890651160) < eps,
3020 "Incorrect K2 at 4, 2");
3022 15.9428461498604186) < eps,
3023 "Incorrect K2 at 4, 3");
3025 11.9205101781336413) < eps,
3026 "Incorrect K2 at 4, 4");
3028 15.3360611842713368) < eps,
3029 "Incorrect K2 at 4, 5");
3031 12.2768145090113094) < eps,
3032 "Incorrect K2 at 4, 6");
3034 14.4512803240791001) < eps,
3035 "Incorrect K2 at 4, 7");
3037 14.3401441810752441) < eps,
3038 "Incorrect K2 at 4, 8");
3040 11.2489550339576638) < eps,
3041 "Incorrect K2 at 4, 9");
3062 data_1->
RAW =
Calloc(
double, data_1->
n * (data_1->
m + 1));
3066 data_2->
RAW =
Calloc(
double, data_2->
n * (data_2->
m + 1));
3071 model->
gamma = 1.23;
3141 0.9920395702373311) < eps,
3142 "Incorrect K2 at 0, 0");
3144 0.9920712050042086) < eps,
3145 "Incorrect K2 at 0, 1");
3147 0.9476993343669046) < eps,
3148 "Incorrect K2 at 0, 2");
3150 0.9809051895947648) < eps,
3151 "Incorrect K2 at 0, 3");
3153 0.9656014407964381) < eps,
3154 "Incorrect K2 at 0, 4");
3156 0.9878041245323028) < eps,
3157 "Incorrect K2 at 0, 5");
3159 0.9699033492645315) < eps,
3160 "Incorrect K2 at 0, 6");
3162 0.9779225156794014) < eps,
3163 "Incorrect K2 at 0, 7");
3165 0.9754999374304111) < eps,
3166 "Incorrect K2 at 0, 8");
3168 0.9666518758877651) < eps,
3169 "Incorrect K2 at 0, 9");
3171 0.9919528767612884) < eps,
3172 "Incorrect K2 at 1, 0");
3174 0.9916833786531655) < eps,
3175 "Incorrect K2 at 1, 1");
3177 0.9473218250023265) < eps,
3178 "Incorrect K2 at 1, 2");
3180 0.9822808818850081) < eps,
3181 "Incorrect K2 at 1, 3");
3183 0.9664947467723793) < eps,
3184 "Incorrect K2 at 1, 4");
3186 0.9880653879683305) < eps,
3187 "Incorrect K2 at 1, 5");
3189 0.9705231426655428) < eps,
3190 "Incorrect K2 at 1, 6");
3192 0.9793914678629526) < eps,
3193 "Incorrect K2 at 1, 7");
3195 0.9770114192540243) < eps,
3196 "Incorrect K2 at 1, 8");
3198 0.9675925213675517) < eps,
3199 "Incorrect K2 at 1, 9");
3201 0.9830631959900493) < eps,
3202 "Incorrect K2 at 2, 0");
3204 0.9815341888355711) < eps,
3205 "Incorrect K2 at 2, 1");
3207 0.9351678264557334) < eps,
3208 "Incorrect K2 at 2, 2");
3210 0.9688485293248640) < eps,
3211 "Incorrect K2 at 2, 3");
3213 0.9494915246914850) < eps,
3214 "Incorrect K2 at 2, 4");
3216 0.9790117279097025) < eps,
3217 "Incorrect K2 at 2, 5");
3219 0.9540901254104273) < eps,
3220 "Incorrect K2 at 2, 6");
3222 0.9681710508625928) < eps,
3223 "Incorrect K2 at 2, 7");
3225 0.9628881304379768) < eps,
3226 "Incorrect K2 at 2, 8");
3228 0.9569175771195083) < eps,
3229 "Incorrect K2 at 2, 9");
3231 0.9896480192770086) < eps,
3232 "Incorrect K2 at 3, 0");
3234 0.9955708509948572) < eps,
3235 "Incorrect K2 at 3, 1");
3237 0.9763550511314351) < eps,
3238 "Incorrect K2 at 3, 2");
3240 0.9849157087004718) < eps,
3241 "Incorrect K2 at 3, 3");
3243 0.9889385756779369) < eps,
3244 "Incorrect K2 at 3, 4");
3246 0.9704739495606978) < eps,
3247 "Incorrect K2 at 3, 5");
3249 0.9894230831842615) < eps,
3250 "Incorrect K2 at 3, 6");
3252 0.9622882117865678) < eps,
3253 "Incorrect K2 at 3, 7");
3255 0.9823319222305995) < eps,
3256 "Incorrect K2 at 3, 8");
3258 0.9552504472873038) < eps,
3259 "Incorrect K2 at 3, 9");
3261 0.9961426616053822) < eps,
3262 "Incorrect K2 at 4, 0");
3264 0.9951625370745047) < eps,
3265 "Incorrect K2 at 4, 1");
3267 0.9585556905472743) < eps,
3268 "Incorrect K2 at 4, 2");
3270 0.9952971844072107) < eps,
3271 "Incorrect K2 at 4, 3");
3273 0.9849114167202919) < eps,
3274 "Incorrect K2 at 4, 4");
3276 0.9944417095668610) < eps,
3277 "Incorrect K2 at 4, 5");
3279 0.9864738775087318) < eps,
3280 "Incorrect K2 at 4, 6");
3282 0.9928713082004123) < eps,
3283 "Incorrect K2 at 4, 7");
3285 0.9926416525703272) < eps,
3286 "Incorrect K2 at 4, 8");
3288 0.9813903448088843) < eps,
3289 "Incorrect K2 at 4, 9");
3311 double *P =
Calloc(
double, data->
n * r);
3385 Sigma[0] = 0.8917076715220298;
3386 Sigma[1] = 0.7448958325189663;
3387 Sigma[2] = 0.7292497207505059;
3388 Sigma[3] = 0.0388180555183835;
3389 Sigma[4] = 0.1843977014611545;
3390 Sigma[5] = 0.2271271152279254;
3391 Sigma[6] = 0.6985271697744179;
3397 mu_assert(data->
r == r,
"Incorrect data->r");
3400 1.0000000000000000) < eps,
3401 "Incorrect data->Z at 0, 0");
3403 0.7183838977883847) < eps,
3404 "Incorrect data->Z at 0, 1");
3406 0.3630753280693996) < eps,
3407 "Incorrect data->Z at 0, 2");
3409 0.3247360589008871) < eps,
3410 "Incorrect data->Z at 0, 3");
3412 0.0319598137322927) < eps,
3413 "Incorrect data->Z at 0, 4");
3415 0.0503210788778667) < eps,
3416 "Incorrect data->Z at 0, 5");
3418 0.0958880494701488) < eps,
3419 "Incorrect data->Z at 0, 6");
3421 0.3555664378468590) < eps,
3422 "Incorrect data->Z at 0, 7");
3424 1.0000000000000000) < eps,
3425 "Incorrect data->Z at 1, 0");
3427 0.7080685113201802) < eps,
3428 "Incorrect data->Z at 1, 1");
3430 0.1386287648299510) < eps,
3431 "Incorrect data->Z at 1, 2");
3433 0.6176303419048280) < eps,
3434 "Incorrect data->Z at 1, 3");
3436 0.0308842988733590) < eps,
3437 "Incorrect data->Z at 1, 4");
3439 0.0491426957621803) < eps,
3440 "Incorrect data->Z at 1, 5");
3442 0.0376553169129896) < eps,
3443 "Incorrect data->Z at 1, 6");
3445 0.6287433205648071) < eps,
3446 "Incorrect data->Z at 1, 7");
3448 1.0000000000000000) < eps,
3449 "Incorrect data->Z at 2, 0");
3451 0.0262391769187446) < eps,
3452 "Incorrect data->Z at 2, 1");
3454 0.0180799608848456) < eps,
3455 "Incorrect data->Z at 2, 2");
3457 0.3674783177476025) < eps,
3458 "Incorrect data->Z at 2, 3");
3460 0.0224260721582540) < eps,
3461 "Incorrect data->Z at 2, 4");
3463 0.0207748861504618) < eps,
3464 "Incorrect data->Z at 2, 5");
3466 0.0561486769846686) < eps,
3467 "Incorrect data->Z at 2, 6");
3469 0.0796432387288058) < eps,
3470 "Incorrect data->Z at 2, 7");
3472 1.0000000000000000) < eps,
3473 "Incorrect data->Z at 3, 0");
3475 0.1557424369168406) < eps,
3476 "Incorrect data->Z at 3, 1");
3478 0.6805171738670187) < eps,
3479 "Incorrect data->Z at 3, 2");
3481 0.3843334233867928) < eps,
3482 "Incorrect data->Z at 3, 3");
3484 0.0171809905586351) < eps,
3485 "Incorrect data->Z at 3, 4");
3487 0.1766047611339114) < eps,
3488 "Incorrect data->Z at 3, 5");
3490 0.1814138840065695) < eps,
3491 "Incorrect data->Z at 3, 6");
3493 0.2738516231189423) < eps,
3494 "Incorrect data->Z at 3, 7");
3496 1.0000000000000000) < eps,
3497 "Incorrect data->Z at 4, 0");
3499 0.0019883976783969) < eps,
3500 "Incorrect data->Z at 4, 1");
3502 0.2810851060365751) < eps,
3503 "Incorrect data->Z at 4, 2");
3505 0.5841038474885426) < eps,
3506 "Incorrect data->Z at 4, 3");
3508 0.0298941904096380) < eps,
3509 "Incorrect data->Z at 4, 4");
3511 0.0815401544117791) < eps,
3512 "Incorrect data->Z at 4, 5");
3514 0.2217589161127987) < eps,
3515 "Incorrect data->Z at 4, 6");
3517 0.5403196600347527) < eps,
3518 "Incorrect data->Z at 4, 7");
3520 1.0000000000000000) < eps,
3521 "Incorrect data->Z at 5, 0");
3523 0.5919896235772685) < eps,
3524 "Incorrect data->Z at 5, 1");
3526 0.4817693948616519) < eps,
3527 "Incorrect data->Z at 5, 2");
3529 0.0317186243872882) < eps,
3530 "Incorrect data->Z at 5, 3");
3532 0.0126839697938067) < eps,
3533 "Incorrect data->Z at 5, 4");
3535 0.0736406799506745) < eps,
3536 "Incorrect data->Z at 5, 5");
3538 0.1157310446255655) < eps,
3539 "Incorrect data->Z at 5, 6");
3541 0.0305428687584698) < eps,
3542 "Incorrect data->Z at 5, 7");
3544 1.0000000000000000) < eps,
3545 "Incorrect data->Z at 6, 0");
3547 0.0687054523008138) < eps,
3548 "Incorrect data->Z at 6, 1");
3550 0.2755791613655394) < eps,
3551 "Incorrect data->Z at 6, 2");
3553 0.5734484174878248) < eps,
3554 "Incorrect data->Z at 6, 3");
3556 0.0143361879388834) < eps,
3557 "Incorrect data->Z at 6, 4");
3559 0.1684910230215461) < eps,
3560 "Incorrect data->Z at 6, 5");
3562 0.0270283280433711) < eps,
3563 "Incorrect data->Z at 6, 6");
3565 0.2469080974092735) < eps,
3566 "Incorrect data->Z at 6, 7");
3568 1.0000000000000000) < eps,
3569 "Incorrect data->Z at 7, 0");
3571 0.2394443715482110) < eps,
3572 "Incorrect data->Z at 7, 1");
3574 0.6361385405631184) < eps,
3575 "Incorrect data->Z at 7, 2");
3577 0.0705300837466403) < eps,
3578 "Incorrect data->Z at 7, 3");
3580 0.0095353696001854) < eps,
3581 "Incorrect data->Z at 7, 4");
3583 0.0035349835793759) < eps,
3584 "Incorrect data->Z at 7, 5");
3586 0.1183727026716577) < eps,
3587 "Incorrect data->Z at 7, 6");
3589 0.0674805012818914) < eps,
3590 "Incorrect data->Z at 7, 7");
3592 1.0000000000000000) < eps,
3593 "Incorrect data->Z at 8, 0");
3595 0.1037904837223778) < eps,
3596 "Incorrect data->Z at 8, 1");
3598 0.5711758028284341) < eps,
3599 "Incorrect data->Z at 8, 2");
3601 0.3669520858546538) < eps,
3602 "Incorrect data->Z at 8, 3");
3604 0.0042804583413615) < eps,
3605 "Incorrect data->Z at 8, 4");
3607 0.0890012756090077) < eps,
3608 "Incorrect data->Z at 8, 5");
3610 0.0565841273297056) < eps,
3611 "Incorrect data->Z at 8, 6");
3613 0.5083829794868514) < eps,
3614 "Incorrect data->Z at 8, 7");
3616 1.0000000000000000) < eps,
3617 "Incorrect data->Z at 9, 0");
3619 0.2042235187778177) < eps,
3620 "Incorrect data->Z at 9, 1");
3622 0.3279017337884026) < eps,
3623 "Incorrect data->Z at 9, 2");
3625 0.0645106520383707) < eps,
3626 "Incorrect data->Z at 9, 3");
3628 0.0336158008074787) < eps,
3629 "Incorrect data->Z at 9, 4");
3631 0.0189703601714739) < eps,
3632 "Incorrect data->Z at 9, 5");
3634 0.1405818916833765) < eps,
3635 "Incorrect data->Z at 9, 6");
3637 0.4815634079265663) < eps,
3638 "Incorrect data->Z at 9, 7");
3661 train->
Z =
Calloc(
double, train->
n * (train->
r + 1));
3663 double *K2 =
Calloc(
double, test->
n * train->
n);
3665 matrix_set(train->
Z, train->
r + 1, 0, 0, 1.0000000000000000);
3666 matrix_set(train->
Z, train->
r + 1, 0, 1, 0.8056271362589000);
3667 matrix_set(train->
Z, train->
r + 1, 0, 2, 0.4874175854113872);
3668 matrix_set(train->
Z, train->
r + 1, 0, 3, 0.4453015882771756);
3669 matrix_set(train->
Z, train->
r + 1, 1, 0, 1.0000000000000000);
3670 matrix_set(train->
Z, train->
r + 1, 1, 1, 0.7940590105180981);
3671 matrix_set(train->
Z, train->
r + 1, 1, 2, 0.1861049005485224);
3672 matrix_set(train->
Z, train->
r + 1, 1, 3, 0.8469394287449229);
3673 matrix_set(train->
Z, train->
r + 1, 2, 0, 1.0000000000000000);
3674 matrix_set(train->
Z, train->
r + 1, 2, 1, 0.0294257611061681);
3675 matrix_set(train->
Z, train->
r + 1, 2, 2, 0.0242717976065267);
3676 matrix_set(train->
Z, train->
r + 1, 2, 3, 0.5039128672814752);
3677 matrix_set(train->
Z, train->
r + 1, 3, 0, 1.0000000000000000);
3678 matrix_set(train->
Z, train->
r + 1, 3, 1, 0.1746563833537603);
3679 matrix_set(train->
Z, train->
r + 1, 3, 2, 0.9135736087631979);
3680 matrix_set(train->
Z, train->
r + 1, 3, 3, 0.5270258081021366);
3681 matrix_set(train->
Z, train->
r + 1, 4, 0, 1.0000000000000000);
3682 matrix_set(train->
Z, train->
r + 1, 4, 1, 0.0022298761599785);
3683 matrix_set(train->
Z, train->
r + 1, 4, 2, 0.3773482059713607);
3684 matrix_set(train->
Z, train->
r + 1, 4, 3, 0.8009654729622842);
3685 matrix_set(train->
Z, train->
r + 1, 5, 0, 1.0000000000000000);
3686 matrix_set(train->
Z, train->
r + 1, 5, 1, 0.6638830667081945);
3687 matrix_set(train->
Z, train->
r + 1, 5, 2, 0.6467607601353914);
3688 matrix_set(train->
Z, train->
r + 1, 5, 3, 0.0434948735457108);
3689 matrix_set(train->
Z, train->
r + 1, 6, 0, 1.0000000000000000);
3690 matrix_set(train->
Z, train->
r + 1, 6, 1, 0.0770493004546461);
3691 matrix_set(train->
Z, train->
r + 1, 6, 2, 0.3699566427075194);
3692 matrix_set(train->
Z, train->
r + 1, 6, 3, 0.7863539761080217);
3693 matrix_set(train->
Z, train->
r + 1, 7, 0, 1.0000000000000000);
3694 matrix_set(train->
Z, train->
r + 1, 7, 1, 0.2685233952731509);
3695 matrix_set(train->
Z, train->
r + 1, 7, 2, 0.8539966432782011);
3696 matrix_set(train->
Z, train->
r + 1, 7, 3, 0.0967159557826836);
3697 matrix_set(train->
Z, train->
r + 1, 8, 0, 1.0000000000000000);
3698 matrix_set(train->
Z, train->
r + 1, 8, 1, 0.1163951898554611);
3699 matrix_set(train->
Z, train->
r + 1, 8, 2, 0.7667861436369238);
3700 matrix_set(train->
Z, train->
r + 1, 8, 3, 0.5031912600213351);
3701 matrix_set(train->
Z, train->
r + 1, 9, 0, 1.0000000000000000);
3702 matrix_set(train->
Z, train->
r + 1, 9, 1, 0.2290251898688216);
3703 matrix_set(train->
Z, train->
r + 1, 9, 2, 0.4401981048538806);
3704 matrix_set(train->
Z, train->
r + 1, 9, 3, 0.0884616753393881);
3706 train->
Sigma[0] = 0.3385406475521640;
3707 train->
Sigma[1] = 0.6866094956337303;
3708 train->
Sigma[2] = 0.2520805490786355;
3710 matrix_set(K2, train->
n, 0, 0, 0.8233234072519983);
3711 matrix_set(K2, train->
n, 0, 1, 0.3267543833513200);
3712 matrix_set(K2, train->
n, 0, 2, 0.2728942849022845);
3713 matrix_set(K2, train->
n, 0, 3, 0.3993579061297995);
3714 matrix_set(K2, train->
n, 0, 4, 0.4221779040953508);
3715 matrix_set(K2, train->
n, 0, 5, 0.5095430570208566);
3716 matrix_set(K2, train->
n, 0, 6, 0.5090230605656835);
3717 matrix_set(K2, train->
n, 0, 7, 0.0437246682449493);
3718 matrix_set(K2, train->
n, 0, 8, 0.8917076715220298);
3719 matrix_set(K2, train->
n, 0, 9, 0.2271271152279254);
3720 matrix_set(K2, train->
n, 1, 0, 0.7956168453294307);
3721 matrix_set(K2, train->
n, 1, 1, 0.3693175185473680);
3722 matrix_set(K2, train->
n, 1, 2, 0.2665038412777220);
3723 matrix_set(K2, train->
n, 1, 3, 0.9137371110726166);
3724 matrix_set(K2, train->
n, 1, 4, 0.1657896146622650);
3725 matrix_set(K2, train->
n, 1, 5, 0.1190008864254177);
3726 matrix_set(K2, train->
n, 1, 6, 0.9000985899630121);
3727 matrix_set(K2, train->
n, 1, 7, 0.3534695686769205);
3728 matrix_set(K2, train->
n, 1, 8, 0.7448958325189663);
3729 matrix_set(K2, train->
n, 1, 9, 0.6985271697744179);
3730 matrix_set(K2, train->
n, 2, 0, 0.5777227081256917);
3731 matrix_set(K2, train->
n, 2, 1, 0.2456426390463990);
3732 matrix_set(K2, train->
n, 2, 2, 0.1126634767453339);
3733 matrix_set(K2, train->
n, 2, 3, 0.0191704319054138);
3734 matrix_set(K2, train->
n, 2, 4, 0.2472125660924395);
3735 matrix_set(K2, train->
n, 2, 5, 0.5211738041619068);
3736 matrix_set(K2, train->
n, 2, 6, 0.1140159498084029);
3737 matrix_set(K2, train->
n, 2, 7, 0.0966039750517987);
3738 matrix_set(K2, train->
n, 2, 8, 0.7292497207505059);
3739 matrix_set(K2, train->
n, 2, 9, 0.3663483426181376);
3740 matrix_set(K2, train->
n, 3, 0, 0.4426030703804438);
3741 matrix_set(K2, train->
n, 3, 1, 0.1102697774064020);
3742 matrix_set(K2, train->
n, 3, 2, 0.9577384085295405);
3743 matrix_set(K2, train->
n, 3, 3, 0.4826593547737735);
3744 matrix_set(K2, train->
n, 3, 4, 0.7987328321610475);
3745 matrix_set(K2, train->
n, 3, 5, 0.2491297759535341);
3746 matrix_set(K2, train->
n, 3, 6, 0.3920414766506218);
3747 matrix_set(K2, train->
n, 3, 7, 0.7277927065471604);
3748 matrix_set(K2, train->
n, 3, 8, 0.0388180555183835);
3749 matrix_set(K2, train->
n, 3, 9, 0.0724688230975385);
3750 matrix_set(K2, train->
n, 4, 0, 0.7701104553132680);
3751 matrix_set(K2, train->
n, 4, 1, 0.8659836346403005);
3752 matrix_set(K2, train->
n, 4, 2, 0.4421972387164297);
3753 matrix_set(K2, train->
n, 4, 3, 0.1028774221216107);
3754 matrix_set(K2, train->
n, 4, 4, 0.9763647809741268);
3755 matrix_set(K2, train->
n, 4, 5, 0.6189568847484389);
3756 matrix_set(K2, train->
n, 4, 6, 0.7735127328107272);
3757 matrix_set(K2, train->
n, 4, 7, 0.6893982492936992);
3758 matrix_set(K2, train->
n, 4, 8, 0.1843977014611545);
3759 matrix_set(K2, train->
n, 4, 9, 0.5028223670359105);
3764 mu_assert(test->
r == train->
r,
"Incorrect test->r");
3767 1.0000000000000000) < eps,
3768 "Incorrect test->Z at 0, 0");
3770 13.4938074073234233) < eps,
3771 "Incorrect test->Z at 0, 1");
3773 4.9462576505461318) < eps,
3774 "Incorrect test->Z at 0, 2");
3776 35.0141524482092095) < eps,
3777 "Incorrect test->Z at 0, 3");
3779 1.0000000000000000) < eps,
3780 "Incorrect test->Z at 1, 0");
3782 13.8904764364627322) < eps,
3783 "Incorrect test->Z at 1, 1");
3785 6.2592510920597659) < eps,
3786 "Incorrect test->Z at 1, 2");
3788 40.9083467283112441) < eps,
3789 "Incorrect test->Z at 1, 3");
3791 1.0000000000000000) < eps,
3792 "Incorrect test->Z at 2, 0");
3794 10.6204422184756044) < eps,
3795 "Incorrect test->Z at 2, 1");
3797 3.4427837480556240) < eps,
3798 "Incorrect test->Z at 2, 2");
3800 19.6903927993336545) < eps,
3801 "Incorrect test->Z at 2, 3");
3803 1.0000000000000000) < eps,
3804 "Incorrect test->Z at 3, 0");
3806 8.4682213303174958) < eps,
3807 "Incorrect test->Z at 3, 1");
3809 4.2237417955914749) < eps,
3810 "Incorrect test->Z at 3, 2");
3812 32.7751478586422280) < eps,
3813 "Incorrect test->Z at 3, 3");
3815 1.0000000000000000) < eps,
3816 "Incorrect test->Z at 4, 0");
3818 18.6151364859121280) < eps,
3819 "Incorrect test->Z at 4, 1");
3821 5.6161575228997469) < eps,
3822 "Incorrect test->Z at 4, 2");
3824 46.8107321811939130) < eps,
3825 "Incorrect test->Z at 4, 3");
Minimal unit testing framework for C.
#define Calloc(type, size)
double gamma
kernel parameter for RBF, poly, and sigmoid
char * test_kernel_cross_poly()
void gensvm_kernel_copy_kernelparam_to_data(struct GenModel *model, struct GenData *data)
Copy the kernelparameters from GenModel to GenData.
char * test_kernel_preprocess_linear()
char * test_kernel_copy_kernelparam_to_data_rbf()
char * test_kernel_postprocess_kernel()
#define mu_assert(test, message)
char * test_kernel_cross_sigmoid()
char * test_kernel_eigendecomp()
double gensvm_kernel_dot_rbf(double *x1, double *x2, long n, double gamma)
Compute the RBF kernel between two vectors.
#define matrix_get(M, cols, i, j)
double degree
kernel parameter for poly
void gensvm_free_model(struct GenModel *model)
Free allocated GenModel struct.
char * test_kernel_copy_kernelparam_to_data_sigmoid()
void gensvm_kernel_compute(struct GenModel *model, struct GenData *data, double *K)
Compute the kernel matrix.
#define Malloc(type, size)
#define mu_run_test(test)
struct GenModel * gensvm_init_model(void)
Initialize a GenModel structure.
char * test_kernel_compute_sigmoid()
A structure to represent the data.
A structure to represent a single GenSVM model.
Header file for gensvm_kernel.c.
double * gensvm_kernel_cross(struct GenModel *model, struct GenData *data_train, struct GenData *data_test)
Compute the kernel crossproduct between two datasets.
#define mu_test_missing()
double * Sigma
eigenvalues from the reduced eigendecomposition
char * test_dot_sigmoid()
long n
number of instances in the dataset
char * test_kernel_trainfactor()
long gensvm_kernel_eigendecomp(double *K, long n, double cutoff, double **P_ret, double **Sigma_ret)
Find the (reduced) eigendecomposition of a kernel matrix.
char * test_kernel_copy_kernelparam_to_data_poly()
void gensvm_kernel_testfactor(struct GenData *testdata, struct GenData *traindata, double *K2)
Calculate the matrix product for the testfactor.
void gensvm_free_data(struct GenData *data)
Free allocated GenData struct.
char * test_kernel_cross_rbf()
void gensvm_kernel_trainfactor(struct GenData *data, double *P, double *Sigma, long r)
Compute the training factor as part of kernel preprocessing.
long r
number of eigenvalues (width of Z)
double gensvm_kernel_dot_sigmoid(double *x1, double *x2, long n, double gamma, double coef)
Compute the sigmoid kernel between two vectors.
char * test_kernel_copy_kernelparam_to_data_linear()
double degree
kernel parameter for poly
long m
number of predictors (width of RAW)
double coef
kernel parameter for poly and sigmoid
char * test_kernel_compute_rbf()
#define matrix_set(M, cols, i, j, val)
KernelType kerneltype
type of kernel used in the model
double gamma
kernel parameter for RBF, poly, and sigmoid
double coef
kernel parameter for poly and sigmoid
void gensvm_kernel_postprocess(struct GenModel *model, struct GenData *traindata, struct GenData *testdata)
Compute the kernel postprocessing factor.
long n
number of instances
double gensvm_kernel_dot_poly(double *x1, double *x2, long n, double gamma, double coef, double degree)
Compute the polynomial kernel between two vectors.
char * test_kernel_compute_poly()
char * test_kernel_postprocess_linear()
struct GenData * gensvm_init_data(void)
Initialize a GenData structure.
long m
number of predictor variables in the dataset
double * RAW
augmented raw data matrix
void gensvm_kernel_preprocess(struct GenModel *model, struct GenData *data)
Do the preprocessing steps needed to perform kernel GenSVM.
double kernel_eigen_cutoff
cutoff value for the ratio of eigenvalues in the reduced
char * test_kernel_testfactor()
char * test_kernel_preprocess_kernel()