X = [
1,0,3,0,0,0,0,0,1,0,0; % 7111
1,1,0,0,0,0,0,0,0,2,1; % 8809
1,0,1,2,0,0,0,0,1,0,0; % 2172
1,0,0,0,0,0,0,4,0,0,0; % 6666
1,0,4,0,0,0,0,0,0,0,0; % 1111
1,0,0,4,0,0,0,0,0,0,0; % 2222
1,0,0,1,0,0,0,2,1,0,0; % 7662
1,0,1,0,2,0,0,0,0,0,1; % 9313
1,4,0,0,0,0,0,0,0,0,0; % 0000
1,0,0,0,0,0,4,0,0,0,0; % 5555
1,0,1,0,1,0,0,0,0,1,1; % 8193
1,1,0,0,0,0,0,1,0,1,1; % 8096
1,0,0,0,1,1,0,0,0,1,1; % 4398
1,0,0,0,0,1,1,0,1,0,1; % 9475
1,1,0,0,1,0,0,0,0,1,1; % 9038
1,0,1,0,1,1,0,0,0,1,0; % 3148
];
y = [
0;
6;
0;
4;
0;
0;
2;
1;
4;
0;
3;
5;
3;
1;
4;
2;
];
theta = pinv (X' * X) * X' * y;
x = [
1,0,0,1,0,0,0,0,0,2,1; % 2889
1,0,0,1,0,1,0,1,1,0,0; % 2467
1,1,0,0,0,0,0,0,3,0,0; % 7770
];
x * theta