A method of interfacing a subject's brain to a machine comprising the steps of: a) calibrating comprising: - acquiring electrophysiological signals ( s (t)) representative of neuronal activity of the subject's brain, and representing said electrophysiological signals acquired over at least one observation time window in the form of a N-way data tensor x (t), N being greater than or equal to one; - acquiring at least one observed output vector y(t) associated to said time window or windows; - determining a linear regression model between said data tensor or tensors and the corresponding observed output vector or vectors, and predicting at least on output vector ŷ(t) from said linear regression model and at least one said data tensor; and - determining, by nonlinear regression, a link function fitting said observed output vector or vectors y(t) with corresponding predicted output vector or vectors ŷ (t); b) acquiring electrophysiological signals ( s (t)) representative of neuronal activity of the subject's brain; c) representing electrophysiological signals acquired over an observation time window in the form of a second N-way data tensor x (t), N being greater than or equal to one; and d) generating command signals (S(t)) for said machine by applying Generalized Linear regression over said data tensor, comprising the link function determined in step a). a) calibrating comprising: - acquiring electrophysiological signals ( s (t)) representative of neuronal activity of the subject's brain, and representing said electrophysiological signals acquired over at least one observation time window in the form of a N-way data tensor x (t), N being greater than or equal to one; - acquiring at least one observed output vector y(t) associated to said time window or windows; - determining a linear regression model between said data tensor or tensors and the corresponding observed output vector or vectors, and predicting at least on output vector ŷ(t) from said linear regression model and at least one said data tensor; and - determining, by nonlinear regression, a link function fitting said observed output vector or vectors y(t) with corresponding predicted output vector or vectors ŷ (t); - acquiring electrophysiological signals ( s (t)) representative of neuronal activity of the subject's brain, and representing said electrophysiological signals acquired over at least one observation time window in the form of a N-way data tensor x (t), N being greater than or equal to one; - acquiring at least one observed output vector y(t) associated to said time window or windows; - determining a linear regression model between said data tensor or tensors and the corresponding observed output vector or vectors, and predicting at least on output vector ŷ(t) from said linear regression model and at least one said data tensor; and - determining, by nonlinear regression, a link function fitting said observed output vector or vectors y(t) with corresponding predicted output vector or vectors ŷ (t); b) acquiring electrophysiological signals ( s (t)) representative of neuronal activity of the subject's brain; c) representing electrophysiological signals acquired over an observation time window in the form of a second N-way data tensor x (t), N being greater than or equal to one; and d) generating command signals (S(t)) for said machine by applying Generalized Linear regression over said data tensor, comprising the link function determined in step a).