def solve(self):
        """Solve optimal binning for all variables using added data.

        Returns
        -------
        self : BinningProcessSketch
            Current fitted binning process.
        """
        time_init = time.perf_counter()

        # Check if data was added
        if not self._n_add:
            raise NotDataAddedError(
                "No data was added. Add data before solving.")

        for i, name in enumerate(self.variable_names):
            if self.verbose:
                logger.info("Binning variable ({} / {}): {}."
                            .format(i, self._n_variables, name))
            self._binned_variables[name].solve()

        if self.verbose:
            logger.info("Binning process variable selection...")

        # Compute binning statistics and decide whether a variable is selected
        self._binning_selection_criteria()

        self._time_streaming_solve += time.perf_counter() - time_init
        self._n_solve += 1

        # Completed successfully
        self._is_solved = True

        return self
Solve optimal binning for all variables using added data.

        Returns
        -------
        self : BinningProcessSketch
            Current fitted binning process.
        
optbinning/binning/distributed/binning_process_sketch.py