def _parallel_predict_proba(estimators, estimators_features, X, n_classes):
 n_samples = X.shape[0]
 proba = np.zeros((n_samples, n_classes))
 for (estimator, features) in zip(estimators, estimators_features):
  if hasattr(estimator, 'predict_proba'):
   proba_estimator = estimator.predict_proba(X[:, features])
   if (n_classes == len(estimator.classes_)):
    proba += proba_estimator
   else:
    proba[:, estimator.classes_] += proba_estimator[:, range(len(estimator.classes_))]
  else:
   predictions = estimator.predict(X[:, features])
   for i in range(n_samples):
    proba[(i, predictions[i])] += 1
 return proba

def _parallel_predict_proba ( estimators , estimators_features , X , n_classes ) : n_samples = X . shape [ 0 ] proba = np . zeros ( ( n_samples , n_classes ) ) for ( estimator , features ) in zip ( estimators , estimators_features ) : if hasattr ( estimator , 'predict_proba' ) : proba_estimator = estimator . predict_proba ( X [ : , features ] ) if ( n_classes == len ( estimator . classes_ ) ) : proba += proba_estimator else : proba [ : , estimator . classes_ ] += proba_estimator [ : , range ( len ( estimator . classes_ ) ) ] else : predictions = estimator . predict ( X [ : , features ] ) for i in range ( n_samples ) : proba [ ( i , predictions [ i ] ) ] += 1 return proba
private function used to compute predictions within a job .