{"id":22904074,"url":"https://github.com/ftes/de.ftes.uon.comp6380.ha1","last_synced_at":"2025-04-01T07:57:08.663Z","repository":{"id":29336324,"uuid":"32870129","full_name":"ftes/de.ftes.uon.comp6380.ha1","owner":"ftes","description":null,"archived":false,"fork":false,"pushed_at":"2015-04-10T23:25:56.000Z","size":706,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T04:42:19.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ftes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-25T14:36:25.000Z","updated_at":"2015-04-10T23:25:57.000Z","dependencies_parsed_at":"2022-09-06T19:30:22.547Z","dependency_job_id":null,"html_url":"https://github.com/ftes/de.ftes.uon.comp6380.ha1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftes%2Fde.ftes.uon.comp6380.ha1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftes%2Fde.ftes.uon.comp6380.ha1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftes%2Fde.ftes.uon.comp6380.ha1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftes%2Fde.ftes.uon.comp6380.ha1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftes","download_url":"https://codeload.github.com/ftes/de.ftes.uon.comp6380.ha1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604618,"owners_count":20804100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T02:40:06.701Z","updated_at":"2025-04-01T07:57:08.645Z","avatar_url":"https://github.com/ftes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Q1 Variations of the Two-Spiral Task\n\n## a) Original Dataset\n\n### Steps\n\n1. data obtained from [http://wiki.cs.brynmawr.edu/?page=TwoSpiralsProblem](http://wiki.cs.brynmawr.edu/?page=TwoSpiralsProblem)\n    1. version on blackboard did not contain class identifiers\n    2. according to the code in the [original paper](http://www.researchgate.net/publication/269337640_Learning_to_Tell_Two_Spirals_Apart), this seems to be the correct format\n2. converted spaces to tabs\n3. processed with Pybrain ([pybrain-classify.py](pybrain-classify.py))\n    1. followed [tutorial](http://pybrain.org/docs/tutorial/fnn.html)\n    2. used two binary output neurons (``dataset._convertToOneOfMany(bounds=[0.,1.])``)\n    3. used ideas from [Beherey et al.](http://www.hindawi.com/journals/acisc/2009/721370/)\n        1. network layout: 2 hidden layers with 77 neurons each\n        2. activation: tanh for hidden layers, linear for output\n        3. RPROP as training algorithm, because it converges faster than back propagation\n \n### Result\n\n- reproduce by running [pybrain-classify.py](pybrain-classify.py)\n- visualization of final result not available (plot stopped responding)\n    - ![intermediate output](original-dataset-intermediate-output.png)\n- training error achieved after 5000 epochs: 0.52% (1 misclassified)\n    - ![error curve](data-error.png)\n\n\n## b) Self-generated dataset\n\n### Steps\n\n1. generated data set using algorithm in blackboard \n    - ![denser-dataset.png](denser-dataset.png)\n    1. far denser spirals\n    2. 1920 (10x as many) data points\n2. trained feed-forward net with same characteristics as in a) on new data\n\n### Result\n\n- 10 times as many data points leads to longer training times per epoch\n- faster conversion\n    - zero classification errors after 598 epochs\n    - ![denser output](dense-data-output.png)\n- smoother learning curve\n    - ![denser error](denser-data-error.png)\n\n\n## c) Four Spirals\n\n### Steps\n\n1. adapted spiral generation script to generate two additional spirals (rotated 90 degrees against original ones)\n    - ![four spirals](four-spirals.png)\n2. trained feed-forward net with same characteristics as in a) (but 4 classes instead of only two) on new data\n\n### Result\n\n- due to time constraints canceled training after 2000 epochs\n    - classification error at this point: 28.42%\n    - ![four spiral output](four-output.png)\n    - ![four spiral error](four-error.png)\n- up to this point promising: with enough time, the ANN should hopefully generalize\n\n\n## d) ANNs vs SVMs\n\n\n### General Discussion\n\n- as discussed in class, SVMs can be seen as a generalisation of neural networks\n    - with a good kernel, the spiral data can be transformed into a linearly separable form\n    \n### Results\n\n- as suggested in the background reading paper, we used radial basis function kernels\n- far lower training times than ANNs for the spiral task","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftes%2Fde.ftes.uon.comp6380.ha1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftes%2Fde.ftes.uon.comp6380.ha1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftes%2Fde.ftes.uon.comp6380.ha1/lists"}