function [ft,Tout] = gencfeatures(T,y,numFeatures,varargin)
% gencfeatures Automated Feature Engineering for classification
%     TRANSFORMER = gencfeatures(TBL,Y,Q) finds a set of transformations 
%     to generate new engineered features for data in the table TBL and the
%     response Y.
%     TRANSFORMER is a FeatureTransformer object that can be used to explore 
%     the details of the transformations or to transform new data. Q is the 
%     total number of features that TRANSFORMER produces, which can include 
%     original variables from TBL that are included without further 
%     transformation. 
%     Y can be any of the following:
%  
%          1. An array of class labels. Y can be a categorical array, 
%             logical vector, numeric vector, string array, or cell array 
%             of strings.           
%          2. The name of a variable in TBL. This variable is used as the
%             response Y, and the remaining variables in TBL are used to 
%             engineer new features.
%          3. A formula string such as 'y ~ x1 + x2 + x3' specifying that 
%             the variable y is to be used as the response, and the other
%             variables in the formula are used to engineer new features.
%             Any table variables not listed in the formula are not used.
%    
%     When the response variable is taken from the input table TBL, 
%     TRANSFORMER also includes the response variable as the last feature. 
%     The response variable is not counted in Q and is not a required input 
%     variable when TRANSFORMER is used to transform new data. 
%  
%     [TRANSFORMER,FEATURES] = gencfeatures(TBL,Y,Q) also returns the 
%     new transformed features corresponding to the original variables in 
%     TBL.
%  
%     [...] = gencfeatures(...,Name,Value) specifies options using one or 
%     more name-value arguments in addition to any of the input argument 
%     combinations in previous syntaxes. 
%  
%         'TargetLearner'   -  Indicates the intended classifier model for 
%                              which the new features are used. 
%                              Options are 'linear' (default) for a linear 
%                              classifier model, 'bag' for a 
%                              bootstrap aggregation classifier 
%                              model (bagged ensemble), or 'gaussian-svm' 
%                              for an SVM classifier with a Gaussian
%                              kernel.
%         'IncludeInputVariables'  - Determines whether to include input
%                              variables in the output table. Options are:
%                                 'auto' - (default) automatically selects 
%                                    one of the options depending on the 
%                                    TargetLearner.
%                                 'include' - includes all input variables 
%                                     that are valid as machine learning 
%                                     model predictors.
%                                 'select' - applies the same feature 
%                                     selection algorithm that is applied 
%                                     to the newly generated features.
%                                 'omit' - omits the input variables from 
%                                     the output table.
%  
%       Search-method related name-value arguments:
%  
%         'FeatureSelectionMethod' - Options are 'auto' (default), 'lasso',
%                                    'oob', 'nca', and 'mrmr'. Not all feature
%                                    selection methods are recommended for
%                                    each learner. If you specify 'auto', a
%                                    suitable feature selection method is
%                                    selected depending on the TargetLearner.
%         'TransformedDataStandardization' - Sets the standardization
%                                    mechanism for the transformed features.
%                                    Options are 'auto'(default), 'none',
%                                    'zscore', 'mad', or 'range'. If you
%                                    specify 'auto', a suitable
%                                    standardization method is selected
%                                    depending on the TargetLearner.
%         'CategoricalEncodingLimit' - Positive integer indicating the 
%                              maximum number of allowed levels in a 
%                              categorical feature. If an input or a 
%                              generated feature has more levels, it is 
%                              excluded from the output. The default is 50 
%                              when the TargetLearner is 'linear' or 
%                              'gaussian-svm', and Inf when TargetLearner 
%                              is 'bag'.
%                        
%
%   See also genrfeatures,FeatureTransformer, rica, sparsefilt.

%   Copyright 2020-2021 The MathWorks, Inc

    type='classification';
    [ft,Tout] = featlearn.utils.genfeatures(T,y,numFeatures,type,varargin{:});
end