Popis: |
V delu obravnavamo problem prepoznavanja ročno napisanih števk. Reševanja se lotimo na dva različna načina. Oba algoritma naučimo in preizkusimo na realnih podatkih, ki jih dobimo iz spletne baze MNIST. Najprej števke predstavimo kot vektorje ter z uporabo singularnega razcepa za vsako števko določimo podprostor, v katerem se nahajajo lepi primeri te števke. Nove števke določimo tako, da primerjamo razdalje do posameznih podprostorov, ki nam povejo, v katerem podprostoru lahko to števko najbolje aproksimiramo. S testiranjem ugotovimo, da s takim pristopom dosežemo 95,85% natančnost. Drugi pristop uporablja nevronske mreže. Začnemo z izpeljavo osnovnega postopka učenja mreže z gradientnim spustom in vzvratno propagacijo ter si nato pogledamo nekaj izboljšav. Ugotoviti moramo še optimalne parametre učenja, kar naredi ta postopek veliko bolj časovno zahteven od prvega. Ko določimo optimalno mrežo in njene parametre, na testnih podatkih dosežemo 98,08% natančnost. Pri primerjavi obeh postopkov ugotovimo, da delata podobne napake in da so te napake storjene na števkah, pri katerih tudi mi ne bi bili prepričani, katero števko predstavljajo. In this work we study handwritten digit recognition. We approach the problem with two different methods. Both algorithms are trained and tested on real data, obtained from the MNIST Database of handwritten digits. First, we present the digits as vectors, and using singular value decomposition we determine the subspaces in which representative examples of each digit are located. New digits are determined by comparing the distances to the subspaces that correspond to each digit. The one with the smallest distance is the subspace in which the given digit could be best approximated. The result of the testing is that such an approach achieves 95,85% accuracy. Second approach uses neural networks. We derive the basic network learning process with gradient descent and backward propagation and study some improvements. We also need to determine the optimal learning parameters, which makes this process much more time consuming than the first one. Once we determine the optimal architecture of the net and its parameters, we achieve 98,08% accuracy on the test data. When comparing both procedures, we see that they make similar errors and that these errors occur at handwritten digits for which also we would not be sure which digit they represent. |