{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/keras/issues/565","repository_url":"https://api.github.com/repos/rstudio/keras","labels_url":"https://api.github.com/repos/rstudio/keras/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/keras/issues/565/comments","events_url":"https://api.github.com/repos/rstudio/keras/issues/565/events","html_url":"https://github.com/rstudio/keras/issues/565","id":370200733,"node_id":"MDU6SXNzdWUzNzAyMDA3MzM=","number":565,"title":"Error with to_categorical function","user":{"login":"cristianpachon","id":8077159,"node_id":"MDQ6VXNlcjgwNzcxNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/8077159?v=4","gravatar_id":"","url":"https://api.github.com/users/cristianpachon","html_url":"https://github.com/cristianpachon","followers_url":"https://api.github.com/users/cristianpachon/followers","following_url":"https://api.github.com/users/cristianpachon/following{/other_user}","gists_url":"https://api.github.com/users/cristianpachon/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianpachon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianpachon/subscriptions","organizations_url":"https://api.github.com/users/cristianpachon/orgs","repos_url":"https://api.github.com/users/cristianpachon/repos","events_url":"https://api.github.com/users/cristianpachon/events{/privacy}","received_events_url":"https://api.github.com/users/cristianpachon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T14:50:52Z","updated_at":"2018-10-15T16:37:18Z","closed_at":"2018-10-15T16:37:18Z","author_association":"NONE","body":"Hi,\r\n\r\nI am running the following code:\r\n\r\nlibrary(keras)\r\n\r\n\r\n\\# Determine sample size\r\nind <- sample(2, nrow(iris), replace=TRUE, prob=c(0.67, 0.33))\r\n\r\n\\# Split the `iris` data\r\niris.training <- iris[ind==1, 1:4]\r\niris.test <- iris[ind==2, 1:4]\r\n\r\n\\# Split the class attribute\r\niris.trainingtarget <- iris[ind==1, 5]\r\niris.testtarget <- iris[ind==2, 5]\r\n\r\n\r\n\\# One hot encode training target values\r\niris.trainLabels <- to_categorical(iris.trainingtarget)\r\n\r\n----- \r\nAnd for the last line, I get the following error:\r\n Error in py_call_impl(callable, dots$args, dots$keywords) : \r\n  ValueError: invalid literal for long() with base 10: 'setosa' \r\n\r\nCan you help me, please?\r\n\r\nI have read the issu #33 , re-install keras as it is said but it did not work"},"comment":{"url":"https://api.github.com/repos/rstudio/keras/issues/comments/429925300","html_url":"https://github.com/rstudio/keras/issues/565#issuecomment-429925300","issue_url":"https://api.github.com/repos/rstudio/keras/issues/565","id":429925300,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTkyNTMwMA==","user":{"login":"cristianpachon","id":8077159,"node_id":"MDQ6VXNlcjgwNzcxNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/8077159?v=4","gravatar_id":"","url":"https://api.github.com/users/cristianpachon","html_url":"https://github.com/cristianpachon","followers_url":"https://api.github.com/users/cristianpachon/followers","following_url":"https://api.github.com/users/cristianpachon/following{/other_user}","gists_url":"https://api.github.com/users/cristianpachon/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianpachon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianpachon/subscriptions","organizations_url":"https://api.github.com/users/cristianpachon/orgs","repos_url":"https://api.github.com/users/cristianpachon/repos","events_url":"https://api.github.com/users/cristianpachon/events{/privacy}","received_events_url":"https://api.github.com/users/cristianpachon/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T16:37:18Z","updated_at":"2018-10-15T16:37:18Z","author_association":"NONE","body":"Sorry for bothering. Thanks!"}}
{"actor":{"display_login":"cristianpachon"}}