function mdl = fitctree(X,Y,varargin)
%FITCTREE Fit a classification decision tree using gpuArray inputs
%   MDL = FITCTREE(TBL,RESPONSEVARNAME)
%   MDL = FITCTREE(TBL,FORMULA)
%   MDL = FITCTREE(TBL,Y)
%   MDL = FITCTREE(X,Y)
%   MDL = FITCTREE(___,'PARAM1',val1,'PARAM2',val2,...)
%
%   Limitations:
%   1) For data with categorical predictors, only "OVAByClass" is supported
%      for multiclass.
%   2) For data with categorical predictors, "NumVariablesToSample" must be
%      "all".
%   3) Surrogate splits are not supported.
%   4) You can specify the name-value argument 'PredictorSelection' only as
%      'allsplits'.
%
%   See also FITCTREE, GPUARRAY.

%   Copyright 2022 The MathWorks, Inc.

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

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