Machine Learning for Panel Data

Can anyone please confirm whether Matlab supports machine learning methods for panel/longitudinal data?
I have not been able to find anything around trees/random forests etc.
Many thanks

답변 (1개)

Hiro Yoshino
Hiro Yoshino 2022년 4월 27일

0 개 추천

Yes, it does.
table type variable is supported by many ML models. For example, SVM (https://jp.mathworks.com/help/stats/fitcecoc.html) accepts "Tbl" (table) as a first argument.
This is where "table" is elaborated https://jp.mathworks.com/help/matlab/tables.html

댓글 수: 3

Thanks very much Hiro.
Does that also accept unbalanced panel data or do they have to be balanced?
Also, in my case I have a dataset broadly similar to this one:
load RetailCreditPanelData.mat
I couldn't see in the links you provided how or where I'd let the model know to use the ID (Loan Identifier column in this example) such that it understands that the data is indeed panel data with the ID variable being the variable that distinguishes it between individuals.
Hiro Yoshino
Hiro Yoshino 2022년 4월 29일
Looks like you need to get yourself familiarized with the MATLAB documentation a bit more.
You will see the available syntaxes as follows:
Mdl = fitcecoc(Tbl,ResponseVarName)
Mdl = fitcecoc(Tbl,formula)
Mdl = fitcecoc(Tbl,Y)
Mdl = fitcecoc(X,Y)
Mdl = fitcecoc(___,Name,Value)
[Mdl,HyperparameterOptimizationResults] = fitcecoc(___,Name,Value)
then you may want to puress the link to the "Name" & "Value" option. This option allows you to tune the model finely as you wish. In the list of this option, you'll find "PredictorNames" and "ResponseName". These are where you specify the predictors and the response respectively.
Nick
Nick 2022년 5월 4일
편집: Nick 2022년 5월 4일
Thank you Hiro. Apologies for being repetitive but having gone through the links I still have trouble understanding this.
In this simple example below how exactly do I add the ID variable (data.ID) in this model given this is a panel data set where there are different borrowers (i.e. different IDs) with several observations under each ID?
load RetailCreditPanelData.mat
data = data(1:1000,:);
X = data(:,[2:3,5]);
Y = data.Default;
Model1 = fitcecoc(X,Y);

댓글을 달려면 로그인하십시오.

카테고리

제품

릴리스

R2020b

질문:

2022년 4월 26일

편집:

2022년 5월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by