{"action":"closed","issue":{"url":"https://api.github.com/repos/matheusoliveirasv/topicos/issues/1","repository_url":"https://api.github.com/repos/matheusoliveirasv/topicos","labels_url":"https://api.github.com/repos/matheusoliveirasv/topicos/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/matheusoliveirasv/topicos/issues/1/comments","events_url":"https://api.github.com/repos/matheusoliveirasv/topicos/issues/1/events","html_url":"https://github.com/matheusoliveirasv/topicos/issues/1","id":320312670,"number":1,"title":"KNN","user":{"login":"matheusoliveirasv","id":36018141,"avatar_url":"https://avatars3.githubusercontent.com/u/36018141?v=4","gravatar_id":"","url":"https://api.github.com/users/matheusoliveirasv","html_url":"https://github.com/matheusoliveirasv","followers_url":"https://api.github.com/users/matheusoliveirasv/followers","following_url":"https://api.github.com/users/matheusoliveirasv/following{/other_user}","gists_url":"https://api.github.com/users/matheusoliveirasv/gists{/gist_id}","starred_url":"https://api.github.com/users/matheusoliveirasv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matheusoliveirasv/subscriptions","organizations_url":"https://api.github.com/users/matheusoliveirasv/orgs","repos_url":"https://api.github.com/users/matheusoliveirasv/repos","events_url":"https://api.github.com/users/matheusoliveirasv/events{/privacy}","received_events_url":"https://api.github.com/users/matheusoliveirasv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-04T15:10:53Z","updated_at":"2018-05-04T15:13:15Z","closed_at":"2018-05-04T15:13:15Z","author_association":"OWNER","body":"tabela = [\r\n[5.1,3.5,1.4,0.2,\"Iris-setosa1\"],\r\n[4.9,3.0,1.4,0.2,\"Iris-setosa2\"],\r\n[4.7,3.2,1.3,0.2,\"Iris-setosa3\"],\r\n[4.6,3.1,1.5,0.2,\"Iris-setosa4\"],\r\n[5.0,3.6,1.4,0.2,\"Iris-setosa5\"],\r\n[5.4,3.9,1.7,0.4,\"Iris-setosa6\"],\r\n[4.6,3.4,1.4,0.3,\"Iris-setosa7\"],\r\n[5.0,3.4,1.5,0.2,\"Iris-setosa8\"],\r\n[4.4,2.9,1.4,0.2,\"Iris-setosa9\"],\r\n[4.9,3.1,1.5,0.1,\"Iris-setosa10\"],\r\n[5.4,3.7,1.5,0.2,\"Iris-setosa11\"],\r\n[4.8,3.4,1.6,0.2,\"Iris-setosa12\"],\r\n[4.8,3.0,1.4,0.1,\"Iris-setosa13\"],\r\n[4.3,3.0,1.1,0.1,\"Iris-setosa14\"],\r\n[7.0,3.2,4.7,1.4,\"Iris-versicolor1\"],\r\n[6.4,3.2,4.5,1.5,\"Iris-versicolor2\"],\r\n[6.9,3.1,4.9,1.5,\"Iris-versicolor3\"],\r\n[5.5,2.3,4.0,1.3,\"Iris-versicolor4\"],\r\n[6.5,2.8,4.6,1.5,\"Iris-versicolor5\"],\r\n[5.7,2.8,4.5,1.3,\"Iris-versicolor6\"],\r\n[6.3,3.3,4.7,1.6,\"Iris-versicolor7\"],\r\n[4.9,2.4,3.3,1.0,\"Iris-versicolor8\"],\r\n[6.6,2.9,4.6,1.3,\"Iris-versicolor9\"],\r\n[5.2,2.7,3.9,1.4,\"Iris-versicolor10\"],\r\n[5.0,2.0,3.5,1.0,\"Iris-versicolor11\"],\r\n[5.9,3.0,4.2,1.5,\"Iris-versicolor12\"],\r\n[6.0,2.2,4.0,1.0,\"Iris-versicolor13\"],\r\n[6.1,2.9,4.7,1.4,\"Iris-versicolor14\"],\r\n[5.6,2.9,3.6,1.3,\"Iris-versicolor15\"],\r\n[6.7,3.1,4.4,1.4,\"Iris-versicolor16\"],\r\n[5.6,3.0,4.5,1.5,\"Iris-versicolor17\"],\r\n[6.3,3.3,6.0,2.5,\"Iris-virginica1\"],\r\n[5.8,2.7,5.1,1.9,\"Iris-virginica2\"],\r\n[7.1,3.0,5.9,2.1,\"Iris-virginica3\"],\r\n[6.3,2.9,5.6,1.8,\"Iris-virginica4\"],\r\n[6.5,3.0,5.8,2.2,\"Iris-virginica5\"],\r\n[7.6,3.0,6.6,2.1,\"Iris-virginica6\"],\r\n[4.9,2.5,4.5,1.7,\"Iris-virginica7\"],\r\n[7.3,2.9,6.3,1.8,\"Iris-virginica8\"],\r\n[6.7,2.5,5.8,1.8,\"Iris-virginica9\"]]\r\nvetor = [1,2,3,7]\r\nimport math\r\ndef distanciaEuclidiana(a,b):\r\n    d = 0\r\n    for i,j in zip(a,b):\r\n        d+= (i-j)**2\r\n    return math.sqrt(d)\r\ndef vizinhos(vetor,tabela):\r\n    vizs = []\r\n    for i in tabela:\r\n        vizs.append(distanciaEuclidiana(vetor,i[:-1]))\r\n    return vizs"}}
{"actor":{"display_login":"matheusoliveirasv"}}