{"action":"created","issue":{"url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1159","repository_url":"https://api.github.com/repos/hyperspy/hyperspy","labels_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1159/labels{/name}","comments_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1159/comments","events_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1159/events","html_url":"https://github.com/hyperspy/hyperspy/issues/1159","id":165802275,"number":1159,"title":"Improve decomposition documentation","user":{"login":"thomasaarholt","id":2721423,"avatar_url":"https://avatars.githubusercontent.com/u/2721423?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasaarholt","html_url":"https://github.com/thomasaarholt","followers_url":"https://api.github.com/users/thomasaarholt/followers","following_url":"https://api.github.com/users/thomasaarholt/following{/other_user}","gists_url":"https://api.github.com/users/thomasaarholt/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasaarholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasaarholt/subscriptions","organizations_url":"https://api.github.com/users/thomasaarholt/orgs","repos_url":"https://api.github.com/users/thomasaarholt/repos","events_url":"https://api.github.com/users/thomasaarholt/events{/privacy}","received_events_url":"https://api.github.com/users/thomasaarholt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/documentation","name":"documentation","color":"eb6420"},{"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/proposal","name":"proposal","color":"02d7e1"},{"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/RELEASE_next_patch","name":"RELEASE_next_patch","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-07-15T14:40:38Z","updated_at":"2016-08-01T09:54:26Z","closed_at":null,"body":"Currently the documentation for decomposition is very disorganised. The docstring currently looks like following. I think it could be useful to separate out a single general section, and a section/groups for each algorithm so that it's clearer what arguments one should be adjusting to get a correct result.\r\n\r\n```python\r\nSignature: s1.decomposition(\r\n    normalize_poissonian_noise=False, \r\n    algorithm='svd', \r\n    output_dimension=None, \r\n    centre=None, \r\n    auto_transpose=True, \r\n    navigation_mask=None, \r\n    signal_mask=None, \r\n    var_array=None, \r\n    var_func=None, \r\n    polyfit=None, \r\n    reproject=None, \r\n    return_info=False, \r\n    **kwargs)\r\nDocstring:\r\nDecomposition with a choice of algorithms\r\n\r\nThe results are stored in self.learning_results\r\n\r\nParameters\r\n----------\r\nnormalize_poissonian_noise : bool\r\n    If True, scale the SI to normalize Poissonian noise\r\nalgorithm : 'svd' | 'fast_svd' | 'mlpca' | 'fast_mlpca' | 'nmf' |\r\n    'sparse_pca' | 'mini_batch_sparse_pca' | 'RPCA_GoDec' | 'ORPCA'\r\noutput_dimension : None or int\r\n    number of components to keep/calculate\r\ncentre : None | 'variables' | 'trials'\r\n    If None no centring is applied. If 'variable' the centring will be\r\n    performed in the variable axis. If 'trials', the centring will be\r\n    performed in the 'trials' axis. It only has effect when using the\r\n    svd or fast_svd algorithms\r\nauto_transpose : bool\r\n    If True, automatically transposes the data to boost performance.\r\n    Only has effect when using the svd of fast_svd algorithms.\r\nnavigation_mask : boolean numpy array\r\n    The navigation locations marked as True are not used in the\r\n    decompostion.\r\nsignal_mask : boolean numpy array\r\n    The signal locations marked as True are not used in the\r\n    decomposition.\r\nvar_array : numpy array\r\n    Array of variance for the maximum likelihood PCA algorithm\r\nvar_func : function or numpy array\r\n    If function, it will apply it to the dataset to obtain the\r\n    var_array. Alternatively, it can a an array with the coefficients\r\n    of a polynomial.\r\nreproject : None | signal | navigation | both\r\n    If not None, the results of the decomposition will be projected in\r\n    the selected masked area.\r\nreturn_info: bool, default False\r\n    The result of the decomposition is stored internally. However, some algorithms generate some extra\r\n    information that is not stored. If True (the default is False) return any extra information if available\r\n\r\nReturns\r\n-------\r\n(X, E) : (numpy array, numpy array)\r\n    If 'algorithm' == 'RPCA_GoDec' or 'ORPCA' and 'return_info' is True,\r\n    returns the low-rank (X) and sparse (E) matrices from robust PCA.\r\n\r\nSee also\r\n--------\r\nplot_decomposition_factors, plot_decomposition_loadings, plot_lev\r\nFile:      ~/Dropbox/0_Git/GitHub Desktop/hyperspy_aar/hyperspy/learn/mva.py\r\nType:      method\r\n```"},"comment":{"url":"https://api.github.com/repos/hyperspy/hyperspy/issues/comments/236538413","html_url":"https://github.com/hyperspy/hyperspy/issues/1159#issuecomment-236538413","issue_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1159","id":236538413,"user":{"login":"dnjohnstone","id":10629656,"avatar_url":"https://avatars.githubusercontent.com/u/10629656?v=3","gravatar_id":"","url":"https://api.github.com/users/dnjohnstone","html_url":"https://github.com/dnjohnstone","followers_url":"https://api.github.com/users/dnjohnstone/followers","following_url":"https://api.github.com/users/dnjohnstone/following{/other_user}","gists_url":"https://api.github.com/users/dnjohnstone/gists{/gist_id}","starred_url":"https://api.github.com/users/dnjohnstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnjohnstone/subscriptions","organizations_url":"https://api.github.com/users/dnjohnstone/orgs","repos_url":"https://api.github.com/users/dnjohnstone/repos","events_url":"https://api.github.com/users/dnjohnstone/events{/privacy}","received_events_url":"https://api.github.com/users/dnjohnstone/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T09:54:25Z","updated_at":"2016-08-01T09:54:25Z","body":"Why do you ignore why sklearn has decided to place ICA under the decomposition umbrella? That seems to be the key point? What makes this different from the usual arguments that \"machine learning things should be left in their proper place\" i.e. sklearn?"}}
{"actor":{"display_login":"dnjohnstone"}}