Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Multiple-regression/MATLAB/multiple-regression-1.m
Normal file
5
Task/Multiple-regression/MATLAB/multiple-regression-1.m
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
n=100; k=10;
|
||||
y = randn (1,n); % generate random vector y
|
||||
X = randn (k,n); % generate random matrix X
|
||||
b = y / X
|
||||
b = 0.1457109 -0.0777564 -0.0712427 -0.0166193 0.0292955 -0.0079111 0.2265894 -0.0561589 -0.1752146 -0.2577663
|
||||
13
Task/Multiple-regression/MATLAB/multiple-regression-2.m
Normal file
13
Task/Multiple-regression/MATLAB/multiple-regression-2.m
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
yt = y'; Xt = X';
|
||||
bt = Xt \ yt
|
||||
bt =
|
||||
0.1457109
|
||||
-0.0777564
|
||||
-0.0712427
|
||||
-0.0166193
|
||||
0.0292955
|
||||
-0.0079111
|
||||
0.2265894
|
||||
-0.0561589
|
||||
-0.1752146
|
||||
-0.2577663
|
||||
6
Task/Multiple-regression/MATLAB/multiple-regression-3.m
Normal file
6
Task/Multiple-regression/MATLAB/multiple-regression-3.m
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
x = [1.47 1.50 1.52 1.55 1.57 1.60 1.63 1.65 1.68 1.70 1.73 1.75 1.78 1.80 1.83]
|
||||
y = [52.21 53.12 54.48 55.84 57.20 58.57 59.93 61.29 63.11 64.47 66.28 68.10 69.92 72.19 74.46]
|
||||
X = [x.^0;x.^1;x.^2];
|
||||
b = y/X
|
||||
|
||||
128.813 -143.162 61.960
|
||||
1
Task/Multiple-regression/MATLAB/multiple-regression-4.m
Normal file
1
Task/Multiple-regression/MATLAB/multiple-regression-4.m
Normal file
|
|
@ -0,0 +1 @@
|
|||
b = y * X' * inv(X * X')
|
||||
1
Task/Multiple-regression/MATLAB/multiple-regression-5.m
Normal file
1
Task/Multiple-regression/MATLAB/multiple-regression-5.m
Normal file
|
|
@ -0,0 +1 @@
|
|||
b = y * pinv(X)
|
||||
Loading…
Add table
Add a link
Reference in a new issue