def transform(self, X):
        """Transform X according to the fitted transformer.

        Parameters
        ----------
        X : array-like, shape = [n_samples, n_features]
            Input vectors, where n_samples is the number of samples
            and n_features is the number of features.

        Returns
        -------
        X_new : array-like, shape = [n_samples, n_components]
            Transformed array.

        """
        if not hasattr(self, '_best_programs'):
            raise NotFittedError('SymbolicTransformer not fitted.')

        X = check_array(X)
        _, n_features = X.shape
        if self.n_features_ != n_features:
            raise ValueError('Number of features of the model must match the '
                             'input. Model n_features is %s and input '
                             'n_features is %s.'
                             % (self.n_features_, n_features))

        X_new = np.array([gp.execute(X) for gp in self._best_programs]).T

        return X_new
def transform ( self , X ) : if not hasattr ( self , '_best_programs' ) : raise NotFittedError ( 'SymbolicTransformer not fitted.' ) X = check_array ( X ) _ , n_features = X . shape if self . n_features_ != n_features : raise ValueError ( 'Number of features of the model must match the ' 'input. Model n_features is %s and input ' 'n_features is %s.' % ( self . n_features_ , n_features ) ) X_new = np . array ( [ gp . execute ( X ) for gp in self . _best_programs ] ) . T return X_new
Transform X according to the fitted transformer.

        Parameters
        ----------
        X : array-like, shape = [n_samples, n_features]
            Input vectors, where n_samples is the number of samples
            and n_features is the number of features.

        Returns
        -------
        X_new : array-like, shape = [n_samples, n_components]
            Transformed array.