{"action":"created","issue":{"url":"https://api.github.com/repos/Nirstorm/nirstorm/issues/52","repository_url":"https://api.github.com/repos/Nirstorm/nirstorm","labels_url":"https://api.github.com/repos/Nirstorm/nirstorm/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/Nirstorm/nirstorm/issues/52/comments","events_url":"https://api.github.com/repos/Nirstorm/nirstorm/issues/52/events","html_url":"https://github.com/Nirstorm/nirstorm/pull/52","id":346934540,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1Njc0MjA2","number":52,"title":"[GLM] Add external regressor","user":{"login":"Edouard2laire","id":24530402,"node_id":"MDQ6VXNlcjI0NTMwNDAy","avatar_url":"https://avatars3.githubusercontent.com/u/24530402?v=4","gravatar_id":"","url":"https://api.github.com/users/Edouard2laire","html_url":"https://github.com/Edouard2laire","followers_url":"https://api.github.com/users/Edouard2laire/followers","following_url":"https://api.github.com/users/Edouard2laire/following{/other_user}","gists_url":"https://api.github.com/users/Edouard2laire/gists{/gist_id}","starred_url":"https://api.github.com/users/Edouard2laire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Edouard2laire/subscriptions","organizations_url":"https://api.github.com/users/Edouard2laire/orgs","repos_url":"https://api.github.com/users/Edouard2laire/repos","events_url":"https://api.github.com/users/Edouard2laire/events{/privacy}","received_events_url":"https://api.github.com/users/Edouard2laire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"thomas-vincent","id":631566,"node_id":"MDQ6VXNlcjYzMTU2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/631566?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-vincent","html_url":"https://github.com/thomas-vincent","followers_url":"https://api.github.com/users/thomas-vincent/followers","following_url":"https://api.github.com/users/thomas-vincent/following{/other_user}","gists_url":"https://api.github.com/users/thomas-vincent/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-vincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-vincent/subscriptions","organizations_url":"https://api.github.com/users/thomas-vincent/orgs","repos_url":"https://api.github.com/users/thomas-vincent/repos","events_url":"https://api.github.com/users/thomas-vincent/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-vincent/received_events","type":"User","site_admin":false},"assignees":[{"login":"thomas-vincent","id":631566,"node_id":"MDQ6VXNlcjYzMTU2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/631566?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-vincent","html_url":"https://github.com/thomas-vincent","followers_url":"https://api.github.com/users/thomas-vincent/followers","following_url":"https://api.github.com/users/thomas-vincent/following{/other_user}","gists_url":"https://api.github.com/users/thomas-vincent/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-vincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-vincent/subscriptions","organizations_url":"https://api.github.com/users/thomas-vincent/orgs","repos_url":"https://api.github.com/users/thomas-vincent/repos","events_url":"https://api.github.com/users/thomas-vincent/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-vincent/received_events","type":"User","site_admin":false},{"login":"MelaniePelegrini","id":40272670,"node_id":"MDQ6VXNlcjQwMjcyNjcw","avatar_url":"https://avatars0.githubusercontent.com/u/40272670?v=4","gravatar_id":"","url":"https://api.github.com/users/MelaniePelegrini","html_url":"https://github.com/MelaniePelegrini","followers_url":"https://api.github.com/users/MelaniePelegrini/followers","following_url":"https://api.github.com/users/MelaniePelegrini/following{/other_user}","gists_url":"https://api.github.com/users/MelaniePelegrini/gists{/gist_id}","starred_url":"https://api.github.com/users/MelaniePelegrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelaniePelegrini/subscriptions","organizations_url":"https://api.github.com/users/MelaniePelegrini/orgs","repos_url":"https://api.github.com/users/MelaniePelegrini/repos","events_url":"https://api.github.com/users/MelaniePelegrini/events{/privacy}","received_events_url":"https://api.github.com/users/MelaniePelegrini/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-08-02T09:37:17Z","updated_at":"2018-08-21T15:28:56Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/Nirstorm/nirstorm/pulls/52","html_url":"https://github.com/Nirstorm/nirstorm/pull/52","diff_url":"https://github.com/Nirstorm/nirstorm/pull/52.diff","patch_url":"https://github.com/Nirstorm/nirstorm/pull/52.patch"},"body":"Hi. \r\n\r\nThis PR add a ( temporary, I think ) solution to add external regressor to the design matrix. \r\n\r\nIt ask the user to enter the name of a function he coded, and call it with the following argument : sProcess and sInput. \r\n\r\nFor example, using ' nst_add_external_regressor ' as input with the following function will add a constant regressor to the design matrix : \r\n\r\n```\r\nfunction [C,name]=nst_add_external_regressor(sProcess, sInput)\r\n\r\n    DataMat = in_bst_data(sInput.FileName);\r\n    time=DataMat.Time - DataMat.Time(1);\r\n    \r\n    C=ones( size(time,2),1 );\r\n    name='Constant';\r\n```\r\nwhen can also do this : @(sProcess,sInputs) nst_add_external_regressor(sProcess,sInputs,2) \r\n```\r\nfunction [C,name]=nst_add_external_regressor(sProcess, sInput,order)\r\n\r\n    DataMat = in_bst_data(sInput.FileName);\r\n    time=DataMat.Time - DataMat.Time(1);\r\n    \r\n     name{order+1}='';\r\n          \r\n     C=legendre(time,order);\r\n     for i=0:order\r\n        name{i+1}= ['Legendre ' num2str(i) ];  \r\n     end    \r\nend\r\n\r\n```\r\nto insert the 3 first Legendre polynomials to the design matrix.  ( constant, x, ( 3x² -1)/3 ) \r\n    \r\n\r\nThis PR also expose ols and ar-irls method so that we can use them to compute the group-level analysis. "},"comment":{"url":"https://api.github.com/repos/Nirstorm/nirstorm/issues/comments/414716212","html_url":"https://github.com/Nirstorm/nirstorm/pull/52#issuecomment-414716212","issue_url":"https://api.github.com/repos/Nirstorm/nirstorm/issues/52","id":414716212,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDcxNjIxMg==","user":{"login":"thomas-vincent","id":631566,"node_id":"MDQ6VXNlcjYzMTU2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/631566?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-vincent","html_url":"https://github.com/thomas-vincent","followers_url":"https://api.github.com/users/thomas-vincent/followers","following_url":"https://api.github.com/users/thomas-vincent/following{/other_user}","gists_url":"https://api.github.com/users/thomas-vincent/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-vincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-vincent/subscriptions","organizations_url":"https://api.github.com/users/thomas-vincent/orgs","repos_url":"https://api.github.com/users/thomas-vincent/repos","events_url":"https://api.github.com/users/thomas-vincent/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-vincent/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T15:28:56Z","updated_at":"2018-08-21T15:28:56Z","author_association":"CONTRIBUTOR","body":"Hello,\r\n\r\nI see two use cases:\r\n- adding a parametric regressor that is built on the temporal axis. Then it should be your second version, like:\r\n```matlab\r\nnst_add_parametric_regressor(sProcess, sInput, options) \r\n```\r\nBut it will handle several heterogeneous scenario depending on the type of generator.\r\nI would be clearer to make one function per generator, eg `nst_add_legendre_regressor(sProcess, sInput, order)` \r\n\r\n- adding external measurements. Then it should depend on another set of input data and we should handle the alignment of time axes between the two, with interpolation.  \r\n\r\nIt actually depends on your current actual needs. What are they?\r\n"}}
{"actor":{"display_login":"thomas-vincent"}}