{"action":"closed","issue":{"url":"https://api.github.com/repos/andreasvlachos/arow_csc/issues/5","repository_url":"https://api.github.com/repos/andreasvlachos/arow_csc","labels_url":"https://api.github.com/repos/andreasvlachos/arow_csc/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/andreasvlachos/arow_csc/issues/5/comments","events_url":"https://api.github.com/repos/andreasvlachos/arow_csc/issues/5/events","html_url":"https://github.com/andreasvlachos/arow_csc/issues/5","id":172096113,"number":5,"title":"Predicting probabilities of each label outputted in arow.py","user":{"login":"dhruvghulati","id":7677981,"avatar_url":"https://avatars.githubusercontent.com/u/7677981?v=3","gravatar_id":"","url":"https://api.github.com/users/dhruvghulati","html_url":"https://github.com/dhruvghulati","followers_url":"https://api.github.com/users/dhruvghulati/followers","following_url":"https://api.github.com/users/dhruvghulati/following{/other_user}","gists_url":"https://api.github.com/users/dhruvghulati/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvghulati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvghulati/subscriptions","organizations_url":"https://api.github.com/users/dhruvghulati/orgs","repos_url":"https://api.github.com/users/dhruvghulati/repos","events_url":"https://api.github.com/users/dhruvghulati/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvghulati/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-19T09:56:32Z","updated_at":"2016-08-31T06:05:57Z","closed_at":"2016-08-31T06:05:57Z","body":"I am trying to predict the probabilities the system has outputted in AROW for each label in my test instances.\r\n\r\nI am using this type of test data (it is a naive baseline):\r\n\r\n```\r\n1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:0 12:1 13:1 14:1 15:1 16:1 | location_slot turkey france netherlands number_slot lrb rrb\r\n```\r\n\r\nAnd using this code:\r\n\r\n    train_data = [arow.train_instance_from_svm_input(line) for line in trainDataLines]\r\n    test_data = [arow.test_instance_from_svm_input(line) for line in testDataLines]\r\n    cl = arow.AROW()\r\n    cl.train(train_data)\r\n    cl.probGeneration()\r\n    predictions = [cl.predict(d, verbose=True,probabilities=True).label2prob for d in test_data]\r\n\r\nI am getting these probabilities (each line is roughly like this):\r\n\r\n```\r\n{'11': 1e-06, '10': 1e-06, '13': 1e-06, '12': 1e-06, '15': 1e-06, '14': 1e-06, '16': 1e-06, '1': 1e-06, '3': 1e-06, '2': 1e-06, '5': 1e-06, '4': 1e-06, '7': 1e-06, '6': 1e-06, '9': 1.0000010000000001, '8': 1e-06}\r\n```\r\n\r\nWhich is clearly matching my 0 and 1 costs I have for my input data. \r\n\r\nWhereas when I use ordinary logistic regression in scikit-learn (where I don't have costs per label, just one label per instance), outputting `predict_proba`, I am getting:\r\n\r\n```\r\n5.085409071212559917e-02 1.120198203180571873e-02 3.857035939484883269e-02 2.084571186163139411e-02 1.297530078841703863e-02 1.878877233829619881e-02 8.501321511167143907e-02 2.107530829257814667e-02 4.661419888723658533e-02 3.110850980702436347e-02 3.278946527730437766e-02 8.223427089410631496e-02 3.984204282790664298e-01 8.036492304852346780e-02 2.710335198634480219e-02 4.204011128901925798e-02\r\n```\r\nAm I doing something wrong with `probGeneration`? Should I be using `batchPredict` or something to adapt the probabilities to be something more intelligent?\r\n"}}
{"actor":{"display_login":"andreasvlachos"}}