function mdl = fitcsvm(X,Y,varargin)
%FITCSVM Fit a classification Support Vector Machine (SVM)
%   MDL = FITCSVM(TBL,RESPONSEVARNAME)
%   MDL = FITCSVM(TBL,FORMULA)
%   MDL = FITCSVM(TBL,Y)
%   MDL = FITCSVM(X,Y)
%   MDL = FITCSVM(___,'PARAM1',val1,'PARAM2',val2,...)
%
%   Limitations:
%   1) One-Class classification is not supported. The class labels must
%      contain two different classes.
%   2) Predictor data must not contain infinite values.
%   3) The 'KernelFunction' name-value argument must not be a custom kernel
%      function.
%   4) You can specify the name-value argument 'Solver' only as 'SMO'.
%   5) You cannot specify the name-value argument 'OutlierFraction'.
%   6) You cannot specify the name-value argument 'ShrinkagePeriod'.
%
%   See also gpuArray, fitcsvm, ClassificationSVM

%   Copyright 2017-2022 The MathWorks, Inc.

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

mdl = parallel.internal.array.callToolboxFunction("stats/classreg/fitcsvm", X, Y, varargin{:});
end