{"action":"closed","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7409","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7409/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7409/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7409/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/7409","id":176548034,"number":7409,"title":"Error in doc for KernelRidge","user":{"login":"robinschucker","id":17346043,"avatar_url":"https://avatars.githubusercontent.com/u/17346043?v=3","gravatar_id":"","url":"https://api.github.com/users/robinschucker","html_url":"https://github.com/robinschucker","followers_url":"https://api.github.com/users/robinschucker/followers","following_url":"https://api.github.com/users/robinschucker/following{/other_user}","gists_url":"https://api.github.com/users/robinschucker/gists{/gist_id}","starred_url":"https://api.github.com/users/robinschucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinschucker/subscriptions","organizations_url":"https://api.github.com/users/robinschucker/orgs","repos_url":"https://api.github.com/users/robinschucker/repos","events_url":"https://api.github.com/users/robinschucker/events{/privacy}","received_events_url":"https://api.github.com/users/robinschucker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-13T04:44:26Z","updated_at":"2016-09-13T10:27:17Z","closed_at":"2016-09-13T10:27:17Z","body":"#### Description\r\nDoc for [KernelRidge](http://scikit-learn.org/stable/modules/generated/sklearn.kernel_ridge.KernelRidge.html#sklearn.kernel_ridge.KernelRidge) is incorrect for:\r\n> dual_coef_ : array, shape = [n_features] or [n_targets, n_features]\r\n> Weight vector(s) in kernel space\r\n\r\nIt should be:\r\n\r\n> dual_coef_ : array, shape = [n_samples] or [n_samples, n_targets]\r\n\r\nAs dual_coef_ represents the weight vector(s) in the kernel space which could be infinite dimensional and is stored as a linear combination of the training samples in the kernel space.\r\n\r\n#### Code to Reproduce\r\n```python\r\nfrom sklearn.kernel_ridge import KernelRidge\r\nimport numpy as np\r\nx = np.arange(18).reshape(3,6) # n_samples = 3, n_features = 6\r\ny = np.array([[1.5,2.5],[4.3,-0.1],[2.3,1.2]]) # n_samples = 3, n_targets = 2\r\nclf = KernelRidge(kernel='rbf')\r\nclf.fit(x,y)\r\nclf.dual_coef_.shape # (3, 2)\r\n```"}}
{"actor":{"display_login":"jnothman"}}