(
            self,
            instruction=None,
            text=[],
            random_state=49,
            test_size=0.2,
            preprocess=True,
            drop=None,
            min_neighbors=3,
            max_neighbors=10,
            leaf_size=30,
            p=2,
            algorithm='auto'
    )
Calls the body of the nearest neighbor code in the supplementaries.py file. Used to create a nearest neighbor algorithm.
        :param instruction: The objective that you want to model (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 dataset: The dataset being used in the nearest neighbor algorithm (str).
        :param preprocess: Preprocess the data (bool).
        :param drop: A list of the dataset's columns to drop.
        :param min_neighbors: Minimum number of neighbors (int).
        :param max_neighbors: Maximum number of neighbors (int).
        :param leaf_size: Leaf size passed to BallTree or KDTree (int).
        :param p: Power parameter for the Minkowski metric (int).
        :param algorithm: Algorithm used to compute the nearest neighbors (str).


        :return: a model and information to along with it stored in the self.models dictionary.
Calls the body of the nearest neighbor code in the supplementaries.py file. Used to create a nearest neighbor algorithm.
        :param instruction: The objective that you want to model (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 dataset: The dataset being used in the nearest neighbor algorithm (str).
        :param preprocess: Preprocess the data (bool).
        :param drop: A list of the dataset's columns to drop.
        :param min_neighbors: Minimum number of neighbors (int).
        :param max_neighbors: Maximum number of neighbors (int).
        :param leaf_size: Leaf size passed to BallTree or KDTree (int).
        :param p: Power parameter for the Minkowski metric (int).
        :param algorithm: Algorithm used to compute the nearest neighbors (str).
Calls the body of the nearest neighbor code in the supplementaries . py file . Used to create a nearest neighbor algorithm . : param instruction : The objective that you want to model ( 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 dataset : The dataset being used in the nearest neighbor algorithm ( str ) . : param preprocess : Preprocess the data ( bool ) . : param drop : A list of the dataset s columns to drop . : param min_neighbors : Minimum number of neighbors ( int ) . : param max_neighbors : Maximum number of neighbors ( int ) . : param leaf_size : Leaf size passed to BallTree or KDTree ( int ) . : param p : Power parameter for the Minkowski metric ( int ) . : param algorithm : Algorithm used to compute the nearest neighbors ( str ) .
def nearest_neighbor_query(
            self,
            instruction=None,
            text=[],
            random_state=49,
            test_size=0.2,
            preprocess=True,
            drop=None,
            min_neighbors=3,
            max_neighbors=10,
            leaf_size=30,
            p=2,
            algorithm='auto'
    ):
        '''
        Calls the body of the nearest neighbor code in the supplementaries.py file. Used to create a nearest neighbor algorithm.
        :param instruction: The objective that you want to model (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 dataset: The dataset being used in the nearest neighbor algorithm (str).
        :param preprocess: Preprocess the data (bool).
        :param drop: A list of the dataset's columns to drop.
        :param min_neighbors: Minimum number of neighbors (int).
        :param max_neighbors: Maximum number of neighbors (int).
        :param leaf_size: Leaf size passed to BallTree or KDTree (int).
        :param p: Power parameter for the Minkowski metric (int).
        :param algorithm: Algorithm used to compute the nearest neighbors (str).


        :return: a model and information to along with it stored in the self.models dictionary.
        '''
        self.models['nearest_neighbor'] = nearest_neighbors(
            instruction=instruction,
            text=text,
            random_state=random_state,
            test_size=test_size,
            dataset=self.dataset,
            preprocess=preprocess,
            drop=drop,
            min_neighbors=min_neighbors,
            max_neighbors=max_neighbors,
            leaf_size=leaf_size,
            p=p,
            algorithm=algorithm
        )

        self.latest_model = 'nearest_neighbor'
        clearLog()
def nearest_neighbor_query ( self , instruction = None , text = [ ] , random_state = 49 , test_size = 0.2 , preprocess = True , drop = None , min_neighbors = 3 , max_neighbors = 10 , leaf_size = 30 , p = 2 , algorithm = 'auto' ) : self . models [ 'nearest_neighbor' ] = nearest_neighbors ( instruction = instruction , text = text , random_state = random_state , test_size = test_size , dataset = self . dataset , preprocess = preprocess , drop = drop , min_neighbors = min_neighbors , max_neighbors = max_neighbors , leaf_size = leaf_size , p = p , algorithm = algorithm ) self . latest_model = 'nearest_neighbor' clearLog ( )