-
Notifications
You must be signed in to change notification settings - Fork 1
/
03-crossvalidation.nb
2134 lines (2015 loc) · 94.7 KB
/
03-crossvalidation.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[ 96776, 2125]
NotebookOptionsPosition[ 92133, 1980]
NotebookOutlinePosition[ 92752, 2002]
CellTagsIndexPosition[ 92709, 1999]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[TextData[{
"Kapitola 3 - K\[RHacek]\[IAcute]\[ZHacek]ov\[AAcute] validace\n",
StyleBox["Demonstrace pou\[ZHacek]it\[IAcute] k\[RHacek]\[IAcute]\[ZHacek]ov\
\[EAcute] validace p\[RHacek]i klasifikov\[AAcute]n\[IAcute] dat.", "Subtitle"]
}], "Title",
CellChangeTimes->{{3.506788333052947*^9, 3.5067883454315195`*^9}, {
3.5073590076481843`*^9, 3.507359032449834*^9}, 3.5073599568952236`*^9, {
3.5073600002592297`*^9, 3.507360001479885*^9}, {3.507360051770771*^9,
3.5073600524743605`*^9}, {3.507360282704596*^9, 3.507360287426696*^9}, {
3.5073607144794245`*^9, 3.5073607224504366`*^9}, {3.5091842641177597`*^9,
3.5091842969344263`*^9}, 3.5091845406333723`*^9, {3.5097789653933115`*^9,
3.5097790283928113`*^9}, {3.513406957253889*^9, 3.513406961840972*^9}}],
Cell[CellGroupData[{
Cell["\<\
Na\[CHacek]ten\[IAcute] knihovny NeuralNetworks\
\>", "Section",
CellChangeTimes->{{3.5073602800352573`*^9, 3.5073603289964743`*^9}}],
Cell["\<\
Nejd\[RHacek]\[IAcute]ve na\[CHacek]teme knihovnu neuronov\[YAcute]ch s\
\[IAcute]t\[IAcute].\
\>", "Text",
CellChangeTimes->{{3.507360408586581*^9, 3.507360469435308*^9}, {
3.5073605129338317`*^9, 3.5073605139169564`*^9}, {3.507360599217788*^9,
3.50736063908185*^9}, {3.5073606876975236`*^9, 3.5073607032795024`*^9}, {
3.5073607601777277`*^9, 3.5073607715351696`*^9}, {3.5084334105739098`*^9,
3.5084334111769867`*^9}}],
Cell[BoxData[
StyleBox[
RowBox[{"<<", " ", "NeuralNetworks`"}], "Input"]], "Input",
InitializationCell->True,
CellChangeTimes->{{3.507360750489497*^9, 3.5073607641152277`*^9}}],
Cell["\<\
Pokud pracujete v Mathematice 8.0, vypn\[EHacek]te je\[SHacek]t\[EHacek] \
zobrazov\[AAcute]n\[IAcute] chybov\[EAcute] hl\[AAcute]\[SHacek]ky \
Remove::rmnsm. Tuto hl\[AAcute]\[SHacek]ku vyhazuj\[IAcute] funkce knihovny \
NeuralNetworks. Na funkci knihovny toto nem\[AAcute] \[ZHacek]\[AAcute]dn\
\[YAcute] vliv.\
\>", "Text",
CellChangeTimes->{{3.5073722663308234`*^9, 3.5073724902892623`*^9}}],
Cell[BoxData[
RowBox[{"Off", "[",
StyleBox[
RowBox[{"Remove", "::", "rmnsm"}], "MessageName"], "]"}]], "Input",
InitializationCell->True,
CellChangeTimes->{{3.507372496128004*^9, 3.5073725146658583`*^9}}]
}, Open ]],
Cell[CellGroupData[{
Cell["Import dat", "Section",
CellChangeTimes->{{3.510989111635687*^9, 3.510989113347404*^9}}],
Cell[CellGroupData[{
Cell["Na\[CHacek]ten\[IAcute] dat ze souboru", "Subsection",
CellChangeTimes->{{3.5109891247753553`*^9, 3.5109891283263063`*^9}}],
Cell["\<\
Nastav\[IAcute]me si pracovn\[IAcute] adres\[AAcute]\[RHacek] na ten, kde m\
\[AAcute]me ulo\[ZHacek]en aktu\[AAcute]ln\[IAcute] notebook.\
\>", "Text",
CellChangeTimes->{3.510989136085291*^9}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"SetDirectory", "[",
RowBox[{"NotebookDirectory", "[", "]"}], "]"}]], "Input"],
Cell[BoxData["\<\"D:\\\\Dokumenty\\\\BP\"\>"], "Output",
CellChangeTimes->{3.5142582288673124`*^9, 3.5142792245173993`*^9,
3.515089232445778*^9, 3.51509045510071*^9}]
}, Open ]],
Cell["A na\[CHacek]teme data.", "Text",
CellChangeTimes->{{3.5142582065280733`*^9, 3.514258209866479*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"data", "=",
RowBox[{"Import", "[", "\"\<iris.data\>\"", "]"}]}], ";"}]], "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell["Na\[CHacek]ten\[IAcute] dat z internetu", "Subsection",
CellChangeTimes->{{3.5109891563973703`*^9, 3.5109891599978275`*^9}}],
Cell["\<\
Jin\[AAcute] mo\[ZHacek]nost je importovat data p\[RHacek]\[IAcute]mo z \
internetu - p\[RHacek]\[IAcute]klad pro UCI datab\[AAcute]zi (stejn\[AAcute] \
data jako p\[RHacek]i na\[CHacek]\[IAcute]t\[AAcute]n\[IAcute] ze souboru, \
jen na\[CHacek]tena p\[RHacek]\[IAcute]mo z internetu.\
\>", "Text",
CellChangeTimes->{3.510989170526165*^9}],
Cell[BoxData[
RowBox[{
RowBox[{"data", "=",
RowBox[{
"Import", "[",
"\"\<http://ftp.ics.uci.edu/pub/machine-learning-databases/iris/iris.data\
\>\"", "]"}]}], ";"}]], "Input"]
}, Open ]]
}, Open ]],
Cell[CellGroupData[{
Cell["P\[RHacek]\[IAcute]prava tr\[EAcute]novac\[IAcute]ch dat", "Section",
CellChangeTimes->{{3.507360869997173*^9, 3.507360875055815*^9}}],
Cell["\<\
Provedeme p\[RHacek]edzpracov\[AAcute]n\[IAcute] dat stejn\[YAcute]m \
postupem, jak\[YAcute] je pops\[AAcute]n v kapitole 5 \
Dop\[RHacek]edn\[AAcute] s\[IAcute]\[THacek] a Iris data.\
\>", "Text",
CellChangeTimes->{{3.5097794184218388`*^9, 3.5097794450567207`*^9}, {
3.509779483094551*^9, 3.5097794918311605`*^9}, {3.5097800969394994`*^9,
3.5097800973405504`*^9}, {3.5150892550540714`*^9, 3.515089255893119*^9}, {
3.5150904365776505`*^9, 3.515090439644826*^9}}],
Cell[BoxData[{
RowBox[{
RowBox[{"data2", "=",
RowBox[{"Drop", "[",
RowBox[{"data", ",",
RowBox[{"-", "1"}]}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"inData", "=",
RowBox[{"data2", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{"1", ";;", "4"}]}], "]"}], "]"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"outDataTmp", "=",
RowBox[{"data2", "[",
RowBox[{"[",
RowBox[{"All", ",", "5"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"outVal", "=",
RowBox[{
RowBox[{"Tally", "[", "outDataTmp", "]"}], "[",
RowBox[{"[",
RowBox[{"All", ",", "1"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"encode", "=",
RowBox[{"MapIndexed", "[",
RowBox[{
RowBox[{
RowBox[{"#1", "->",
RowBox[{"Normal", "[",
RowBox[{"SparseArray", "[",
RowBox[{
RowBox[{"#2", "\[Rule]", "1"}], ",",
RowBox[{"{",
RowBox[{"Length", "[", "outVal", "]"}], "}"}]}], "]"}], "]"}]}],
"&"}], ",", "outVal"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"outData", "=",
RowBox[{
RowBox[{"Flatten", "[", "outDataTmp", "]"}], "/.", "encode"}]}],
";"}]}], "Input",
CellChangeTimes->{{3.403531300187786*^9, 3.403531305616864*^9}, {
3.5097795432806935`*^9, 3.5097795637472925`*^9}, {3.5097796073968353`*^9,
3.509779607723877*^9}, {3.5097796518664827`*^9, 3.509779654630333*^9}, {
3.5097796890377026`*^9, 3.5097797016193*^9}}],
Cell["\<\
Data odsahuj\[IAcute] 4 vstupn\[IAcute] parametry, podle kter\[YAcute]ch \
budeme data klasifikovat do t\[RHacek]ech t\[RHacek]\[IAcute]d.\
\>", "Text",
CellChangeTimes->{{3.5091899511879253`*^9, 3.5091899961536355`*^9}, {
3.509199898841117*^9, 3.5091999040332766`*^9}, 3.509780075712304*^9, {
3.5097801142466974`*^9, 3.509780153306157*^9}, {3.509797865768854*^9,
3.509797878930025*^9}, {3.51508926621871*^9, 3.5150892668177443`*^9}}]
}, Open ]],
Cell[CellGroupData[{
Cell[TextData[StyleBox["K\[RHacek]\[IAcute]\[ZHacek]ov\[AAcute] validace \
(Cross validation)",
FontWeight->"Bold"]], "Section",
CellChangeTimes->{{3.507363963934553*^9, 3.507363968614147*^9}, {
3.5091845043382635`*^9, 3.509184508578802*^9}, {3.509780771880706*^9,
3.509780785723464*^9}, {3.509788723794471*^9, 3.5097887242105236`*^9}}],
Cell["\<\
Nejprve si vytvo\[RHacek]\[IAcute]me neuronovou s\[IAcute]\[THacek], kterou \
budeme pomoc\[IAcute] k\[RHacek]\[IAcute]\[ZHacek]ov\[EAcute] validace \
vyhodnocovat.\
\>", "Text",
CellChangeTimes->{{3.507364306112504*^9, 3.5073643547376785`*^9}, {
3.50736439199541*^9, 3.507364483879078*^9}, {3.5073675354855824`*^9,
3.5073675413523273`*^9}, 3.5073821199755774`*^9, {3.507382157226308*^9,
3.5073821575873537`*^9}, {3.509184558199103*^9, 3.509184568014349*^9}, {
3.509184612875046*^9, 3.5091846397659607`*^9}, {3.509191103275722*^9,
3.509191115018713*^9}, {3.5091911934891777`*^9, 3.5091912007325974`*^9}, {
3.509191231249973*^9, 3.509191234974946*^9}, {3.5096877679125023`*^9,
3.50968778089115*^9}, {3.5097809266208553`*^9, 3.5097810285562997`*^9}, {
3.5097811343027277`*^9, 3.509781148396017*^9}, 3.509797893893426*^9}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"net", "=",
RowBox[{"InitializeFeedForwardNet", "[",
RowBox[{"inData", ",", "outData", ",",
RowBox[{"{",
RowBox[{"3", ",", "2"}], "}"}], ",",
RowBox[{"Neuron", "\[Rule]", "Sigmoid"}]}], "]"}]}]], "Input",
CellChangeTimes->{{3.509191256344159*^9, 3.509191261831356*^9}, {
3.5091913993403177`*^9, 3.509191400535469*^9}, {3.509191482896428*^9,
3.5091914836660256`*^9}, {3.50919160095642*^9, 3.509191643892872*^9},
3.50919204542586*^9, 3.5091921442304068`*^9, {3.5091922167601166`*^9,
3.5091923367058477`*^9}, {3.5091925903585577`*^9,
3.5091926076887584`*^9}, {3.509192642242646*^9, 3.5091926530785217`*^9}, {
3.509193000722167*^9, 3.509193011669057*^9}, {3.50920564006566*^9,
3.509205640229181*^9}, {3.5092058818638644`*^9, 3.5092058963987103`*^9}, {
3.50920757424677*^9, 3.5092075777207108`*^9}, {3.5092779277214518`*^9,
3.509277942343134*^9}, {3.509277987308288*^9, 3.509277988532878*^9}, {
3.5092786715824833`*^9, 3.5092786771222887`*^9}, {3.5096877907318993`*^9,
3.5096877922015867`*^9}, {3.509688207947379*^9, 3.509688209806115*^9}, {
3.50968848932661*^9, 3.509688497113099*^9}, {3.509690335190505*^9,
3.5096903353445244`*^9}, {3.5096903837846756`*^9,
3.5096903840697117`*^9}, {3.5096906095128393`*^9, 3.509690609957896*^9}, {
3.5096906970034494`*^9, 3.5096906972004747`*^9}, {3.50969083340427*^9,
3.509690833914335*^9}, {3.5096909902561874`*^9, 3.509690990387204*^9}, {
3.5096911023989277`*^9, 3.509691127413104*^9}, {3.509691254811782*^9,
3.509691255876417*^9}, {3.5096933312234526`*^9, 3.5096933450757117`*^9}, {
3.509693379604596*^9, 3.509693379823624*^9}, {3.5096936959812713`*^9,
3.509693764512974*^9}, {3.509693813106644*^9, 3.509693870695957*^9}, {
3.5096939081502132`*^9, 3.5096939113861237`*^9}, {3.509696388655197*^9,
3.509696400472698*^9}, {3.5096964375079007`*^9, 3.509696439910206*^9}, {
3.5096968569091578`*^9, 3.5096968574407253`*^9}, {3.5096993562770376`*^9,
3.509699370261813*^9}, {3.509699412732706*^9, 3.5096994130482464`*^9}, {
3.509704934632899*^9, 3.509704980926777*^9}, 3.5097050997768693`*^9, {
3.509705198896956*^9, 3.5097052110374975`*^9}, {3.5097053959054728`*^9,
3.50970539651005*^9}, {3.509705445443263*^9, 3.5097054753465605`*^9}, {
3.509705608234435*^9, 3.5097056102771945`*^9}, {3.5097064348223987`*^9,
3.5097064647727017`*^9}, {3.509706834665172*^9, 3.509706864152917*^9}, {
3.509707115691358*^9, 3.5097071406805315`*^9}, {3.5097071823298197`*^9,
3.5097072072969904`*^9}, {3.509707969999841*^9, 3.509707980566183*^9}, {
3.509708073681507*^9, 3.5097080737960215`*^9}, {3.509781041719471*^9,
3.5097811021181407`*^9}, {3.5097855822190413`*^9, 3.509785622402644*^9}, {
3.509785786049925*^9, 3.5097857861764407`*^9}, {3.509785855928298*^9,
3.5097858787812*^9}, {3.50979072490908*^9, 3.509790724978589*^9}, {
3.5097907570251584`*^9, 3.509790758760379*^9}, {3.5097976428060417`*^9,
3.5097976674961767`*^9}}],
Cell[BoxData[
TagBox[
TagBox[
RowBox[{"FeedForwardNet", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{"w1", ",", "w2", ",", "w3"}], "}"}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"Neuron", " ", "\[Rule]", " ", "Sigmoid"}], ",", " ",
RowBox[{"FixedParameters", " ", "\[Rule]", " ", "None"}], ",", " ",
RowBox[{"AccumulatedIterations", " ", "\[Rule]", " ", "0"}], ",", " ",
RowBox[{"CreationDate", " ", "\[Rule]", " ",
RowBox[{"{",
RowBox[{
"2011", ",", " ", "5", ",", " ", "23", ",", " ", "0", ",", " ", "0",
",", " ", "55.8577533`9.499658302751506"}], "}"}]}], ",", " ",
RowBox[{"OutputNonlinearity", " ", "\[Rule]", " ", "None"}], ",", " ",
RowBox[{"NumberOfInputs", " ", "\[Rule]", " ", "4"}]}], "}"}]}], "]"}],
Null,
Editable->False],
DisplayForm]], "Output",
CellChangeTimes->{{3.5097070150070724`*^9, 3.509707036545808*^9}, {
3.509707075608268*^9, 3.5097072084061313`*^9}, {3.5097072520501733`*^9,
3.509707267816675*^9}, 3.509707520703288*^9, 3.5097075769924355`*^9, {
3.5097076072017717`*^9, 3.509707635899416*^9}, 3.5097076958715315`*^9, {
3.509707730185889*^9, 3.509707758434476*^9}, 3.5097077978454804`*^9,
3.509707841614538*^9, {3.5097078727464914`*^9, 3.5097079280740175`*^9}, {
3.5097079592579775`*^9, 3.509708021388867*^9}, {3.5097080578089914`*^9,
3.509708081776535*^9}, 3.5097081185567055`*^9, 3.509708150701788*^9,
3.5097082078820486`*^9, 3.509708261811897*^9, {3.5097083225181055`*^9,
3.5097083743616886`*^9}, 3.5097084195919323`*^9, 3.509708450105307*^9, {
3.509708496916751*^9, 3.5097085225830107`*^9}, 3.509708560641343*^9,
3.5097085938845644`*^9, 3.509708626071652*^9, 3.509708661194612*^9, {
3.5097086912899337`*^9, 3.5097087470925198`*^9}, {3.5097088542006207`*^9,
3.509708881641105*^9}, 3.5097089120499663`*^9, 3.5097089502243137`*^9,
3.5097090251643305`*^9, 3.509709072167799*^9, 3.509709121053006*^9, {
3.5097092010756683`*^9, 3.5097093894195848`*^9}, 3.509709440011509*^9,
3.5097094719620667`*^9, {3.5097095140244074`*^9, 3.509709540628286*^9},
3.509709584360839*^9, 3.509709651013303*^9, 3.5097096810721197`*^9,
3.509709714768899*^9, 3.509709753638835*^9, {3.509709804286766*^9,
3.509709829952525*^9}, 3.509709875785345*^9, 3.5097099120779543`*^9, {
3.509709944775606*^9, 3.509709970972933*^9}, 3.5097100916412554`*^9,
3.509710134049141*^9, 3.5097102005115805`*^9, {3.509710238196866*^9,
3.5097102652332993`*^9}, {3.509710295850187*^9, 3.509710405132064*^9},
3.5097104794590025`*^9, 3.5097105122666683`*^9, {3.5097105488493137`*^9,
3.509710577699477*^9}, {3.5097106126219115`*^9, 3.5097106621216974`*^9},
3.5097107044855766`*^9, {3.5097107675920906`*^9, 3.5097107972588577`*^9},
3.509710829610466*^9, 3.5097108616770377`*^9, {3.5097109047275047`*^9,
3.5097109332346244`*^9}, 3.5097109635519743`*^9, {3.509710996065603*^9,
3.5097110496564083`*^9}, 3.509711130642192*^9, 3.5097111712123437`*^9,
3.5097112226573763`*^9, 3.509711254574929*^9, {3.5097112895133657`*^9,
3.5097113146780615`*^9}, {3.5097113562043347`*^9, 3.509711415037306*^9},
3.509711461544711*^9, {3.5097115159621215`*^9, 3.5097115974959745`*^9},
3.5097116275892963`*^9, 3.5097116618806505`*^9, {3.5097810917253213`*^9,
3.509781102804728*^9}, 3.509785586508586*^9, 3.509785624727439*^9,
3.5097857877131357`*^9, {3.5097858590922*^9, 3.5097858803388977`*^9},
3.5097967889346137`*^9, 3.509797002051676*^9, 3.5097973381108503`*^9,
3.5097974918338704`*^9, 3.509797669404919*^9, 3.5097980163114705`*^9,
3.5098000864328423`*^9, 3.5098023107913003`*^9, 3.5103850039673557`*^9,
3.5103860869813814`*^9, 3.510386172793278*^9, {3.51038627274247*^9,
3.5103862896616187`*^9}, 3.51038685147596*^9, 3.5103874518752007`*^9,
3.514258239459731*^9, 3.514279228587632*^9, 3.515089234188878*^9,
3.5150904558607535`*^9}]
}, Open ]],
Cell["\<\
M\[URing]\[ZHacek]eme si zobrazit informace o s\[IAcute]ti.\
\>", "Text",
CellChangeTimes->{{3.5091916569450293`*^9, 3.509191694743829*^9}, {
3.5097977959064827`*^9, 3.5097978086165967`*^9}, {3.50979789833749*^9,
3.509797900921818*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"NetInformation", "[", "net", "]"}]], "Input",
CellChangeTimes->{{3.509191700853605*^9, 3.5091917111199083`*^9}}],
Cell[BoxData["\<\"FeedForward network created 2011-5-23 at 0:00. The network \
has 4 inputs and 3 outputs. It consists of 2 hidden layers with number of \
neurons per layer given by {3, 2}. The neuron activation function is of \
Sigmoid type. \"\>"], "Output",
CellChangeTimes->{
3.509615612045724*^9, 3.509687826351923*^9, 3.509687923791796*^9,
3.50968811825749*^9, 3.5096882143506927`*^9, 3.5096892871979265`*^9,
3.509691513325109*^9, 3.5096917406259727`*^9, 3.50969264150587*^9,
3.5096928882577033`*^9, 3.509693351727556*^9, 3.50969377582841*^9,
3.5096938654742937`*^9, 3.5096939162427406`*^9, 3.509694437422922*^9,
3.509694478207101*^9, 3.509694543554899*^9, 3.509694584321076*^9,
3.509694676105731*^9, 3.5096948921516657`*^9, 3.5096949419439883`*^9, {
3.509695012684471*^9, 3.509695036966055*^9}, 3.509695072788103*^9,
3.5096951537918897`*^9, 3.509695237550026*^9, 3.5096957876993856`*^9,
3.5096962597208247`*^9, 3.509696293900165*^9, {3.509696377074227*^9,
3.5096964417889442`*^9}, {3.5096965370775447`*^9, 3.509696565430645*^9}, {
3.509696637044239*^9, 3.5096966908990774`*^9}, 3.5096967388931723`*^9, {
3.509696792262449*^9, 3.5096968635369997`*^9}, 3.5096968965186877`*^9,
3.5096969309780636`*^9, 3.5096969749921527`*^9, 3.5096970170194893`*^9,
3.5096978847156725`*^9, 3.5096979371608324`*^9, 3.509699049553088*^9,
3.5096993235403805`*^9, {3.509699371990533*^9, 3.50969938834861*^9},
3.509699455988699*^9, 3.509699503158689*^9, 3.5096995426157*^9,
3.5096995892086163`*^9, 3.509699661597308*^9, 3.509699722910594*^9,
3.5096997986777153`*^9, 3.5096998387703066`*^9, 3.509699868974642*^9,
3.5097006235764637`*^9, 3.50970068811716*^9, 3.5097008232208157`*^9,
3.509700893633757*^9, 3.509701066530212*^9, 3.5097011791215096`*^9,
3.5097012130613194`*^9, 3.509701284825432*^9, 3.5097013504822693`*^9,
3.5097037344064894`*^9, 3.5097037677412224`*^9, 3.509703888654076*^9,
3.5097039990800986`*^9, 3.509704311681294*^9, 3.5097045888009834`*^9,
3.5097046297036777`*^9, 3.5097053279753466`*^9, 3.5097053708777947`*^9,
3.509705404727093*^9, 3.509705478549467*^9, {3.509705602831249*^9,
3.5097056315078907`*^9}, 3.509705662052769*^9, 3.509705821742547*^9,
3.5097058560073986`*^9, 3.5097059017117023`*^9, {3.5097059557455635`*^9,
3.5097059803631897`*^9}, 3.509706057023424*^9, {3.509706248140193*^9,
3.509706277468917*^9}, {3.5097063564754496`*^9, 3.5097063808090396`*^9}, {
3.5097064299052744`*^9, 3.5097064531487255`*^9}, 3.509706499996175*^9,
3.5097065993347893`*^9, 3.5097066547083206`*^9, 3.5097068363438854`*^9, {
3.5097069944129577`*^9, 3.509707097413537*^9}, 3.5097071435879*^9,
3.5097072678571806`*^9, 3.5097075207472935`*^9, 3.5097075770239396`*^9, {
3.509707607237276*^9, 3.509707635938421*^9}, 3.509707695908036*^9, {
3.5097077302143927`*^9, 3.5097077584709806`*^9}, 3.5097077978834853`*^9,
3.5097078416400414`*^9, {3.509707872785997*^9, 3.5097079280975204`*^9}, {
3.509707959286481*^9, 3.509708021420871*^9}, {3.509708057838996*^9,
3.5097080818070393`*^9}, 3.5097081185837092`*^9, 3.5097081507312913`*^9,
3.5097082079125524`*^9, 3.5097082618409004`*^9, {3.50970832255661*^9,
3.5097083744001937`*^9}, 3.509708419628437*^9, 3.5097084501493125`*^9, {
3.509708496947755*^9, 3.509708522619015*^9}, 3.5097085606728473`*^9,
3.509708593919569*^9, 3.509708626102656*^9, 3.509708661228116*^9, {
3.509708691325438*^9, 3.509708747150027*^9}, {3.509708854230624*^9,
3.5097088816726093`*^9}, 3.5097089120864716`*^9, 3.5097089502523174`*^9,
3.509709025194334*^9, 3.509709072198803*^9, 3.509709121090011*^9, {
3.5097092011101723`*^9, 3.509709389454089*^9}, 3.5097094400435133`*^9,
3.50970947198907*^9, {3.509709514053911*^9, 3.5097095406592894`*^9},
3.509709584383842*^9, 3.509709651046307*^9, 3.5097096810996237`*^9,
3.509709714794902*^9, 3.5097097536658382`*^9, {3.509709804322271*^9,
3.509709829981529*^9}, 3.5097098758103485`*^9, 3.5097099121129584`*^9, {
3.5097099448056097`*^9, 3.509709971006937*^9}, 3.50971009167776*^9,
3.509710134077144*^9, 3.5097102005385838`*^9, {3.5097102382278695`*^9,
3.5097102652673035`*^9}, {3.509710295882691*^9, 3.509710405156567*^9},
3.509710479496007*^9, 3.509710512295672*^9, {3.5097105488808174`*^9,
3.5097105777244806`*^9}, {3.509710612650915*^9, 3.509710662151701*^9},
3.5097107045180807`*^9, {3.5097107676265945`*^9, 3.509710797292362*^9},
3.50971082964547*^9, 3.5097108617105417`*^9, {3.5097109047600083`*^9,
3.5097109332641277`*^9}, 3.5097109635774775`*^9, {3.509710996091106*^9,
3.509711049682411*^9}, 3.5097111306721954`*^9, 3.509711171245348*^9,
3.509711222690881*^9, 3.5097112546039333`*^9, {3.5097112895463705`*^9,
3.509711314706565*^9}, {3.509711356238339*^9, 3.509711415066809*^9},
3.5097114615692143`*^9, {3.5097115159936256`*^9, 3.509711597530979*^9},
3.509711627624301*^9, 3.509711661906654*^9, 3.509781112525462*^9,
3.5097856285544252`*^9, {3.5097858448043857`*^9, 3.5097858615755153`*^9},
3.509796789091634*^9, 3.5097970022442007`*^9, 3.5097974918668747`*^9,
3.509797906733056*^9, 3.5097980165079956`*^9, 3.5098000864633465`*^9,
3.5098023109673223`*^9, 3.5103850040033607`*^9, 3.5103860870123854`*^9,
3.5103861728292828`*^9, {3.5103862727724743`*^9, 3.5103862896956224`*^9},
3.5103868515434685`*^9, 3.510387451908705*^9, 3.514258242267736*^9,
3.514279228677637*^9, 3.515089234209879*^9, 3.5150904558757544`*^9}]
}, Open ]],
Cell["\<\
Rozhodneme se kolikastup\[NHacek]ovou k\[RHacek]\[IAcute]\[ZHacek]ovou \
validaci provedeme (na kolik \[CHacek]\[AAcute]st\[IAcute] (fold\[URing]) \
rozd\[EHacek]l\[IAcute]me tr\[EAcute]novac\[IAcute] data).\
\>", "Text",
CellChangeTimes->{{3.509193140000353*^9, 3.5091931557753563`*^9},
3.509193215716468*^9, {3.5097981857794905`*^9, 3.5097981900425315`*^9}, {
3.509798228417905*^9, 3.50979825058422*^9}, {3.5097982850846004`*^9,
3.5097983407506695`*^9}, {3.509799481824067*^9, 3.50979949665495*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"folds", " ", "=", " ", "15"}], ";"}]], "Input"],
Cell["\<\
Zjist\[IAcute]me kolik m\[AAcute]me tr\[EAcute]novac\[IAcute]ch dat, podle \
toho ur\[CHacek]\[IAcute]me jak\[EAcute] mno\[ZHacek]stv\[IAcute] dat bude \
obsahovat jeden fold.\
\>", "Text",
CellChangeTimes->{{3.5097984557662745`*^9, 3.5097984721103497`*^9}, {
3.5097985172060757`*^9, 3.509798594613906*^9}, {3.509798839207465*^9,
3.509798850059843*^9}}],
Cell[BoxData[{
RowBox[{
RowBox[{"vectors", " ", "=", " ",
RowBox[{"Take", "[",
RowBox[{
RowBox[{"Dimensions", "[", "inData", "]"}], ",", " ", "1"}], "]"}]}],
";"}], "\n",
RowBox[{
RowBox[{"vectorsInFold", " ", "=", " ",
RowBox[{"IntegerPart", "[",
RowBox[{"vectors", "/", "folds"}], "]"}]}], ";"}]}], "Input"],
Cell["\<\
Spoj\[IAcute]me tr\[EAcute]novac\[IAcute] a testovac\[IAcute] data do jedn\
\[EAcute] mno\[ZHacek]iny a na t\[EAcute]to mno\[ZHacek]in\[EHacek] provedeme \
permutaci (zam\[IAcute]ch\[AAcute]me po\[RHacek]ad\[IAcute]). Za \
prvn\[IAcute] fold prohl\[AAcute]s\[IAcute]me data s indexy 1 a\[ZHacek] \
\[OpenCurlyDoubleQuote]velikost fodu\[CloseCurlyDoubleQuote], za druh\
\[YAcute] fold data s indexy \[OpenCurlyDoubleQuote]velikost foldu + 1\
\[CloseCurlyDoubleQuote] a\[ZHacek] \[OpenCurlyDoubleQuote]2 * velikost foldu\
\[CloseCurlyDoubleQuote]... D\[IAcute]ky permutaci jsou data v t\[EHacek]chto \
foldech n\[AAcute]hodn\[AAcute].\
\>", "Text",
CellChangeTimes->{{3.509798882669484*^9, 3.5097988895973635`*^9}, {
3.5097989457654963`*^9, 3.5097989979691253`*^9}, {3.5097990397304287`*^9,
3.509799222609651*^9}, 3.5097992791743336`*^9, {3.5097993113719225`*^9,
3.5097994072600985`*^9}}],
Cell[BoxData[{
RowBox[{
RowBox[{"completeData", " ", "=", " ",
RowBox[{"Join", "[",
RowBox[{"inData", ",", " ", "outData", ",", " ", "2"}], "]"}]}],
";"}], "\n",
RowBox[{
RowBox[{"completeData", " ", "=", " ",
RowBox[{"RandomSample", "[", "completeData", "]"}]}], ";"}]}], "Input",
CellChangeTimes->{{3.509798914640044*^9, 3.5097989161887407`*^9},
3.5097994203622627`*^9, 3.5097995856217475`*^9}],
Cell["\<\
Nyn\[IAcute] p\[RHacek]istoup\[IAcute]me k samotn\[EAcute] \
k\[RHacek]\[IAcute]\[ZHacek]ov\[EAcute] validaci. V prvn\[IAcute]m \
b\[EHacek]hu pou\[ZHacek]ijeme prvn\[IAcute] fold jako valida\[CHacek]n\
\[IAcute] mno\[ZHacek]inu a ostatn\[IAcute] data jako tr\[EAcute]novac\
\[IAcute], v druh\[EAcute]m b\[EHacek]hu pou\[ZHacek]ijeme druh\[YAcute] fold \
jako valida\[CHacek]n\[IAcute] mno\[ZHacek]inu a ostatn\[IAcute] data jako tr\
\[EAcute]novac\[IAcute]. Tatko budeme pokra\[CHacek]ovat dokud \
nevy\[CHacek]erp\[AAcute]me v\[SHacek]echny foldy. V pr\[URing]b\[EHacek]hu k\
\[RHacek]\[IAcute]\[ZHacek]ov\[EAcute] validace si budeme udr\[ZHacek]ovat \
informace o nejlep\[SHacek]\[IAcute]m, nejhor\[SHacek]\[IAcute]m a \
pr\[URing]m\[EHacek]rn\[EAcute]m v\[YAcute]sledku s\[IAcute]t\[EHacek].\
\>", "Text",
CellChangeTimes->{{3.5097994617800217`*^9, 3.5097994714402485`*^9}, {
3.5097995181316776`*^9, 3.5097997931020947`*^9}}],
Cell["\<\
U\[CHacek]en\[IAcute] neuronov\[EAcute] s\[IAcute]t\[EHacek] s \
valida\[CHacek]n\[IAcute] mno\[ZHacek]inou prob\[IAcute]h\[AAcute], dokud se \
v\[YAcute]sledky s\[IAcute]t\[EHacek] na valida\[CHacek]n\[IAcute] mno\
\[ZHacek]in\[EHacek] zlep\[SHacek]uj\[IAcute]. Pokud by se za\[CHacek]aly \
zhor\[SHacek]ovat, je u\[CHacek]en\[IAcute] p\[RHacek]eru\[SHacek]eno a \
zobrazena hl\[AAcute]\[SHacek]ka NeuralFit::StoppedSearch. Pokud nehccete \
tuto h\[AAcute]\[SHacek]ku zobrazovat, m\[URing]\[ZHacek]ete jej\[IAcute] \
zobrazen\[IAcute] vypnout.\
\>", "Text",
CellChangeTimes->{{3.509799937013869*^9, 3.509800053709687*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"Off", "[",
StyleBox[
RowBox[{"NeuralFit", "::", "StoppedSearch"}], "MessageName"], "]"}],
";"}]], "Input",
CellChangeTimes->{{3.5098000716589665`*^9, 3.509800078148791*^9}}],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{"best", " ", "=", " ", "1"}], ";"}], "\n",
RowBox[{
RowBox[{"worst", " ", "=", " ", "0"}], ";"}], "\n",
RowBox[{
RowBox[{"sum", " ", "=", " ", "0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"results", "=",
RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{"For", "[",
RowBox[{
RowBox[{"i", " ", "=", " ", "1"}], ",", " ",
RowBox[{"i", " ", "<=", " ", "folds"}], ",", " ",
RowBox[{"i", "++"}], ",",
RowBox[{"(*",
RowBox[{"kod", " ", "jednoho", " ", "kola", " ", "krossvalidace"}],
"*)"}], "\n", " ",
RowBox[{
RowBox[{"validationData", " ", "=", " ",
RowBox[{"completeData", "[",
RowBox[{"[",
RowBox[{
RowBox[{"1", " ", "+", " ",
RowBox[{
RowBox[{"(",
RowBox[{"i", " ", "-", " ", "1"}], ")"}], "*",
RowBox[{"vectorsInFold", "[",
RowBox[{"[", "1", "]"}], "]"}]}]}], " ", ";;", " ",
RowBox[{"i", "*",
RowBox[{"vectorsInFold", "[",
RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], "]"}]}], ";", "\n", " ",
RowBox[{"learnData", " ", "=", " ",
RowBox[{"Drop", "[",
RowBox[{"completeData", ",", " ",
RowBox[{"{",
RowBox[{
RowBox[{"1", " ", "+", " ",
RowBox[{
RowBox[{"(",
RowBox[{"i", " ", "-", " ", "1"}], ")"}], "*",
RowBox[{"vectorsInFold", "[",
RowBox[{"[", "1", "]"}], "]"}]}]}], ",", " ",
RowBox[{"i", "*",
RowBox[{"vectorsInFold", "[",
RowBox[{"[", "1", "]"}], "]"}]}]}], "}"}]}], "]"}]}], ";", "\n",
" ",
RowBox[{"validationDataIn", " ", "=", " ",
RowBox[{"validationData", "[",
RowBox[{"[",
RowBox[{"All", ",", " ",
RowBox[{"1", " ", ";;", " ", "4"}]}], "]"}], "]"}]}], ";", "\n", " ",
RowBox[{"validationDataOut", " ", "=", " ",
RowBox[{"validationData", "[",
RowBox[{"[",
RowBox[{"All", ",", " ",
RowBox[{"5", " ", ";;", " ", "7"}]}], "]"}], "]"}]}], ";", "\n", " ",
RowBox[{"learnDataIn", " ", "=", " ",
RowBox[{"learnData", "[",
RowBox[{"[",
RowBox[{"All", ",", " ",
RowBox[{"1", " ", ";;", " ", "4"}]}], "]"}], "]"}]}], ";", "\n", " ",
RowBox[{"learnDataOut", " ", "=", " ",
RowBox[{"learnData", "[",
RowBox[{"[",
RowBox[{"All", ",", " ",
RowBox[{"5", " ", ";;", " ", "7"}]}], "]"}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"net", "=",
RowBox[{"InitializeFeedForwardNet", "[",
RowBox[{"inData", ",", "outData", ",",
RowBox[{"{",
RowBox[{"3", ",", "2"}], "}"}], ",",
RowBox[{"Neuron", "\[Rule]", "Sigmoid"}]}], "]"}]}], ";", "\n", " ",
RowBox[{
RowBox[{"{",
RowBox[{"net2", ",", " ", "record"}], "}"}], " ", "=", " ",
RowBox[{"NeuralFit", "[",
RowBox[{
"net", ",", " ", "learnDataIn", ",", " ", "learnDataOut", ",", " ",
"validationDataIn", ",", " ", "validationDataOut", ",", " ",
RowBox[{"CriterionLog", " ", "->", " ", "False"}], ",", " ",
RowBox[{"CriterionPlot", " ", "->", " ", "False"}]}], "]"}]}], ";",
"\n", " ",
RowBox[{"current", " ", "=", " ",
RowBox[{"Take", "[",
RowBox[{
RowBox[{"CriterionValidationValues", " ", "/.", " ",
RowBox[{"record", "[",
RowBox[{"[", "2", "]"}], "]"}]}], ",", " ",
RowBox[{"-", "1"}]}], "]"}]}], ";", "\n", " ",
RowBox[{"If", "[",
RowBox[{
RowBox[{
RowBox[{"current", "[",
RowBox[{"[", "1", "]"}], "]"}], " ", "<", " ", "best"}], ",", " ",
RowBox[{"best", " ", "=", " ",
RowBox[{"current", "[",
RowBox[{"[", "1", "]"}], "]"}]}], ",", " ",
RowBox[{"best", " ", "=", " ", "best"}]}], "]"}], ";", "\n", " ",
RowBox[{"If", "[",
RowBox[{
RowBox[{
RowBox[{"current", "[",
RowBox[{"[", "1", "]"}], "]"}], " ", ">", " ", "worst"}], ",", " ",
RowBox[{"worst", " ", "=", " ",
RowBox[{"current", "[",
RowBox[{"[", "1", "]"}], "]"}]}], ",", " ",
RowBox[{"worst", " ", "=", " ", "worst"}]}], "]"}], ";", "\n",
RowBox[{"sum", " ", "=", " ",
RowBox[{"sum", " ", "+", " ", "current"}]}], ";", "\[IndentingNewLine]",
RowBox[{"AppendTo", "[",
RowBox[{"results", ",",
RowBox[{"current", "[",
RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";", "\n", " ",
RowBox[{"Print", "[",
RowBox[{
RowBox[{"i", " ", "\"\<. fold = \>\""}], ",", " ",
RowBox[{"current", "[",
RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";"}]}], "\n", " ",
"]"}], "\[IndentingNewLine]",
RowBox[{"BoxWhiskerChart", "[", "results", "]"}]}], "Input",
CellChangeTimes->{{3.402214100997976*^9, 3.402214109762068*^9}, {
3.402214234036181*^9, 3.402214235441436*^9}, {3.402214368377231*^9,
3.402214374682622*^9}, {3.402214419526277*^9, 3.402214425215911*^9}, {
3.402214664776315*^9, 3.402210056905657*^9}, {3.5091933458404913`*^9,
3.5091933777705464`*^9}, {3.509687839386578*^9, 3.509687842057917*^9}, {
3.5096885560995893`*^9, 3.5096885834615636`*^9}, {3.509688859308592*^9,
3.509688859467112*^9}, {3.5096891712822075`*^9, 3.5096891722868347`*^9},
3.5096892923070755`*^9, {3.5096893864515305`*^9, 3.5096893875016637`*^9},
3.509689798970914*^9, 3.509690125930932*^9, {3.509690418275055*^9,
3.5096904354877415`*^9}, {3.509690495438854*^9, 3.5096904980521855`*^9}, {
3.5096915466578417`*^9, 3.5096915467213497`*^9}, {3.5096927172384863`*^9,
3.5096927210909758`*^9}, {3.5096928750440254`*^9,
3.5096928763131866`*^9}, {3.5096931677046885`*^9, 3.509693170441036*^9}, {
3.5096932022355733`*^9, 3.509693238696203*^9}, {3.5096932933101387`*^9,
3.5096932964390354`*^9}, {3.5096934656915283`*^9, 3.509693466055074*^9}, {
3.5097012028290195`*^9, 3.5097012029675374`*^9}, {3.5097058497706065`*^9,
3.5097058532035427`*^9}, {3.5097059102172823`*^9,
3.5097059122505407`*^9}, {3.509706368089925*^9, 3.5097064273394485`*^9},
3.5097812643472414`*^9, {3.509781323266223*^9, 3.5097813302781134`*^9}, {
3.509781394781804*^9, 3.509781426366815*^9}, {3.5097821172780495`*^9,
3.5097821460272007`*^9}, {3.509782199072936*^9, 3.50978232541848*^9}, {
3.5097824322045403`*^9, 3.5097824512744617`*^9}, {3.509782515119069*^9,
3.509782516135198*^9}, {3.5097825793092203`*^9, 3.509782589080961*^9}, {
3.509782622195166*^9, 3.5097826710743732`*^9}, {3.5097828897131367`*^9,
3.5097829048740616`*^9}, {3.509782964353615*^9, 3.509782967143469*^9}, {
3.5097830319737015`*^9, 3.5097830368483205`*^9}, {3.5097831339486504`*^9,
3.5097832025958676`*^9}, {3.5097832488707438`*^9,
3.5097832794856315`*^9}, {3.5097835854839883`*^9,
3.5097836109852266`*^9}, {3.509783676053489*^9, 3.5097836844110503`*^9}, {
3.5097837515865803`*^9, 3.5097839326020665`*^9}, {3.5097847874106135`*^9,
3.5097848107010713`*^9}, 3.509784863497775*^9, {3.5097849048285236`*^9,
3.5097849068492804`*^9}, {3.5097849916870537`*^9,
3.5097850865586004`*^9}, {3.50978520688188*^9, 3.5097852402116117`*^9}, {
3.5097852719681444`*^9, 3.5097854057641344`*^9}, {3.5097854461072574`*^9,
3.5097854463812923`*^9}, {3.5097854772787156`*^9, 3.509785488300115*^9}, {
3.5097855521007166`*^9, 3.5097855526342845`*^9}, {3.509785756946229*^9,
3.5097857649952507`*^9}, {3.50978580837426*^9, 3.509785808875823*^9}, {
3.5097858393241897`*^9, 3.5097858400717845`*^9}, {3.509786063822697*^9,
3.5097860877657375`*^9}, {3.509786180462509*^9, 3.509786297961429*^9},
3.509786351154184*^9, 3.50978642097705*^9, {3.509786453191641*^9,
3.5097864802465763`*^9}, {3.509786561980955*^9, 3.509786573168376*^9}, {
3.5097866864912663`*^9, 3.5097866945032835`*^9}, {3.5097867312324476`*^9,
3.509786740167082*^9}, {3.509786778034891*^9, 3.5097867922001896`*^9}, {
3.5097869198689013`*^9, 3.5097869289215508`*^9}, {3.5097869761350465`*^9,
3.50978709476311*^9}, {3.509787163018277*^9, 3.509787192812061*^9}, {
3.509787233149683*^9, 3.509787259923083*^9}, {3.5097873001311884`*^9,
3.5097873118091717`*^9}, 3.509787369876545*^9, {3.5097874258006463`*^9,
3.509787469322673*^9}, {3.5097875613073535`*^9, 3.5097875879312344`*^9}, {
3.509787620645889*^9, 3.5097876316207824`*^9}, {3.509787670052663*^9,
3.5097877031438646`*^9}, {3.5097877726946964`*^9, 3.509787839596692*^9},
3.5097882285725856`*^9, {3.5097882759045963`*^9, 3.5097883122127066`*^9}, {
3.509788364325824*^9, 3.50978836996404*^9}, {3.50978844934312*^9,
3.5097884509468236`*^9}, {3.509788491182433*^9, 3.5097885734973855`*^9}, {
3.5097886423896337`*^9, 3.5097886940561943`*^9}, {3.509788766180353*^9,
3.509788838538041*^9}, {3.5097888740005445`*^9, 3.5097889974137163`*^9}, {
3.509789038489932*^9, 3.509789106953126*^9}, {3.509789140400373*^9,
3.509789153615551*^9}, {3.509789257075689*^9, 3.5097892690477095`*^9}, {
3.509789332581777*^9, 3.5097896261130505`*^9}, {3.5097896682759047`*^9,
3.5097896684534273`*^9}, {3.5097897758530655`*^9, 3.509789813076292*^9}, {
3.5097898482342567`*^9, 3.5097898921673355`*^9}, {3.5097899295280795`*^9,
3.5097899314203196`*^9}, {3.509789961814679*^9, 3.5097899739102154`*^9}, {
3.5097900590320244`*^9, 3.509790148560893*^9}, {3.509790679726843*^9,
3.5097906843014235`*^9}, {3.5097907681220675`*^9,
3.5097907706118836`*^9}, {3.5097908499844627`*^9, 3.509790860396785*^9}, {
3.5097967711463547`*^9, 3.5097967722464943`*^9}, {3.5097968507544637`*^9,
3.509796910523053*^9}, {3.5097969671622458`*^9, 3.509796967755821*^9}, {
3.509797066416849*^9, 3.5097971170672812`*^9}, {3.5097972491970596`*^9,
3.5097972777736883`*^9}, {3.5097973341148424`*^9, 3.509797373997407*^9}, {
3.5097974102035046`*^9, 3.509797430333561*^9}, {3.5097974631472273`*^9,
3.509797486175152*^9}, {3.509797958630146*^9, 3.50979799126379*^9}, {
3.5097980573276787`*^9, 3.5097980583863134`*^9}, {3.5097981453648586`*^9,
3.5097981584175158`*^9}, 3.5097983467394295`*^9, {3.5097988676540775`*^9,
3.509798868256154*^9}, {3.5097994191531086`*^9, 3.509799423680684*^9}, {
3.509799835183938*^9, 3.5097998424908657`*^9}, 3.509800104077083*^9, {
3.5098001794926596`*^9, 3.509800187502177*^9}, {3.510385029348079*^9,
3.5103850673003983`*^9}, {3.5103851500914116`*^9, 3.510385188281261*^9}, {
3.510385246983715*^9, 3.510385271809868*^9}, {3.5103853233419113`*^9,
3.5103853534712377`*^9}, {3.510385521529578*^9, 3.510385523158285*^9}, {
3.510385584450568*^9, 3.5103856245936656`*^9}, {3.5103856739819374`*^9,
3.510385674617518*^9}, {3.5103859674667053`*^9, 3.510385968410325*^9}, {
3.5103860419901686`*^9, 3.5103860694056497`*^9}, {3.510386154527959*^9,
3.5103861548234963`*^9}, {3.510386267590316*^9, 3.51038627778111*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\". fold = \"\>", "\[InvisibleSpace]", "0.24504952066042424`"}],
SequenceForm[". fold = ", 0.24504952066042424`],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.515090456432786*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"2", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.2618106579091806`"}],
SequenceForm[2 ". fold = ", 0.2618106579091806],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904568848124`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"3", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.031377168276253385`"}],
SequenceForm[3 ". fold = ", 0.031377168276253385`],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904573738403`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"4", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.02205422804483828`"}],
SequenceForm[4 ". fold = ", 0.02205422804483828],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904579108706`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"5", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.04691124178333198`"}],
SequenceForm[5 ". fold = ", 0.04691124178333198],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.515090458749919*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"6", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.25971376462624`"}],
SequenceForm[6 ". fold = ", 0.25971376462624],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.515090458997933*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"7", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.004892971033746655`"}],
SequenceForm[7 ". fold = ", 0.004892971033746655],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904594059563`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"8", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.22070023559076424`"}],
SequenceForm[8 ". fold = ", 0.22070023559076424`],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.515090460734032*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"9", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.0048091581592354625`"}],
SequenceForm[9 ". fold = ", 0.0048091581592354625`],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904607360325`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"10", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.10840672886796228`"}],
SequenceForm[10 ". fold = ", 0.10840672886796228`],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904608400383`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"11", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.006510531777333068`"}],
SequenceForm[11 ". fold = ", 0.006510531777333068],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904613270664`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"12", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.023902029419495763`"}],
SequenceForm[12 ". fold = ", 0.023902029419495763`],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904617860923`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"13", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.006829636543754076`"}],
SequenceForm[13 ". fold = ", 0.006829636543754076],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.515090462304122*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"14", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.06533025741618223`"}],
SequenceForm[14 ". fold = ", 0.06533025741618223],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.5150904628131514`*^9}],
Cell[BoxData[
InterpretationBox[
RowBox[{
RowBox[{"15", " ", "\<\". fold = \"\>"}], "\[InvisibleSpace]",
"0.008024303429270107`"}],
SequenceForm[15 ". fold = ", 0.008024303429270107],
Editable->False]], "Print",
CellChangeTimes->{
3.5098000872919517`*^9, 3.509800183686692*^9, 3.5098023118239317`*^9,
3.51038500486497*^9, 3.510385077589705*^9, 3.5103851680236883`*^9,
3.5103852743671923`*^9, {3.51038532962871*^9, 3.5103853550259347`*^9},
3.510385450027999*^9, 3.51038552539907*^9, 3.5103856265289116`*^9,
3.5103856768993073`*^9, 3.5103859768829007`*^9, 3.5103860880640187`*^9,
3.510386173619383*^9, {3.5103862742021556`*^9, 3.5103862905977373`*^9},
3.5103868523465705`*^9, 3.5103874528388233`*^9, 3.5142582693181834`*^9,
3.5142792292376695`*^9, 3.515089234876917*^9, 3.51509046331818*^9}]
}, Open ]],
Cell[BoxData[
GraphicsBox[{