{"action":"closed","issue":{"url":"https://api.github.com/repos/msmbuilder/msmbuilder/issues/553","labels_url":"https://api.github.com/repos/msmbuilder/msmbuilder/issues/553/labels{/name}","comments_url":"https://api.github.com/repos/msmbuilder/msmbuilder/issues/553/comments","events_url":"https://api.github.com/repos/msmbuilder/msmbuilder/issues/553/events","html_url":"https://github.com/msmbuilder/msmbuilder/issues/553","id":68865188,"number":553,"title":"potential bug with tICA fitting","user":{"login":"evanfeinberg","id":1760982,"avatar_url":"https://avatars.githubusercontent.com/u/1760982?v=3","gravatar_id":"","url":"https://api.github.com/users/evanfeinberg","html_url":"https://github.com/evanfeinberg","followers_url":"https://api.github.com/users/evanfeinberg/followers","following_url":"https://api.github.com/users/evanfeinberg/following{/other_user}","gists_url":"https://api.github.com/users/evanfeinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/evanfeinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanfeinberg/subscriptions","organizations_url":"https://api.github.com/users/evanfeinberg/orgs","repos_url":"https://api.github.com/users/evanfeinberg/repos","events_url":"https://api.github.com/users/evanfeinberg/events{/privacy}","received_events_url":"https://api.github.com/users/evanfeinberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-16T07:37:14Z","updated_at":"2015-04-22T07:04:25Z","closed_at":"2015-04-22T07:04:25Z","body":"Hello MSMBuilders, \r\n\r\nIt's been a great pleasure to learn how to use this software package. I believe I've found a bug with tICA fitting. \r\n\r\nI first instantiate a tICA object, then use it to fit to a set of features, and then try to project the result into a reduced data set. Unfortunately, no matter which method I use -- fit_transform() or fit() then transform() -- I get the same error, that I must fit the model before using it. \r\n\r\nHere is the relevant code:\r\n\r\n```python\r\ntraj = md.load(traj_files, top = \"/home/enf/b2ar_analysis/H-05/system.pdb\", stride=100)\r\nphi_psi_chi2 = DihedralFeaturizer(types=['phi','psi','chi2'])\r\nfeatures = phi_psi_chi2.transform(traj_list = tram)\r\ntica_model = tICA(n_components=4)\r\nfitted_model = tica_model.fit(features)\r\nreduced_data = fitted_model.transform(features)\r\n```\r\n\r\nThe same error is thrown if I use this code instead:\r\n```\r\ntica_model = tICA(n_components=4)\r\nreduced_data = tica_model.fit_transform(features)\r\n```\r\nHere is the error itself:\r\n```\r\n  File \"find_states.py\", line 65, in <module>\r\n    reduced_data = fitted_model.transform(features)\r\n  File \"/home/enf/anaconda/lib/python2.7/site-packages/msmbuilder-3.2.0-py2.7-linux-x86_64.egg/msmbuilder/decomposition/tica.py\", line 306, in transform\r\n    X_transformed = np.dot(X, self.components_.T)\r\n  File \"/home/enf/anaconda/lib/python2.7/site-packages/msmbuilder-3.2.0-py2.7-linux-x86_64.egg/msmbuilder/decomposition/tica.py\", line 213, in components_\r\n    return self.eigenvectors_[:, 0:self.n_components].T\r\n  File \"/home/enf/anaconda/lib/python2.7/site-packages/msmbuilder-3.2.0-py2.7-linux-x86_64.egg/msmbuilder/decomposition/tica.py\", line 198, in eigenvectors_\r\n    self._solve()\r\n  File \"/home/enf/anaconda/lib/python2.7/site-packages/msmbuilder-3.2.0-py2.7-linux-x86_64.egg/msmbuilder/decomposition/tica.py\", line 166, in _solve\r\n    raise RuntimeError('must fit the model before using it')\r\nRuntimeError: must fit the model before using it\r\n```\r\nThanks for any help in resolving this.\r\n\r\nCheers,\r\nEvan\r\n"}}