(self,
                  instruction,
                  test_size=0.2,
                  text=[],
                  random_state=49,
                  kernel='linear',
                  preprocess=True,
                  drop=None,
                  cross_val_size=0.3,
                  degree=3,
                  gamma='scale',
                  coef0=0.0,
                  max_iter=-1
                  )
Calls the body of the svm query code in the supplementaries.py file. Used to create a classification support vector machine.
        :param dataset: The dataset being used in the classification support vector machine (str).
        :param text: A list of columns to perform text embedding on.
        :param random_state: Initialize a pseudo-random number generator (int).
        :param test_size: Size of the testing set (float).
        :param kernel: The type of kernel to be used (str).
        :param preprocess: Preprocess the data (bool).
        :param drop: A list of the dataset's columns to drop.
        :param cross_val_size: Cross-Validation score (float).
        :param degree: Degree of the polynomial kernel function (int).
        :param gamma: Kernel coefficient (int).
        :param coef0: Significant term in 'poly' and 'sigmoid' kernel functions (float).
        :param max_iter: Maximum number of iterations the function will run (int).


        :return: a model and information to go along with it stored in the self.models dictionary.
Calls the body of the svm query code in the supplementaries.py file. Used to create a classification support vector machine.
        :param dataset: The dataset being used in the classification support vector machine (str).
        :param text: A list of columns to perform text embedding on.
        :param random_state: Initialize a pseudo-random number generator (int).
        :param test_size: Size of the testing set (float).
        :param kernel: The type of kernel to be used (str).
        :param preprocess: Preprocess the data (bool).
        :param drop: A list of the dataset's columns to drop.
        :param cross_val_size: Cross-Validation score (float).
        :param degree: Degree of the polynomial kernel function (int).
        :param gamma: Kernel coefficient (int).
        :param coef0: Significant term in 'poly' and 'sigmoid' kernel functions (float).
        :param max_iter: Maximum number of iterations the function will run (int).
Calls the body of the svm query code in the supplementaries . py file . Used to create a classification support vector machine . : param dataset : The dataset being used in the classification support vector machine ( str ) . : param text : A list of columns to perform text embedding on . : param random_state : Initialize a pseudo - random number generator ( int ) . : param test_size : Size of the testing set ( float ) . : param kernel : The type of kernel to be used ( str ) . : param preprocess : Preprocess the data ( bool ) . : param drop : A list of the dataset s columns to drop . : param cross_val_size : Cross - Validation score ( float ) . : param degree : Degree of the polynomial kernel function ( int ) . : param gamma : Kernel coefficient ( int ) . : param coef0 : Significant term in poly and sigmoid kernel functions ( float ) . : param max_iter : Maximum number of iterations the function will run ( int ) .
def svm_query(self,
                  instruction,
                  test_size=0.2,
                  text=[],
                  random_state=49,
                  kernel='linear',
                  preprocess=True,
                  drop=None,
                  cross_val_size=0.3,
                  degree=3,
                  gamma='scale',
                  coef0=0.0,
                  max_iter=-1
                  ):
        '''
        Calls the body of the svm query code in the supplementaries.py file. Used to create a classification support vector machine.
        :param dataset: The dataset being used in the classification support vector machine (str).
        :param text: A list of columns to perform text embedding on.
        :param random_state: Initialize a pseudo-random number generator (int).
        :param test_size: Size of the testing set (float).
        :param kernel: The type of kernel to be used (str).
        :param preprocess: Preprocess the data (bool).
        :param drop: A list of the dataset's columns to drop.
        :param cross_val_size: Cross-Validation score (float).
        :param degree: Degree of the polynomial kernel function (int).
        :param gamma: Kernel coefficient (int).
        :param coef0: Significant term in 'poly' and 'sigmoid' kernel functions (float).
        :param max_iter: Maximum number of iterations the function will run (int).


        :return: a model and information to go along with it stored in the self.models dictionary.
        '''

        self.models['svm'] = train_svm(instruction,
                                       dataset=self.dataset,
                                       text=text,
                                       random_state=random_state,
                                       test_size=test_size,
                                       kernel=kernel,
                                       preprocess=preprocess,
                                       drop=drop,
                                       cross_val_size=cross_val_size,
                                       degree=degree,
                                       gamma=gamma,
                                       coef0=coef0,
                                       max_iter=max_iter
                                       )

        self.latest_model = 'svm'
        clearLog()
def svm_query ( self , instruction , test_size = 0.2 , text = [ ] , random_state = 49 , kernel = 'linear' , preprocess = True , drop = None , cross_val_size = 0.3 , degree = 3 , gamma = 'scale' , coef0 = 0.0 , max_iter = - 1 ) : self . models [ 'svm' ] = train_svm ( instruction , dataset = self . dataset , text = text , random_state = random_state , test_size = test_size , kernel = kernel , preprocess = preprocess , drop = drop , cross_val_size = cross_val_size , degree = degree , gamma = gamma , coef0 = coef0 , max_iter = max_iter ) self . latest_model = 'svm' clearLog ( )