See :ref:`Base Estimator for Naive _naive_base_predict`
495748
def predict(self, dataframe):
        """"""
        if self.mean > 0.5:
            return numpy.ones(dataframe.shape[0])
        else:
            return numpy.zeros(dataframe.shape[0])
221415
def predict(self, predict_set ):
        
        predict_data           = np.array( [instance.features for instance in predict_set ] )
        
        return self.update( predict_data )
1129203
@Override
    public int predict(T x) {
        List<Neighbor<T,T>> neighbors = new ArrayList<>();
        nns.range(x, radius, neighbors);
        
        if (neighbors.size() < minPts) {
            return OUTLIER;
        }
        
        int[] label = new int[k + 1];
        for (Neighbor<T,T> neighbor : neighbors) {
            int yi = y[neighbor.index];
            if (yi == OUTLIER) yi = k;
            label[yi]++;
        }
        
        int c = Math.whichMax(label);
        if (c == k) c = OUTLIER;
        return c;
    }
1082413
def predict(self,param_dict):
        
        encoder_dict = self._designmatrix_object.encoder
        X, col_names = self._designmatrix_object.run_encoder(param_dict, encoder_dict)
        # compute predictions
        Y_pred = self._compute_prediction(X)
        return Y_pred
908930
def node_predictions(self):
        
        pred = np.zeros(self.data_size)
        for node in self:
            if node.is_terminal:
                pred[node.indices] = node.node_id
        return pred
212165
def _fit_regression(self, y):
        

        if self.regressor is None:
            self.coefs_ = safe_sparse_dot(pinv2(self.hidden_activations_), y)
        else:
            self.regressor.fit(self.hidden_activations_, y)

        self.fitted_ = True
912106
def predict(self, test_data, **kwargs):
        
        if test_data.shape[1]!=self.data.shape[1]:
            raise Exception("Test data has different number of columns than training data.")
        for i in xrange(0,test_data.shape[1]):
            test_data.loc[:,i] = test_data.icol(i) - self.column_means[i]
            if int(self.column_stdevs[i])!=0:
                test_data.loc[:,i] = test_data.icol(i) / self.column_stdevs[i]
        return test_data
286887
def infer_x(self, y, sigma=None, k=None, **kwargs):
        
        assert len(y) == self.fmodel.dim_y, "Wrong dimension for y. Expected %i, got %i" % (self.fmodel.dim_y, len(y))
        k = k or self.k
        sigma = sigma or self.sigma
        x_guess = self._guess_x(y, k = k)[0]
        dists, index = self.fmodel.dataset.nn_x(x_guess, k = k)
        w = self._weights(index, dists, sigma*sigma,  y)
        return [np.sum([wi*self.fmodel.dataset.get_x(idx)
                for wi, idx in zip(w, index)], axis = 0)]
473135
def classifierPredict(testVector, storedVectors):
  
  numClasses = storedVectors.shape[0]
  output = np.zeros((numClasses,))

  for i in range(numClasses):
    output[i] = np.sum(np.minimum(testVector, storedVectors[i, :]))
  return output
175567
def predict_proba(self, dataframe):
        
        ret = numpy.ones((dataframe.shape[0], 2))
        ret[:, 0] = (1 - self.mean)
        ret[:, 1] = self.mean
        return ret
804654
def predict(self, Xnew, kern=None, pred_init=None, Y_metadata=None,
                median=False, deg_gauss_hermite=20, likelihood=None):
        
        #mu, var = GP._raw_predict(self, Xnew)
        # now push through likelihood
        #mean, var = self.likelihood.predictive_values(mu, var)
        
        mean, var = super(WarpedGP, self).predict(Xnew, kern=kern, full_cov=False, likelihood=likelihood)


        if self.predict_in_warped_space:
            std = np.sqrt(var)
            if median:
                wmean = self.warping_function.f_inv(mean, y=pred_init)
            else:
                wmean = self._get_warped_mean(mean, std, pred_init=pred_init,
                                              deg_gauss_hermite=deg_gauss_hermite).T
            wvar = self._get_warped_variance(mean, std, pred_init=pred_init,
                                             deg_gauss_hermite=deg_gauss_hermite).T
        else:
            wmean = mean
            wvar = var
        return wmean, wvar
898689
def return_estimator(self):
        
        extraction_code = self.source
        estimator = functions.import_object_from_string_code(extraction_code, "base_learner")

        return estimator
869857
def _get_predictions(self):
        
        if self.regressor is None:
            preds = safe_sparse_dot(self.hidden_activations_, self.coefs_)
        else:
            preds = self.regressor.predict(self.hidden_activations_)

        return preds
770637
def get_predicted_class(self, x, **kwargs):
    
    return tf.argmax(self.get_logits(x, **kwargs), axis=1)
1342023
def explain_prediction_sklearn(estimator, doc,
                               vec=None,
                               top=None,
                               top_targets=None,
                               target_names=None,
                               targets=None,
                               feature_names=None,
                               feature_re=None,
                               feature_filter=None,
                               vectorized=False):
    
    return explain_prediction_sklearn_not_supported(estimator, doc)
683144
def _parallel_predict_proba(estimators, estimators_features, X, n_classes, combination, estimators_weight):
    """"""
    n_samples = X.shape[0]
    proba = np.zeros((n_samples, n_classes))

    for estimator, features, weight in zip(estimators, estimators_features, estimators_weight):
        proba_estimator = estimator.predict_proba(X[:, features])
        if combination in ['weighted_voting', 'weighted_bmr']:
            proba += proba_estimator * weight
        else:
            proba += proba_estimator

    return proba
128305
def predict(self, X):
        
        check_is_fitted(self, 'estimators_')

        X = check_array(X, dtype=DTYPE, order="C")
        score = self._decision_function(X)
        if score.shape[1] == 1:
            score = score.ravel()

        return score