-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMLTests.nb
1196 lines (1152 loc) · 51.2 KB
/
MLTests.nb
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
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 8.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 157, 7]
NotebookDataLength[ 52228, 1187]
NotebookOptionsPosition[ 50571, 1127]
NotebookOutlinePosition[ 50925, 1143]
CellTagsIndexPosition[ 50882, 1140]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"SetDirectory", "[", "\"\<~/Math/ML-Fun\>\"", "]"}]], "Input"],
Cell[BoxData["\<\"/Users/straszheimjeffrey/Math/ML-Fun\"\>"], "Output",
CellChangeTimes->{
3.548072045918025*^9, 3.5480722341755943`*^9, 3.548072318251779*^9, {
3.548072351333376*^9, 3.5480723606537113`*^9}, 3.548072485758*^9, {
3.548072697686472*^9, 3.548072726657538*^9}, 3.548084506099173*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{"<<", "ML`"}]], "Input"],
Cell[BoxData[
RowBox[{
RowBox[{"noisematrix", "[", "r_", "]"}], ":=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"RandomVariate", "[",
RowBox[{"CauchyDistribution", "[",
RowBox[{"0", ",", "1"}], "]"}], "]"}], ",",
RowBox[{"{", "r", "}"}], ",",
RowBox[{"{", "20", "}"}]}], "]"}]}]], "Input",
CellChangeTimes->{{3.548062158963716*^9, 3.548062159786996*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"makesample", "[",
RowBox[{"mat_", ",", "nc_"}], "]"}], ":=", "\[IndentingNewLine]",
RowBox[{"With", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"cl", "=",
RowBox[{"RandomVariate", "[",
RowBox[{"DiscreteUniformDistribution", "[",
RowBox[{"{",
RowBox[{"1", ",", "nc"}], "}"}], "]"}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{"noise", "=",
RowBox[{"RandomVariate", "[",
RowBox[{"NormalDistribution", "[", "]"}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{"factor2", "=",
RowBox[{"RandomVariate", "[",
RowBox[{"NormalDistribution", "[", "]"}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{"factor3", "=",
RowBox[{"RandomVariate", "[",
RowBox[{"NormalDistribution", "[", "]"}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{"factor4", "=",
RowBox[{"RandomVariate", "[",
RowBox[{"StudentTDistribution", "[",
RowBox[{"0", ",", "1", ",", "2"}], "]"}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{"fl", "=",
RowBox[{"x", "\[Function]",
RowBox[{"Join", "[",
RowBox[{"x", ",",
RowBox[{"Flatten", "[",
RowBox[{"Outer", "[",
RowBox[{"Times", ",", "x", ",", "x"}], "]"}], "]"}]}],
"]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"vec", "=",
RowBox[{"fl", "[",
RowBox[{"{",
RowBox[{
RowBox[{"cl", "+", "noise"}], ",", "factor2", ",", "factor3", ",",
"factor4"}], "}"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"vec", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}],
"=",
RowBox[{"RandomVariate", "[",
RowBox[{"NormalDistribution", "[", "]"}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"sample", "[",
RowBox[{"cl", ",",
RowBox[{"mat", ".", "vec"}]}], "]"}]}]}], "]"}]}], "]"}]}]], "Input",\
CellChangeTimes->{{3.548061730629533*^9, 3.5480618694696207`*^9}, {
3.5480620186068087`*^9, 3.5480621423185253`*^9}, {3.548062347471837*^9,
3.5480623715840273`*^9}, 3.54806240619558*^9, {3.5480624779898567`*^9,
3.548062478546102*^9}, {3.548062508595479*^9, 3.5480625567522097`*^9}, {
3.548062604466333*^9, 3.5480626333127203`*^9}, {3.548072103826523*^9,
3.5480721072765217`*^9}, {3.548072159058647*^9, 3.5480722289701233`*^9}, {
3.548072304731868*^9, 3.548072307421199*^9}, {3.548072651723061*^9,
3.548072692975404*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"testnoise", "=",
RowBox[{"noisematrix", "[", "25", "]"}]}], ";",
RowBox[{"testnoise", "//", "MatrixForm"}]}]], "Input",
CellChangeTimes->{{3.5480628257266693`*^9, 3.548062825917759*^9}}],
Cell[BoxData[
TagBox[
RowBox[{"(", "\[NoBreak]", GridBox[{
{
RowBox[{"-", "1.9889859555284393`"}],
RowBox[{"-", "16.99771184587507`"}],
RowBox[{"-", "0.1901297971187214`"}], "2.422867537729853`",
RowBox[{"-", "0.14734300306849302`"}], "13.570574489335211`",
"1.4665583515433558`", "245.12896110067075`",
RowBox[{"-", "3.3410425867229745`"}],
RowBox[{"-", "0.7649252870623144`"}], "1.2636413273621412`",
"32.929197177472695`", "1.1949493110149667`", "0.8768587924896842`",
"4.304522747159394`",
RowBox[{"-", "2.1631069029667755`"}], "0.301397356508306`",
RowBox[{"-", "1.6901241790157324`"}],
RowBox[{"-", "1.5720797766922567`"}], "7.118581411663447`"},
{
RowBox[{"-", "1.178149187532853`"}], "0.3521238167289151`",
"0.26256787891272404`", "0.7233332964102532`",
RowBox[{"-", "0.5261453535210086`"}],
RowBox[{"-", "72.25405401407818`"}],
RowBox[{"-", "3.270627322388372`"}],
RowBox[{"-", "1.0693694895842232`"}], "3.475938409761748`",
RowBox[{"-", "4.4925527079444505`"}], "1.445115731310268`",
RowBox[{"-", "3.0442844201042396`"}],
RowBox[{"-", "5.876048740479844`"}],
RowBox[{"-", "1.883481748206809`"}],
RowBox[{"-", "0.4743745358079434`"}],
RowBox[{"-", "1.1924026925301092`"}],
RowBox[{"-", "0.2415643691471151`"}],
RowBox[{"-", "1.5888910784387829`"}], "27.513653673166676`",
RowBox[{"-", "1.0734687413198065`"}]},
{"0.5862009404577188`", "0.5255167353711475`",
RowBox[{"-", "0.7628448612610548`"}],
RowBox[{"-", "0.9075281072374162`"}],
RowBox[{"-", "41.838200001542404`"}],
RowBox[{"-", "0.16706582960270264`"}],
RowBox[{"-", "144.1639501653764`"}], "0.18333529361515047`",
"0.707362115984615`",
RowBox[{"-", "0.1287549576936117`"}], "1.512570776178905`",
"0.4873991634821748`",
RowBox[{"-", "1.6262422333834097`"}],
RowBox[{"-", "1.9020788937548103`"}],
RowBox[{"-", "3.989189298096826`"}],
RowBox[{"-", "0.9265627271727266`"}],
RowBox[{"-", "19.570057424226505`"}],
RowBox[{"-", "0.5229343268923462`"}],
RowBox[{"-", "0.00834047111491073`"}], "13.825522872764678`"},
{
RowBox[{"-", "585.1310439846264`"}],
RowBox[{"-", "0.5665865181027941`"}],
RowBox[{"-", "0.20045508309932147`"}],
RowBox[{"-", "0.4569036663381864`"}], "0.5109423953096396`",
RowBox[{"-", "0.5193094601917732`"}], "0.13037556758565433`",
"1.0029294000484872`",
RowBox[{"-", "0.9512083990774071`"}],
RowBox[{"-", "3.1008340906011043`"}],
RowBox[{"-", "2.7606676154684666`"}],
RowBox[{"-", "3.2953757482797474`"}],
RowBox[{"-", "2.614752748982964`"}],
RowBox[{"-", "0.9598028393854506`"}],
RowBox[{"-", "0.8010172633894457`"}],
RowBox[{"-", "2.020974352466652`"}],
RowBox[{"-", "0.31971202940529697`"}],
RowBox[{"-", "0.5036001981436241`"}], "2.825427632363526`",
"0.3016063489573627`"},
{"0.012893640765400928`",
RowBox[{"-", "8.139313646094115`"}],
RowBox[{"-", "0.2668346414381379`"}], "0.5010784892604766`",
"1.6284253498682406`",
RowBox[{"-", "8.572292579533974`"}], "0.4874563382899768`",
"1.1583687113696592`",
RowBox[{"-", "2.346677579416864`"}], "162.75193744730157`",
RowBox[{"-", "0.006506248057041505`"}], "1.664235022934475`",
RowBox[{"-", "1.4070403846076855`"}], "0.04939732667692923`",
RowBox[{"-", "4.4784799604748695`"}],
RowBox[{"-", "1.1904841537009645`"}],
RowBox[{"-", "0.43833581533509`"}],
RowBox[{"-", "0.6403054241026147`"}],
RowBox[{"-", "0.7649067801861668`"}],
RowBox[{"-", "3.5556237141088114`"}]},
{"0.6284686921878776`",
RowBox[{"-", "2.0528402692604044`"}],
RowBox[{"-", "10.267851703607331`"}], "2.3945819105448036`",
RowBox[{"-", "6.2689417089526`"}], "1.1384788410622473`",
RowBox[{"-", "0.766052356954634`"}], "8.873658651768443`",
RowBox[{"-", "1.479370815450969`"}],
RowBox[{"-", "0.06837983853444443`"}],
RowBox[{"-", "0.29070682926279295`"}], "0.22172559421243665`",
"2.2055940294359924`", "1.661773783752998`",
RowBox[{"-", "0.9930977928539332`"}], "1.4840407082210323`",
"1.296973760206313`", "6.140807356873225`",
RowBox[{"-", "0.4036438161981582`"}],
RowBox[{"-", "0.000427511370828423`"}]},
{
RowBox[{"-", "2.2583644851752016`"}],
RowBox[{"-", "3.421017319916321`"}],
RowBox[{"-", "2.4793416889819677`"}], "6.830334640826966`",
"2.5222765302488948`",
RowBox[{"-", "8.41115369294274`"}], "3.502592348139107`",
"1.0158127663067644`",
RowBox[{"-", "0.9065304957988416`"}], "0.6601033290116742`",
RowBox[{"-", "3.7240289373760693`"}], "0.7390509658290266`",
RowBox[{"-", "1.3580646662484614`"}], "3.292685207870869`",
RowBox[{"-", "0.4770234767380566`"}], "0.8080823951452027`",
"0.7069115097586923`",
RowBox[{"-", "4.716789057996753`"}], "0.27370103601886997`",
RowBox[{"-", "0.5417247473665165`"}]},
{
RowBox[{"-", "0.31569030916492363`"}],
RowBox[{"-", "0.7090635988650351`"}],
RowBox[{"-", "0.3258622560946484`"}],
RowBox[{"-", "1.4255004542336744`"}],
RowBox[{"-", "0.8347625455062597`"}],
RowBox[{"-", "0.059159144052210726`"}], "1.4049225789036832`",
RowBox[{"-", "0.5495647401565282`"}], "0.8689242232167662`",
RowBox[{"-", "0.7371508456686052`"}],
RowBox[{"-", "0.27953261190284295`"}],
RowBox[{"-", "7.22560766817543`"}], "1.1716048405483268`",
RowBox[{"-", "0.1201454508537265`"}], "0.9743129944572309`",
"1.178529931823161`", "1.5411474176055167`", "0.8219005373090098`",
"0.5614881202141802`",
RowBox[{"-", "0.3564734442312101`"}]},
{
RowBox[{"-", "2.265174678178897`"}],
RowBox[{"-", "0.8563198859206226`"}],
RowBox[{"-", "0.33085049830412117`"}], "0.30052703301941025`",
"1.613439826265182`",
RowBox[{"-", "0.7592791145309936`"}], "0.23943915548330297`",
"0.9411096198285841`", "2.30934354894707`",
RowBox[{"-", "11.66653450099065`"}], "2.38596076774672`",
RowBox[{"-", "1.2907149089432495`"}],
RowBox[{"-", "0.4503077030104773`"}], "1.5976871020538301`",
"2.0183343206800988`",
RowBox[{"-", "0.5646716317215491`"}],
RowBox[{"-", "0.8367518363249813`"}], "4.608637699922829`",
"0.3815685842137159`", "1.1669065471866094`"},
{
RowBox[{"-", "0.6194864347954687`"}],
RowBox[{"-", "44.05481944275249`"}],
RowBox[{"-", "6.832933786945913`"}],
RowBox[{"-", "2.4350899887171797`"}],
RowBox[{"-", "0.5857671475156492`"}],
RowBox[{"-", "1.6365715446237614`"}],
RowBox[{"-", "0.34573661619244445`"}], "15.981282589009043`",
"4.318141830935989`",
RowBox[{"-", "0.21605374168463934`"}], "2.7153279796141754`",
RowBox[{"-", "0.1993460998037279`"}], "0.6631975736157728`",
RowBox[{"-", "0.06356315635498372`"}],
RowBox[{"-", "59.411558816425355`"}], "0.013209067978396166`",
"0.1173692089300013`",
RowBox[{"-", "39.18991004074901`"}], "0.47692294978636`",
"0.59608967036702`"},
{"1.3552377199112384`",
RowBox[{"-", "0.738786486401604`"}],
RowBox[{"-", "1.189934385719975`"}], "0.2370698691854919`",
"9.221918128636824`",
RowBox[{"-", "0.7236438948174873`"}], "0.03867121580017328`",
RowBox[{"-", "0.3662835696226847`"}], "1.519221386788067`",
"0.1279732027655745`", "1.3703689972835194`",
RowBox[{"-", "18.503894102318572`"}],
RowBox[{"-", "1.7533536217132761`"}], "0.710495630096085`",
"2.266054730723411`", "0.5192715236224299`", "0.5089324701455094`",
RowBox[{"-", "9.793502015043616`"}],
RowBox[{"-", "1.2401731253050003`"}],
RowBox[{"-", "1.4249408211798313`"}]},
{
RowBox[{"-", "1.5317612691265856`"}], "5.634975308543276`",
"0.02586877519514461`",
RowBox[{"-", "9.745612705084467`"}], "1.1632175720851412`",
"0.7830206082205767`",
RowBox[{"-", "0.5465377258336053`"}], "2.1232762039550317`",
"0.8665289347754872`", "2.8932455023192882`",
RowBox[{"-", "1.1563436031958498`"}],
RowBox[{"-", "6.493477916921018`"}], "0.44106382958959106`",
RowBox[{"-", "1.3269089087328656`"}],
RowBox[{"-", "1559.8383132976826`"}],
RowBox[{"-", "1.052987108830637`"}],
RowBox[{"-", "0.5411518749282253`"}],
RowBox[{"-", "0.4881342715176283`"}], "0.8111842458419033`",
RowBox[{"-", "0.2857027789452547`"}]},
{"1.2501509963500135`",
RowBox[{"-", "6.128929146550453`"}], "0.25919710581616084`",
RowBox[{"-", "0.2679164125242122`"}],
RowBox[{"-", "0.9412560874734206`"}], "0.2840111223879619`",
"6.071440113130484`", "1.601905669099636`", "0.16495003778501782`",
"3.1513405058355826`", "0.6385247862267447`",
RowBox[{"-", "0.17069302559333208`"}],
RowBox[{"-", "1.7512276930111732`"}], "2.570854005716787`",
RowBox[{"-", "0.7687018064165968`"}], "0.19957724120340292`",
"7.161698249513786`",
RowBox[{"-", "1.2111474654812182`"}],
RowBox[{"-", "0.5085553156076059`"}],
RowBox[{"-", "2.133204468979504`"}]},
{"0.8449084721715997`", "4.713567901119836`", "0.4420799541672415`",
RowBox[{"-", "2.3341196069197347`"}],
RowBox[{"-", "0.9037615066497646`"}], "0.25618272025100075`",
RowBox[{"-", "2.7438530738939844`"}],
RowBox[{"-", "0.28830862353340314`"}], "2.793559105589415`",
RowBox[{"-", "0.18651804387754237`"}], "7.022198624454764`",
"0.12028285125864818`", "0.21502212397769235`",
RowBox[{"-", "0.6137168244224144`"}], "0.5641163346328115`",
RowBox[{"-", "0.8272104828123182`"}], "0.6374647211599633`",
RowBox[{"-", "0.8323934146272133`"}], "1.452189137896209`",
"2.3360798792769297`"},
{"0.03168637957294253`",
RowBox[{"-", "0.17172759114415395`"}],
RowBox[{"-", "0.9227674474360161`"}],
RowBox[{"-", "0.33845577128417587`"}], "0.24525409264827777`",
"1.5870617092772514`",
RowBox[{"-", "7.78857718872173`"}],
RowBox[{"-", "1.4587970048687406`"}], "0.8699661871344216`",
"0.01625607604422615`", "1.810934729341155`",
RowBox[{"-", "2.5206285934633215`"}],
RowBox[{"-", "0.10346226719300311`"}], "0.04139874590742318`",
RowBox[{"-", "0.9592541936268637`"}], "0.7958636034464183`",
"311.886727960394`",
RowBox[{"-", "1.8708700167662955`"}],
RowBox[{"-", "1.9621485283450022`"}], "2.5754523078230767`"},
{"3.4538054818248267`", "4.45526765048519`", "0.2826815233963618`",
RowBox[{"-", "0.005040322348200174`"}],
RowBox[{"-", "0.37608690601978423`"}],
RowBox[{"-", "109.20995216589327`"}],
RowBox[{"-", "0.35600969744396344`"}],
RowBox[{"-", "0.7810599753343859`"}], "0.08111995928074936`",
"3.4415353884327557`",
RowBox[{"-", "0.11836542191833807`"}], "4.974233882837371`",
"22.24532583929753`",
RowBox[{"-", "0.7588291439007636`"}], "1.0390337761403472`",
"0.5883348186049518`",
RowBox[{"-", "0.5483665012077632`"}], "0.7252421387725645`",
RowBox[{"-", "10.286855079511135`"}],
RowBox[{"-", "2.392442118442771`"}]},
{
RowBox[{"-", "0.31672576660676427`"}],
RowBox[{"-", "4.999759806694373`"}],
RowBox[{"-", "0.05577901564601763`"}], "0.6327300842699859`",
"6.2608061226820455`",
RowBox[{"-", "0.9666043525734785`"}], "0.6100997705306317`",
"0.9955527496765757`",
RowBox[{"-", "2.168737296155269`"}],
RowBox[{"-", "0.3149236525400666`"}],
RowBox[{"-", "0.14775353024732116`"}],
RowBox[{"-", "23.152766056666035`"}],
RowBox[{"-", "2.610659473471465`"}],
RowBox[{"-", "0.20489897509989258`"}],
RowBox[{"-", "0.24566976109259472`"}],
RowBox[{"-", "2.1579122985169965`"}],
RowBox[{"-", "5.59540163307176`"}],
RowBox[{"-", "1.2166515307464583`"}],
RowBox[{"-", "3.768327399541615`"}],
RowBox[{"-", "3.0480251116693946`"}]},
{
RowBox[{"-", "0.9756349011715761`"}],
RowBox[{"-", "1.569496249301769`"}],
RowBox[{"-", "0.4270851435718183`"}], "0.5126801661227214`",
RowBox[{"-", "0.7136467878034046`"}],
RowBox[{"-", "0.907710917592278`"}], "0.7094454728701693`",
"1.0609144620894835`", "0.3363944057897935`", "1.5181022830502209`",
RowBox[{"-", "5.760433799803425`"}],
RowBox[{"-", "1.6406664852002852`"}],
RowBox[{"-", "0.1828481125039357`"}],
RowBox[{"-", "0.5132593347068893`"}],
RowBox[{"-", "21.89019138010817`"}],
RowBox[{"-", "4.838198422880738`"}],
RowBox[{"-", "0.22370596467201825`"}],
RowBox[{"-", "0.22046841525092786`"}], "0.5209944981966421`",
RowBox[{"-", "0.3053366210079106`"}]},
{
RowBox[{"-", "1.8819708270107078`"}], "1.0177895397215222`",
RowBox[{"-", "0.6529476878995151`"}], "1.1072299266419037`",
"5.1498005398206255`", "11.848433745610283`",
RowBox[{"-", "0.2308264899532857`"}],
RowBox[{"-", "0.6680283043169719`"}],
RowBox[{"-", "0.7604069552962474`"}],
RowBox[{"-", "0.9580767596261531`"}],
RowBox[{"-", "3.461988717006047`"}],
RowBox[{"-", "1.9909890308713631`"}], "2.208788401163086`",
"11.99923886262266`",
RowBox[{"-", "0.7317375057744117`"}], "5.0833214824587305`",
RowBox[{"-", "1.9344374164539693`"}], "0.7051804786913392`",
"1.7493406504599291`",
RowBox[{"-", "0.04136112106276401`"}]},
{"0.6112088897990028`",
RowBox[{"-", "2.7667690636511026`"}],
RowBox[{"-", "1.6752828957061807`"}],
RowBox[{"-", "2.6628873320300586`"}],
RowBox[{"-", "15.147544583220355`"}], "0.022581042926573296`",
RowBox[{"-", "2.6440746596957574`"}], "1.5313762498929153`",
"0.8050297970276862`", "0.5334254701589625`",
RowBox[{"-", "0.6135834032783701`"}], "4.2527126852745285`",
"0.07524368920534573`", "1.2854690032933738`", "0.24004536817408847`",
RowBox[{"-", "0.3828527782879038`"}], "1.526804991000425`",
"1.5093895091513514`",
RowBox[{"-", "0.5657748250569797`"}], "5.074597454978476`"},
{
RowBox[{"-", "0.13162277875217018`"}],
RowBox[{"-", "0.12144477698288296`"}], "5.12252633251778`",
RowBox[{"-", "0.2583470128299222`"}], "2.7209428624148577`",
RowBox[{"-", "11.499966770247026`"}],
RowBox[{"-", "3.086095985144281`"}], "9.370610416534403`",
RowBox[{"-", "25.106691650133623`"}], "0.9234426202369354`",
"0.27530503980256216`", "0.09075233671937398`",
RowBox[{"-", "1.6246602247231905`"}], "20.752057301674597`",
"1.9563927740343083`",
RowBox[{"-", "0.785355257483099`"}],
RowBox[{"-", "1.1108206065282833`"}], "2.327746218410683`",
"0.05467406003397467`",
RowBox[{"-", "2.0832118281882077`"}]},
{
RowBox[{"-", "1.1411244935282898`"}], "1.4490597448598939`",
RowBox[{"-", "4.227779039799965`"}],
RowBox[{"-", "1.2541077957625826`"}], "1.604127638342526`",
"1.1751618497812568`",
RowBox[{"-", "4.595344716101623`"}], "1.1338553251267487`",
"0.4962443038937507`", "0.06148572793089753`",
RowBox[{"-", "3.5379332164677333`"}],
RowBox[{"-", "13.868864885179239`"}],
RowBox[{"-", "0.935508261291734`"}],
RowBox[{"-", "0.7440498093967981`"}], "0.0816911243211022`",
"1.6017070393022377`", "1.7972804704878844`",
RowBox[{"-", "11.668957094292935`"}],
RowBox[{"-", "2.127301888346798`"}], "2.576089902473062`"},
{"0.21269459870602372`",
RowBox[{"-", "1.4758447690427734`"}],
RowBox[{"-", "1.7685982750254914`"}],
RowBox[{"-", "6.0535680722370016`"}], "4.850616591889496`",
RowBox[{"-", "4.024468513718425`"}],
RowBox[{"-", "0.07874759642113746`"}], "0.5411277275904505`",
"2.8513519778201046`",
RowBox[{"-", "0.35798403064104234`"}], "5.870615212194032`",
RowBox[{"-", "1.0308140692337047`"}], "3.1109681445640662`",
"1.9132974759184727`", "1.4701356505421053`",
RowBox[{"-", "0.3953011742576948`"}], "6.535847102741958`",
RowBox[{"-", "2.2035548240648968`"}], "0.2734571538224144`",
"0.5340327412228769`"},
{
RowBox[{"-", "1.2241387509593897`"}],
RowBox[{"-", "1.2522156151521562`"}], "1.7709538874172766`",
"0.5971199629222053`",
RowBox[{"-", "9.328303395224841`"}], "32.20157878304153`",
"2.0196572244606763`", "0.9398394646583828`", "2.443322456962277`",
RowBox[{"-", "0.6029047238412869`"}], "7.784521521164959`",
"0.10339696586998519`",
RowBox[{"-", "0.761486524544882`"}],
RowBox[{"-", "1.4697161000880952`"}],
RowBox[{"-", "9.383612685917184`"}], "0.1582206355769064`",
RowBox[{"-", "1.3211370195326106`"}], "0.5969887370207895`",
"0.30527562846442946`",
RowBox[{"-", "0.06400128195169834`"}]},
{"0.7410629935523259`",
RowBox[{"-", "1.5495624464870075`"}], "4.502256710540759`",
RowBox[{"-", "8.299953349547874`"}],
RowBox[{"-", "3.617427754106639`"}], "2.182046393977915`",
"6.139397784426116`", "1.932947754746656`", "3.24308310444732`",
"0.4108103843809077`",
RowBox[{"-", "4.9796472311732325`"}], "2.8279616911231784`",
RowBox[{"-", "1.7533327924153976`"}], "1.407076865915337`",
"1.0884569570973153`", "0.6356879128779047`", "7.381817065599859`",
RowBox[{"-", "2.285763525769596`"}], "2.8766709017725196`",
"0.06644176256656263`"}
},
GridBoxAlignment->{
"Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
"RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
Function[BoxForm`e$,
MatrixForm[BoxForm`e$]]]], "Output",
CellChangeTimes->{
3.5480720461076593`*^9, 3.548072234414456*^9, 3.548072318435772*^9, {
3.5480723515670843`*^9, 3.548072360873489*^9}, 3.5480724859642897`*^9, {
3.548072697905909*^9, 3.548072726873331*^9}, 3.548084506249445*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{"testdata", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"makesample", "[",
RowBox[{"testnoise", ",", "8"}], "]"}], ",",
RowBox[{"{", "1000", "}"}]}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.5480247774374866`*^9, 3.548024779163631*^9}, {
3.548062204472725*^9, 3.548062205608244*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"validationdata", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"makesample", "[",
RowBox[{"testnoise", ",", "8"}], "]"}], ",",
RowBox[{"{", "500", "}"}]}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.548024781352173*^9, 3.548024795717042*^9}, {
3.548062444041562*^9, 3.5480624444189987`*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"Take", "[",
RowBox[{"testdata", ",", "10"}], "]"}], "//", "TableForm"}]], "Input"],
Cell[BoxData[
TagBox[
TagBox[GridBox[{
{
RowBox[{"sample", "[",
RowBox[{"8", ",",
RowBox[{"{",
RowBox[{"350.32738801403144`", ",",
RowBox[{"-", "135.0479346912615`"}], ",",
RowBox[{"-", "1492.4277924220175`"}], ",",
RowBox[{"-", "3424.208693976491`"}], ",",
RowBox[{"-", "33.00827818517863`"}], ",", "21.73883415286124`", ",",
RowBox[{"-", "2.9184075877630704`"}], ",", "31.044806590768804`",
",",
RowBox[{"-", "10.419317356507483`"}], ",",
RowBox[{"-", "188.84956627842703`"}], ",",
RowBox[{"-", "20.739129909274876`"}], ",",
RowBox[{"-", "5111.774777849322`"}], ",", "63.337894724995834`",
",",
RowBox[{"-", "13.658378276375606`"}], ",", "312.05352322670865`",
",", "184.04589893636944`", ",",
RowBox[{"-", "45.79845726348422`"}], ",",
RowBox[{"-", "73.50156048236063`"}], ",", "5.255178692013247`", ",",
"4.1403279223506395`", ",",
RowBox[{"-", "46.85365773752655`"}], ",",
RowBox[{"-", "71.59591743368783`"}], ",", "34.52533019158371`", ",",
"16.160101838630634`", ",", "82.18586617867557`"}], "}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"4", ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "726.2222865050446`"}], ",",
RowBox[{"-", "97.4132390264665`"}], ",", "231.46546614108235`", ",",
RowBox[{"-", "2207.92302201932`"}], ",", "7.6407250777315525`", ",",
RowBox[{"-", "37.76339511576922`"}], ",",
RowBox[{"-", "34.052094957468306`"}], ",",
RowBox[{"-", "3.8019541402661075`"}], ",",
RowBox[{"-", "7.938011402937577`"}], ",",
RowBox[{"-", "55.92231717840939`"}], ",", "27.02924268151924`", ",",
RowBox[{"-", "215.5637876963594`"}], ",",
RowBox[{"-", "30.76402114956966`"}], ",", "14.50461116464386`", ",",
RowBox[{"-", "885.87607640042`"}], ",",
RowBox[{"-", "202.90813786357836`"}], ",", "18.59131179483219`",
",",
RowBox[{"-", "12.094550834280856`"}], ",", "22.464210175013054`",
",",
RowBox[{"-", "15.5160994519573`"}], ",",
RowBox[{"-", "84.12323125316027`"}], ",", "13.77353208460781`", ",",
RowBox[{"-", "16.041768974673474`"}], ",", "39.03523417539671`",
",",
RowBox[{"-", "19.54928752466368`"}]}], "}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"4", ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "985.9321582169785`"}], ",", "0.2993924415543887`",
",",
RowBox[{"-", "524.0059608997187`"}], ",",
RowBox[{"-", "2996.01076019746`"}], ",", "3.0384831779447152`", ",",
RowBox[{"-", "36.89346174049711`"}], ",",
RowBox[{"-", "11.792587802368052`"}], ",", "5.316216375432036`",
",",
RowBox[{"-", "14.252053790473418`"}], ",",
RowBox[{"-", "116.37692721976143`"}], ",",
RowBox[{"-", "14.47933767218595`"}], ",",
RowBox[{"-", "1202.875691988013`"}], ",",
RowBox[{"-", "10.204307568807717`"}], ",",
RowBox[{"-", "8.494879777632342`"}], ",",
RowBox[{"-", "1294.251595291629`"}], ",", "225.30083244940707`",
",", "4.1689700022392575`", ",",
RowBox[{"-", "18.526155964970183`"}], ",",
RowBox[{"-", "13.373208885147168`"}], ",",
RowBox[{"-", "1.7306799562099937`"}], ",",
RowBox[{"-", "22.220757753321415`"}], ",",
RowBox[{"-", "49.10325005630564`"}], ",",
RowBox[{"-", "14.031999627616116`"}], ",",
RowBox[{"-", "28.795207358390464`"}], ",",
RowBox[{"-", "6.094449413195644`"}]}], "}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"3", ",",
RowBox[{"{",
RowBox[{"866.1051082875287`", ",", "277.2426776588112`", ",",
RowBox[{"-", "1473.2865472896642`"}], ",",
RowBox[{"-", "3030.5695164337367`"}], ",", "187.19600264281587`",
",", "31.81516508176034`", ",", "68.67872259391142`", ",",
"31.520984179611048`", ",",
RowBox[{"-", "33.65939169664185`"}], ",",
RowBox[{"-", "107.32003421145811`"}], ",", "7.471970772579917`",
",",
RowBox[{"-", "5359.467320222829`"}], ",", "77.79781192774448`", ",",
RowBox[{"-", "46.32107656871111`"}], ",", "1040.8932678841738`",
",", "752.9448182691582`", ",",
RowBox[{"-", "10.055500102020517`"}], ",",
RowBox[{"-", "59.94530665979209`"}], ",",
RowBox[{"-", "65.95448274380234`"}], ",",
RowBox[{"-", "18.855709384821516`"}], ",", "142.61099604110936`",
",",
RowBox[{"-", "40.5076337319408`"}], ",", "48.658318789267085`", ",",
RowBox[{"-", "207.16999751164965`"}], ",", "71.54791948290794`"}],
"}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"6", ",",
RowBox[{"{",
RowBox[{"1133.183722632689`", ",",
RowBox[{"-", "26.100455084100364`"}], ",", "167.20468196314906`",
",",
RowBox[{"-", "2994.5265257799383`"}], ",", "2.9265008681067237`",
",", "40.706318728432215`", ",",
RowBox[{"-", "0.5958644060574825`"}], ",",
RowBox[{"-", "6.5303659284590605`"}], ",",
RowBox[{"-", "5.163700503656867`"}], ",", "54.93862117375984`", ",",
"28.598226242121957`", ",",
RowBox[{"-", "303.18796535555873`"}], ",", "32.90316138001509`",
",", "10.354358900475855`", ",", "1457.2703360397215`", ",",
RowBox[{"-", "71.13377045181522`"}], ",",
RowBox[{"-", "8.310970092060227`"}], ",",
RowBox[{"-", "6.01114199512005`"}], ",",
RowBox[{"-", "14.111410985621315`"}], ",",
RowBox[{"-", "3.7734933363834102`"}], ",", "37.61425118075357`",
",", "25.594962410296375`", ",", "31.873889835951893`", ",",
RowBox[{"-", "20.579609054728127`"}], ",", "21.122354410628425`"}],
"}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"6", ",",
RowBox[{"{",
RowBox[{
"3147.5985899091265`", ",", "43.74289416814807`", ",",
"572.2729490697592`", ",",
RowBox[{"-", "3176.38130882065`"}], ",", "20.564778186662537`", ",",
"127.80570969420029`", ",", "27.505840016746266`", ",",
RowBox[{"-", "9.972940437799135`"}], ",",
RowBox[{"-", "0.9808447603390995`"}], ",", "170.68243417233873`",
",", "42.598820123091826`", ",",
RowBox[{"-", "1577.9684883053383`"}], ",", "83.78763143612544`",
",", "24.850790676632244`", ",", "4030.334554616172`", ",",
"18.18042782867188`", ",",
RowBox[{"-", "25.81048594267651`"}], ",",
RowBox[{"-", "9.687654665175668`"}], ",",
RowBox[{"-", "72.49973726233685`"}], ",", "59.498780838031166`",
",", "167.9841858104268`", ",", "90.1591531975441`", ",",
"78.6884001234922`", ",",
RowBox[{"-", "81.87706172189894`"}], ",", "56.593197201973815`"}],
"}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"6", ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "373.0925341250457`"}], ",",
RowBox[{"-", "53.9469313777939`"}], ",",
RowBox[{"-", "341.4228849204059`"}], ",",
RowBox[{"-", "3526.561716444119`"}], ",",
RowBox[{"-", "7.215117835401411`"}], ",",
RowBox[{"-", "16.131128341270763`"}], ",",
RowBox[{"-", "16.101856496401332`"}], ",", "3.040268221137058`",
",",
RowBox[{"-", "12.890150652858273`"}], ",",
RowBox[{"-", "40.46688725328166`"}], ",", "8.258632657425279`", ",",
RowBox[{"-", "265.70142746267834`"}], ",", "4.290162714659311`",
",", "0.3817329375001939`", ",",
RowBox[{"-", "486.9158628964622`"}], ",", "40.27763103472436`", ",",
"2.0572577429407506`", ",",
RowBox[{"-", "10.049608807131504`"}], ",", "2.370420807772311`",
",",
RowBox[{"-", "13.322332784265827`"}], ",",
RowBox[{"-", "33.19008407074294`"}], ",",
RowBox[{"-", "24.368501280415476`"}], ",", "0.9531051390823599`",
",", "3.042249674279434`", ",", "4.947606915396981`"}], "}"}]}],
"]"}]},
{
RowBox[{"sample", "[",
RowBox[{"8", ",",
RowBox[{"{",
RowBox[{
"295.32547550844475`", ",", "297.7526287790413`", ",",
"1993.5318978238286`", ",",
RowBox[{"-", "3991.136295270392`"}], ",", "58.48584479622282`", ",",
"18.00172510715779`", ",",
RowBox[{"-", "11.18990018699257`"}], ",",
RowBox[{"-", "34.94982744005424`"}], ",",
RowBox[{"-", "6.340296537946546`"}], ",",
RowBox[{"-", "200.64408601718864`"}], ",", "47.45968791939822`",
",",
RowBox[{"-", "6424.210945354701`"}], ",",
RowBox[{"-", "38.284145471979976`"}], ",", "37.162343474845066`",
",", "544.6531469559148`", ",", "30.489847555342294`", ",",
"33.27512779951088`", ",",
RowBox[{"-", "102.55343782061807`"}], ",",
RowBox[{"-", "73.34388470707468`"}], ",", "48.07039955380466`", ",",
"195.2839850868959`", ",", "75.64605536629752`", ",",
RowBox[{"-", "11.783059886443633`"}], ",",
RowBox[{"-", "160.8619645737828`"}], ",",
RowBox[{"-", "68.23126913822017`"}]}], "}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"8", ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "8147.961971901933`"}], ",", "46.496068484406806`",
",", "1966.896174577319`", ",",
RowBox[{"-", "4934.27750594152`"}], ",",
RowBox[{"-", "99.24197283077223`"}], ",",
RowBox[{"-", "354.53506729574246`"}], ",",
RowBox[{"-", "136.47703767537416`"}], ",",
RowBox[{"-", "41.41788659224481`"}], ",",
RowBox[{"-", "3.054301241259111`"}], ",",
RowBox[{"-", "537.4128198064028`"}], ",", "31.98925916494167`", ",",
RowBox[{"-", "1341.0605067111912`"}], ",",
RowBox[{"-", "350.2110717275641`"}], ",", "68.95024458193141`", ",",
RowBox[{"-", "10249.728209451565`"}], ",",
RowBox[{"-", "391.39197183394725`"}], ",", "114.92609014673737`",
",",
RowBox[{"-", "79.80341285662035`"}], ",", "101.17193652660342`",
",",
RowBox[{"-", "5.333110774857339`"}], ",",
RowBox[{"-", "355.2917367614302`"}], ",", "12.608368717279692`",
",",
RowBox[{"-", "220.7794316023092`"}], ",", "41.00639607573795`", ",",
RowBox[{"-", "287.3070036885436`"}]}], "}"}]}], "]"}]},
{
RowBox[{"sample", "[",
RowBox[{"5", ",",
RowBox[{"{",
RowBox[{"3437.085606299374`", ",",
RowBox[{"-", "131.48839816815837`"}], ",",
RowBox[{"-", "1180.1988005928338`"}], ",",
RowBox[{"-", "2283.3474207988384`"}], ",",
RowBox[{"-", "16.696814128375216`"}], ",", "146.19716951975636`",
",", "13.424878556954303`", ",", "18.477697243237632`", ",",
"23.650637004392017`", ",",
RowBox[{"-", "101.81300567291858`"}], ",",
RowBox[{"-", "69.86480351824333`"}], ",",
RowBox[{"-", "5038.156877696381`"}], ",", "118.81992007346352`",
",", "32.54472279760719`", ",", "4075.2926025208653`", ",",
RowBox[{"-", "210.0947348812244`"}], ",",
RowBox[{"-", "208.28220094072984`"}], ",",
RowBox[{"-", "103.38617319533691`"}], ",", "57.95856918756989`",
",", "61.83190072981001`", ",", "0.35196027364851545`", ",",
RowBox[{"-", "46.22745568915978`"}], ",", "106.22059166455298`",
",", "63.67119404231617`", ",", "167.57610451310887`"}], "}"}]}],
"]"}]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
"RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.5599999999999999]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}],
Column],
Function[BoxForm`e$,
TableForm[BoxForm`e$]]]], "Output",
CellChangeTimes->{
3.548072046221439*^9, 3.548072234576768*^9, 3.548072318580854*^9, {
3.548072351714507*^9, 3.548072361017022*^9}, 3.548072486096602*^9, {
3.548072698048005*^9, 3.5480727270272923`*^9}, 3.5480845063995743`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Sort", "[",
RowBox[{"AllClasses", "[", "testdata", "]"}], "]"}]], "Input",
CellChangeTimes->{{3.548062701256214*^9, 3.548062725033523*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",", "8"}],
"}"}]], "Output",
CellChangeTimes->{
3.54807204624681*^9, 3.548072234608432*^9, 3.548072318611924*^9, {
3.54807235174706*^9, 3.548072361049632*^9}, 3.548072486125389*^9, {
3.54807269808044*^9, 3.548072727070788*^9}, {3.548084495232711*^9,
3.548084506427052*^9}}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"TallyClasses", "[", "testdata", "]"}]], "Input"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"122", ",", "131", ",", "117", ",", "137", ",", "137", ",", "119", ",",
"109", ",", "128"}], "}"}]], "Output",
CellChangeTimes->{
3.5480720462864*^9, 3.548072234641821*^9, 3.5480723186495028`*^9, {
3.5480723517995996`*^9, 3.548072361082767*^9}, 3.548072486160153*^9, {
3.548072698113809*^9, 3.548072727101756*^9}, {3.548084483627183*^9,
3.548084506464335*^9}}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"ClassesFromGathered", "[",
RowBox[{"GatherData", "[", "testdata", "]"}], "]"}]], "Input"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",", "8"}],
"}"}]], "Output",
CellChangeTimes->{
3.548072046312624*^9, 3.548072234674501*^9, 3.548072318678125*^9, {
3.548072351827026*^9, 3.548072361120037*^9}, 3.5480724861921797`*^9, {
3.54807269814649*^9, 3.548072727135047*^9}, {3.5480738960377817`*^9,
3.5480739146953497`*^9}, 3.548084506492626*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{"fullmean", ",", "fullsd"}], "}"}], "=",
RowBox[{"With", "[",
RowBox[{
RowBox[{"{",
RowBox[{"m", "=",
RowBox[{"FullMatrix", "[", "testdata", "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"Mean", "[", "m", "]"}], ",",
RowBox[{"StandardDeviation", "[", "m", "]"}]}], "}"}]}], "]"}]}],
";"}]], "Input"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"{",
RowBox[{"fullmean", ",", "fullsd"}], "}"}], "//", "TableForm"}]], "Input"],
Cell[BoxData[
TagBox[GridBox[{
{"212.91075870537512`",
RowBox[{"-", "15.670301810270589`"}], "39.91283522833336`",
RowBox[{"-", "2591.570603619488`"}], "141.028364752412`",
"9.0870010211499`",
RowBox[{"-", "9.860066724884572`"}],
RowBox[{"-", "2.920061623595668`"}],
RowBox[{"-", "12.286097888716425`"}],
RowBox[{"-", "51.04253333808611`"}],
RowBox[{"-", "1.6240671840835426`"}],
RowBox[{"-", "1638.8677176491435`"}], "1.6813887381719779`",
"17.672036878766935`", "229.66142322342398`", "21.73093017924774`",
RowBox[{"-", "24.286258702747627`"}],
RowBox[{"-", "26.37013415262463`"}],
RowBox[{"-", "13.517714098591519`"}], "36.51976142087761`",
RowBox[{"-", "1.2304640627930898`"}], "10.587071079115699`",
"10.47578725505597`",
RowBox[{"-", "20.110804668529017`"}], "10.649204252652616`"},
{"3462.656735796229`", "374.8485377273763`", "884.5577739590786`",
"1472.2967148492953`", "293.9577669230118`", "142.17657924335575`",
"63.10081568899953`", "22.17391412920301`", "49.846834327354955`",
"259.85871201436504`", "75.99805949398119`", "2213.846622892839`",
"101.48459190895736`", "90.5228636110309`", "4242.232755625164`",
"599.6578079925937`", "159.27929718101151`", "35.292428617103354`",
"75.43351177143056`", "211.4779451549783`", "216.74442992808022`",
"142.9252103708146`", "95.99733951992536`", "185.28067892168022`",
"112.70449901593057`"}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
"RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[2.0999999999999996`]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}],
Function[BoxForm`e$,
TableForm[BoxForm`e$]]]], "Output",
CellChangeTimes->{
3.5480720463625937`*^9, 3.548072234739996*^9, 3.5480723187268133`*^9, {
3.548072351875249*^9, 3.548072361181529*^9}, 3.548072486239067*^9, {
3.54807269821306*^9, 3.548072727200323*^9}, 3.5480845065418787`*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{"fixsample", "[", "x_", "]"}], ":=",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "fullmean"}], ")"}], "/", "fullsd"}]}]], "Input"],
Cell[BoxData[
RowBox[{
RowBox[{"adjusteddata", "=",
RowBox[{"MapVecs", "[",
RowBox[{"fixsample", ",", "testdata"}], "]"}]}], ";"}]], "Input"],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{"mat", ",", "vals"}], "}"}], "=",
RowBox[{"MakeLDA", "[",
RowBox[{"adjusteddata", ",", "7"}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.5480253189744177`*^9, 3.548025319219227*^9}, {
3.548026148071823*^9, 3.5480261486537*^9}, {3.548062864208379*^9,
3.548062864718227*^9}, {3.548072512786579*^9, 3.548072542545268*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"mat", "//", "MatrixForm"}]], "Input"],
Cell[BoxData[
TagBox[
RowBox[{"(", "\[NoBreak]", GridBox[{
{
RowBox[{"-", "0.08033108611574218`"}], "0.006815815383275204`",
"0.05882416669859763`", "0.938131319381141`", "0.046513769792514606`",
"0.09531401930689103`",
RowBox[{"-", "0.048545814510507594`"}], "0.06519919514331084`",
"0.11188000132053283`", "0.14719115028681484`",
RowBox[{"-", "0.0847491341535475`"}],
RowBox[{"-", "0.07162078791519193`"}],
RowBox[{"-", "0.022854808274554585`"}],
RowBox[{"-", "0.10999655133255938`"}],
RowBox[{"-", "0.08772143926933204`"}],
RowBox[{"-", "0.007844660289471943`"}], "0.07745241600884056`",
"0.05162523681984993`", "0.019784380905048245`",
RowBox[{"-", "0.004994489196373555`"}],
RowBox[{"-", "0.05177755936619949`"}],
RowBox[{"-", "0.024120300063894647`"}], "0.09338520664791265`",
RowBox[{"-", "0.026542921735507093`"}],
RowBox[{"-", "0.05876180695857747`"}]},
{"0.18822626096411918`",
RowBox[{"-", "0.118231880273054`"}],
RowBox[{"-", "0.16151843100357957`"}],
RowBox[{"-", "0.012025288640483094`"}], "0.08166932736708005`",
RowBox[{"-", "0.5988186654185841`"}], "0.05607314588884019`",
RowBox[{"-", "0.47579918259634135`"}], "0.1839061452786001`",
"0.04545848265954801`", "0.23678441866451766`",
RowBox[{"-", "0.0010348319244542538`"}], "0.02296344583513813`",
"0.005401749863473612`", "0.17184357043969023`",
RowBox[{"-", "0.12904908797647702`"}],
RowBox[{"-", "0.023414033898138575`"}], "0.1117608912764893`",
"0.10137535981254074`",
RowBox[{"-", "0.21743895846697026`"}], "0.04775857200812715`",
RowBox[{"-", "0.016704106338236897`"}], "0.08780898305239253`",
RowBox[{"-", "0.1392164492077326`"}], "0.3010537745994842`"},
{
RowBox[{"-", "0.15259084395745148`"}],
RowBox[{"-", "0.18430119572814865`"}], "0.04506734718450464`",
"0.023338233970043597`",
RowBox[{"-", "0.04198286117779161`"}], "0.6895021656769449`",
RowBox[{"-", "0.11656974034387484`"}], "0.1703392577721704`",
RowBox[{"-", "0.05889646361767221`"}],
RowBox[{"-", "0.18172132631785004`"}],
RowBox[{"-", "0.014615080635591415`"}],
RowBox[{"-", "0.036299719720024846`"}], "0.013363446407995309`",
"0.0678803021279881`",
RowBox[{"-", "0.13291246703207502`"}], "0.14797328487301178`",