Regression with tall array (Using datastore, CSV) - Error
古いコメントを表示
Hi
5 件のコメント
Do you mean?
result = fitglm(x, y, 'Distribution', 'binomial', 'Link', 'logit');
because you have an extra ) there (though I'm sure the error nags about something else).
Can you confirm you have tall arrays (for x and y)?
istall(x)
ans =
logical
1
Also, are you trying to set the fromula? because error says so, but your call to fitglm doesn't show this.
K.P.
2021 年 7 月 12 日
Ive J
2021 年 7 月 12 日
can you share the output of your dependent/independent variables?
x
y
K.P.
2021 年 7 月 12 日
dpb
2021 年 7 月 12 日
I just tried to see if it was tall arrays and fitglm
>> X=[1:1000].'; X=tall(X);
>> Y=randn(size(X)); % this is interesting sidelight on the way...
Error using randn
Size inputs must be numeric.
>> size(X)
ans =
1×2 tall double row vector
1000 1
>> Y=randn(1000,1); Y=tall(Y); % OK, have to brute-force it
>> fitglm(X,Y,'Distribution',"normal")
Iteration [1]: 0% completed
Iteration [1]: 50% completed
Iteration [1]: 100% completed
Iteration [2]: 0% completed
Iteration [2]: 50% completed
Iteration [2]: 100% completed
Iteration [3]: 0% completed
Iteration [3]: 100% completed
ans =
Compact generalized linear regression model:
y ~ 1 + x1
Distribution = Normal
Estimated Coefficients:
Estimate SE tStat pValue
__________ __________ ________ _______
(Intercept) 0.0015036 0.064429 0.023338 0.98139
x1 1.6177e-05 0.00011151 0.14507 0.88468
1000 observations, 998 error degrees of freedom
Estimated Dispersion: 1.04
F-statistic vs. constant model: 0.021, p-value = 0.885
>>
So, fitglm will accept tall arrays; the syntax must be else where it would seem...
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!