{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6913","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6913/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6913/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6913/events","html_url":"https://github.com/scikit-learn/scikit-learn/pull/6913","id":161331582,"number":6913,"title":"[MRG] Make CD use fused types","user":{"login":"yenchenlin","id":7057863,"avatar_url":"https://avatars.githubusercontent.com/u/7057863?v=3","gravatar_id":"","url":"https://api.github.com/users/yenchenlin","html_url":"https://github.com/yenchenlin","followers_url":"https://api.github.com/users/yenchenlin/followers","following_url":"https://api.github.com/users/yenchenlin/following{/other_user}","gists_url":"https://api.github.com/users/yenchenlin/gists{/gist_id}","starred_url":"https://api.github.com/users/yenchenlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yenchenlin/subscriptions","organizations_url":"https://api.github.com/users/yenchenlin/orgs","repos_url":"https://api.github.com/users/yenchenlin/repos","events_url":"https://api.github.com/users/yenchenlin/events{/privacy}","received_events_url":"https://api.github.com/users/yenchenlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":50,"created_at":"2016-06-21T01:34:06Z","updated_at":"2016-08-16T06:16:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6913","html_url":"https://github.com/scikit-learn/scikit-learn/pull/6913","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/6913.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/6913.patch"},"body":"According to #5464, current implementation of **ElasticNet** and **Lasso** in scikit-learn constrain the input to be `np.float64`, which is a waste of space.\r\n\r\nThis PR try to make CD algorithms support fused types when fitting `np.float32` dense data and therefore reduce redundant data copy.\r\n\r\n- [x] Make inline helper functions support fused types\r\n- [x] Make dense CD ElasticNet support fused types\r\n- [x] Add warning when alpha close to zero and X is `np.float32`\r\n- [x] Add tests\r\n\r\n**\\*\\*UPDATE 7/7**\r\n\r\nHere is the memory profiling results when fitting `np.float32` data:\r\n\r\n- master\r\n\r\n![master](https://cloud.githubusercontent.com/assets/7057863/16658531/4fae265c-4499-11e6-98c2-2905f6a72c41.png)\r\n\r\n- this branch\r\n\r\n![float32](https://cloud.githubusercontent.com/assets/7057863/16658248/41bc5858-4498-11e6-8050-c1fa1a0c9004.png)\r\n\r\n**\\*\\*UPDATE 7/12**\r\n\r\nHere is the memory profiling results when fitting **sparse** `np.float32` data:\r\n\r\n- master\r\n\r\n![64](https://cloud.githubusercontent.com/assets/7057863/16752698/416bed74-4816-11e6-8d55-513cbf62f597.png)\r\n\r\n- this branch\r\n\r\n![32](https://cloud.githubusercontent.com/assets/7057863/16752696/3e2af95c-4816-11e6-95ed-2a5154267a6f.png)\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/240012976","html_url":"https://github.com/scikit-learn/scikit-learn/pull/6913#issuecomment-240012976","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6913","id":240012976,"user":{"login":"yenchenlin","id":7057863,"avatar_url":"https://avatars.githubusercontent.com/u/7057863?v=3","gravatar_id":"","url":"https://api.github.com/users/yenchenlin","html_url":"https://github.com/yenchenlin","followers_url":"https://api.github.com/users/yenchenlin/followers","following_url":"https://api.github.com/users/yenchenlin/following{/other_user}","gists_url":"https://api.github.com/users/yenchenlin/gists{/gist_id}","starred_url":"https://api.github.com/users/yenchenlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yenchenlin/subscriptions","organizations_url":"https://api.github.com/users/yenchenlin/orgs","repos_url":"https://api.github.com/users/yenchenlin/repos","events_url":"https://api.github.com/users/yenchenlin/events{/privacy}","received_events_url":"https://api.github.com/users/yenchenlin/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T06:16:31Z","updated_at":"2016-08-16T06:16:31Z","body":"@jnothman , I think other linear models will call `check_X_y` to ensure data is `np.float64` before calling `_preprocess_data` if they don't support `np.float32`.\r\n\r\nFor example:\r\n\r\n- [ridge.py](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/ridge.py#L941)\r\n- [bayes.py](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/bayes.py#L363)\r\n"}}
{"actor":{"display_login":"yenchenlin"}}