def add(self, x, y, check_input=False):
        """Add new data x, y to the binning sketch.

        Parameters
        ----------
        x : array-like, shape = (n_samples,)
            Training vector, where n_samples is the number of samples.

        y : array-like, shape = (n_samples,)
            Target vector relative to x.

        check_input : bool (default=False)
            Whether to check input arrays.
        """
        if self._bsketch is None:
            if self.dtype == "numerical":
                self._bsketch = BSketch(self.sketch, self.eps, self.K,
                                        self.special_codes)
            else:
                self._bsketch = BCatSketch(self.cat_cutoff, self.special_codes)

        # Add new data stream
        time_add = time.perf_counter()

        self._bsketch.add(x, y, check_input)
        self._n_add += 1

        self._time_streaming_add += time.perf_counter() - time_add

        if self.verbose:
            logger.info("Sketch: added new data.")
Add new data x, y to the binning sketch.

        Parameters
        ----------
        x : array-like, shape = (n_samples,)
            Training vector, where n_samples is the number of samples.

        y : array-like, shape = (n_samples,)
            Target vector relative to x.

        check_input : bool (default=False)
            Whether to check input arrays.
        
optbinning/binning/distributed/binning_sketch.py