{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8023","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8023/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8023/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8023/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/8023","id":194468583,"number":8023,"title":"Should cloning create equal parameters","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"labels":[{"id":68750477,"url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/API","name":"API","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-08T23:05:17Z","updated_at":"2016-12-21T12:11:56Z","closed_at":null,"body":"I'm trying to make our common tests work on instances instead of classes in #8022 - this is a prerequisite to implement instance-level estimator tags and get rid of the hard-coded classes.\r\nI ran into an *interesting* issue.\r\n\r\nInstead of instantiating an estimator, I clone it. I expected that parameters after cloning are equal (``==``) to before cloning. They are not.\r\n\r\n```python\r\nfrom sklearn.cluster import AgglomerativeClustering\r\nfrom sklearn.base import clone\r\n\r\nagg = AgglomerativeClustering()\r\nagg2 = clone(agg)\r\n\r\nagg.memory == agg2.memory\r\n```\r\n> False\r\n\r\nQuestion: should this condition be true? I think it's not actually an issue for changing the tests, but it seemed somewhat weird to me.\r\n\r\nping @GaelVaroquaux @jnothman @agramfort \r\n"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/268508416","html_url":"https://github.com/scikit-learn/scikit-learn/issues/8023#issuecomment-268508416","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8023","id":268508416,"user":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T12:11:56Z","updated_at":"2016-12-21T12:11:56Z","body":"I think this should be true fundamentally, but a lot of objects don't have equality defined, or defined reasonably as is the case of numpy arrays. Obviously a clone `A'` of a fitted estimator `A` is not equal, by some definition, to `A`... but equality has not been defined."}}
{"actor":{"display_login":"jnothman"}}