function mdl = fitrensemble(X,Y,varargin)
%FITRENSEMBLE Fit a regression decision tree using gpuArray inputs
%   MDL = FITRENSEMBLE(TBL,RESPONSEVARNAME)
%   MDL = FITRENSEMBLE(TBL,FORMULA)
%   MDL = FITRENSEMBLE(TBL,Y)
%   MDL = FITRENSEMBLE(X,Y)
%   MDL = FITRENSEMBLE(___,'PARAM1',val1,'PARAM2',val2,...)
%
%   Limitations:
%   1) For data with categorical predictors, "NumVariablesToSample" must be
%      "all".
%   2) If you use templateTree to create a learner template object, the
%      name-value arguments Surrogate and PredictorSelection must be "off"
%      and "allsplits", respectively.
%   3) Bootstrap aggregation is not supported. You can specify the
%      name-value argument Method only as "LSBoost".
%
%   See also FITRENSEMBLE, GPUARRAY.

%   Copyright 2021-2022 The MathWorks, Inc.

% Validate the inputs.
narginchk(2,inf);
[X,Y,varargin{:}] = validateInputsForRegressionFitFunction(X,Y,varargin);

% Call underlying toolbox function.
mdl = parallel.internal.array.callToolboxFunction("stats/classreg/fitrensemble", X, Y, varargin{:});
end