{"action":"created","issue":{"url":"https://api.github.com/repos/mlandry22/kaggle/issues/3","labels_url":"https://api.github.com/repos/mlandry22/kaggle/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mlandry22/kaggle/issues/3/comments","events_url":"https://api.github.com/repos/mlandry22/kaggle/issues/3/events","html_url":"https://github.com/mlandry22/kaggle/issues/3","id":100828499,"number":3,"title":"Modern logistic regression - fast_solution question","user":{"login":"rae89","id":9400794,"avatar_url":"https://avatars.githubusercontent.com/u/9400794?v=3","gravatar_id":"","url":"https://api.github.com/users/rae89","html_url":"https://github.com/rae89","followers_url":"https://api.github.com/users/rae89/followers","following_url":"https://api.github.com/users/rae89/following{/other_user}","gists_url":"https://api.github.com/users/rae89/gists{/gist_id}","starred_url":"https://api.github.com/users/rae89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rae89/subscriptions","organizations_url":"https://api.github.com/users/rae89/orgs","repos_url":"https://api.github.com/users/rae89/repos","events_url":"https://api.github.com/users/rae89/events{/privacy}","received_events_url":"https://api.github.com/users/rae89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-13T17:48:18Z","updated_at":"2015-08-14T19:54:26Z","closed_at":null,"body":"Hi, I was wondering if you could explain the reasoning behind the way wTx inner product is being implemented in the get_p method. From reading the code it seems that the x features that have been hashed are not being used in the computation of the weight vector. Shouldn't the the inner product of the predict function be wTx = w[i] * i, which would follow along the lines of a typical logistic regression computation? Because currently it looks like it is just summing the computed weights, with no affect from the actual feature vector."},"comment":{"url":"https://api.github.com/repos/mlandry22/kaggle/issues/comments/131219439","html_url":"https://github.com/mlandry22/kaggle/issues/3#issuecomment-131219439","issue_url":"https://api.github.com/repos/mlandry22/kaggle/issues/3","id":131219439,"user":{"login":"rae89","id":9400794,"avatar_url":"https://avatars.githubusercontent.com/u/9400794?v=3","gravatar_id":"","url":"https://api.github.com/users/rae89","html_url":"https://github.com/rae89","followers_url":"https://api.github.com/users/rae89/followers","following_url":"https://api.github.com/users/rae89/following{/other_user}","gists_url":"https://api.github.com/users/rae89/gists{/gist_id}","starred_url":"https://api.github.com/users/rae89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rae89/subscriptions","organizations_url":"https://api.github.com/users/rae89/orgs","repos_url":"https://api.github.com/users/rae89/repos","events_url":"https://api.github.com/users/rae89/events{/privacy}","received_events_url":"https://api.github.com/users/rae89/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T19:54:26Z","updated_at":"2015-08-14T19:54:26Z","body":"Thanks for the reply.  I still don't understand why the x is a 0 or 1. Since the x is being generated by the data method:\r\n\r\n# build x\r\n        x = []\r\n        for key in row:\r\n            value = row[key]\r\n\r\n            # one-hot encode everything with hash trick\r\n            index = abs(hash(key + '_' + value)) % D\r\n            x.append(index)\r\n\r\n        yield t, date, ID, x, y\r\n\r\n\r\nSince x was built from the method above, wouldn't the x be hashed index values? Or am I missing something?"}}