필터 지우기
필터 지우기

model estimation using training data

조회 수: 1 (최근 30일)
fafz1203
fafz1203 2016년 10월 17일
I want to estimate a linear model given training data. the linear model equation is given by y=Xb, where 'b' is the model. According to regression definition the linear model is estimated is estimated using the following equation: b = (X'X)X'y
here is the code for my training data mu=zeros(1,10); sigma=eye(10); xTrain = mvnrnd(mu,sigma,1000)'; xTrainT = (xTrain)'; yTrain = randn(1000,1);
now i want to implement the model estimation equation and estimate 'b'.
i used the following code to do that:
betaHat = ((pinv(xTrainT*xTrain))*xTrainT); i get an error saying 'matrix dimension must agree'. i don't know how to solve it everything seems to be fine and the estimation equation for 'b' is also correct.
your help is much appreciated, i am very frustrated thanks

답변 (0개)

카테고리

Help CenterFile Exchange에서 Communications Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by