Maximum Likelihood estimators of simple linear regression weights
5 次查看(过去 30 天)
显示 更早的评论
Hi, Sorry if this question is too simple. I am new to matlab and statistics aswell. I have a to train a simple linear regression model which has n features. This means that I have to calculate n weights for the features. So what I need to ask is that how can I calculate the maximum likelihood estimators of the weights in matlab.
Thanks
0 个评论
回答(1 个)
Image Analyst
2012-10-6
Try polyfit().
1 个评论
Tom Lane
2012-10-8
Or backslash or a Statistics Toolbox function such as regress, if n represents the number of columns in your matrix of features. These yield least squares estimates, which are the maximum likelihood estimators if the output (response) has a normal distribution.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!