{"action":"created","issue":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4908","repository_url":"https://api.github.com/repos/statsmodels/statsmodels","labels_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4908/labels{/name}","comments_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4908/comments","events_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4908/events","html_url":"https://github.com/statsmodels/statsmodels/issues/4908","id":350671483,"node_id":"MDU6SXNzdWUzNTA2NzE0ODM=","number":4908,"title":"Implement generalized additive models","user":{"login":"dsaxton","id":2658661,"node_id":"MDQ6VXNlcjI2NTg2NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/2658661?v=4","gravatar_id":"","url":"https://api.github.com/users/dsaxton","html_url":"https://github.com/dsaxton","followers_url":"https://api.github.com/users/dsaxton/followers","following_url":"https://api.github.com/users/dsaxton/following{/other_user}","gists_url":"https://api.github.com/users/dsaxton/gists{/gist_id}","starred_url":"https://api.github.com/users/dsaxton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsaxton/subscriptions","organizations_url":"https://api.github.com/users/dsaxton/orgs","repos_url":"https://api.github.com/users/dsaxton/repos","events_url":"https://api.github.com/users/dsaxton/events{/privacy}","received_events_url":"https://api.github.com/users/dsaxton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2018-08-15T03:15:53Z","updated_at":"2018-08-20T14:19:30Z","closed_at":null,"author_association":"NONE","body":"It seems that there are a couple fledgling Python projects working on similar things, but might it be worthwhile implementing these models within `statsmodels`?  This is one domain where I feel that R still surpasses Python, so there's certainly some fertile ground for new development."},"comment":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/comments/414332585","html_url":"https://github.com/statsmodels/statsmodels/issues/4908#issuecomment-414332585","issue_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4908","id":414332585,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDMzMjU4NQ==","user":{"login":"josef-pkt","id":440735,"node_id":"MDQ6VXNlcjQ0MDczNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/440735?v=4","gravatar_id":"","url":"https://api.github.com/users/josef-pkt","html_url":"https://github.com/josef-pkt","followers_url":"https://api.github.com/users/josef-pkt/followers","following_url":"https://api.github.com/users/josef-pkt/following{/other_user}","gists_url":"https://api.github.com/users/josef-pkt/gists{/gist_id}","starred_url":"https://api.github.com/users/josef-pkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josef-pkt/subscriptions","organizations_url":"https://api.github.com/users/josef-pkt/orgs","repos_url":"https://api.github.com/users/josef-pkt/repos","events_url":"https://api.github.com/users/josef-pkt/events{/privacy}","received_events_url":"https://api.github.com/users/josef-pkt/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T14:19:30Z","updated_at":"2018-08-20T14:19:30Z","author_association":"MEMBER","body":"you can check my PR for how I did it which is just using the corresponding methods from scipy's distribution.\r\n\r\nThe direct answer is no, we don't have wrappers around scipy's distributions. Whether and how much to add to those is still open.\r\n\r\nthe longer answer:\r\nScipy's distributions do not include derivatives of the loglike, so the main models use our own implementation of loglike, score and hessian. (It also avoids scipy distribution overhead for generic input checking in the optimization loops.)\r\nstatsmodels.distributions have some distribution functions that are not in scipy (or not in the form/parameterization that we need), e.g. GeneralizedPoisson.\r\nOne problem that we have is that because the loglike, score and hessian are built into specific models it is difficult to reuse them.\r\n\r\nFor ordered or censored models it is easiest just to reuse the scipy distributions as much as possible because it defines more methods like cdf, ppf where reimplementing them didn't sound worthwhile so far.\r\ne.g. discrete Probit just uses scipy stats https://github.com/statsmodels/statsmodels/blob/master/statsmodels/discrete/discrete_model.py#L1927 but uses explicit code for score and hessian\r\nLogit has easy analytical formulas and implements cdf pdf directly\r\nhttps://github.com/statsmodels/statsmodels/blob/master/statsmodels/discrete/discrete_model.py#L1725\r\n\r\ni.e. the current approach is eclectic and depends on the model, there is no good reusable structure yet.\r\n"}}
{"actor":{"display_login":"josef-pkt"}}