Polynomial feature mapping
This commit is contained in:
parent
1cc58802eb
commit
717ea8c788
1 changed files with 5 additions and 7 deletions
|
@ -14,11 +14,9 @@ X_poly = zeros(numel(X), p);
|
||||||
% column of X contains the values of X to the p-th power.
|
% column of X contains the values of X to the p-th power.
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
|
for i = 1 : p
|
||||||
|
X_poly(:,i) = X .^ i;
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% =========================================================================
|
% =========================================================================
|
||||||
|
|
||||||
|
|
Reference in a new issue