nodes: 0, module; 1, function_definition; 2, function_name:predict_proba; 3, parameters; 4, block; 5, identifier:self; 6, identifier:X; 7, expression_statement; 8, comment:# Check data; 9, comment:# X = check_array(X, accept_sparse=['csr', 'csc', 'coo'])  # Dont in version 0.15; 10, if_statement; 11, comment:# Parallel loop; 12, expression_statement; 13, expression_statement; 14, comment:# Reduce; 15, if_statement; 16, return_statement; 17, comment:"""Predict class probabilities for X.
  
          The predicted class probabilities of an input sample is computed as
          the mean predicted class probabilities of the base estimators in the
          ensemble. If base estimators do not implement a ``predict_proba``
          method, then it resorts to voting and the predicted class probabilities
          of a an input sample represents the proportion of estimators predicting
          each class.
  
          Parameters
          ----------
          X : {array-like, sparse matrix} of shape = [n_samples, n_features]
              The training input samples. Sparse matrices are accepted only if
              they are supported by the base estimator.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes]
              The class probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
          """; 18, comparison_operator:self.n_features_ != X.shape[1]; 19, block; 20, assignment; 21, assignment; 22, comparison_operator:self.combination in ['majority_voting', 'majority_bmr']; 23, block; 24, elif_clause; 25, elif_clause; 26, identifier:proba; 27, attribute; 28, subscript; 29, raise_statement; 30, pattern_list; 31, call; 32, identifier:all_proba; 33, call; 34, attribute; 35, list; 36, expression_statement; 37, comparison_operator:self.combination in ['weighted_voting', 'weighted_bmr']; 38, block; 39, comparison_operator:self.combination in ['stacking', 'stacking_proba', 'stacking_bmr', 'stacking_proba_bmr']; 40, block; 41, identifier:self; 42, identifier:n_features_; 43, attribute; 44, integer:1; 45, call; 46, identifier:n_jobs; 47, identifier:n_estimators; 48, identifier:starts; 49, identifier:_partition_estimators; 50, argument_list; 51, call; 52, generator_expression; 53, identifier:self; 54, identifier:combination; 55, string; 56, string; 57, assignment; 58, attribute; 59, list; 60, expression_statement; 61, attribute; 62, list; 63, expression_statement; 64, expression_statement; 65, identifier:X; 66, identifier:shape; 67, identifier:ValueError; 68, argument_list; 69, attribute; 70, attribute; 71, identifier:Parallel; 72, argument_list; 73, call; 74, for_in_clause; 75, string_content:majority_voting; 76, string_content:majority_bmr; 77, identifier:proba; 78, binary_operator:sum(all_proba) / self.n_estimators; 79, identifier:self; 80, identifier:combination; 81, string; 82, string; 83, assignment; 84, identifier:self; 85, identifier:combination; 86, string; 87, string; 88, string; 89, string; 90, assignment; 91, assignment; 92, call; 93, identifier:self; 94, identifier:n_estimators; 95, identifier:self; 96, identifier:n_jobs; 97, keyword_argument; 98, keyword_argument; 99, call; 100, argument_list; 101, identifier:i; 102, call; 103, call; 104, attribute; 105, string_content:weighted_voting; 106, string_content:weighted_bmr; 107, identifier:proba; 108, call; 109, string_content:stacking; 110, string_content:stacking_proba; 111, string_content:stacking_bmr; 112, string_content:stacking_proba_bmr; 113, identifier:X_stacking; 114, call; 115, identifier:proba; 116, call; 117, attribute; 118, argument_list; 119, identifier:n_jobs; 120, identifier:n_jobs; 121, identifier:verbose; 122, attribute; 123, identifier:delayed; 124, argument_list; 125, subscript; 126, subscript; 127, identifier:X; 128, attribute; 129, attribute; 130, subscript; 131, identifier:range; 132, argument_list; 133, identifier:sum; 134, argument_list; 135, identifier:self; 136, identifier:n_estimators; 137, identifier:sum; 138, argument_list; 139, identifier:_create_stacking_set; 140, argument_list; 141, attribute; 142, argument_list; 143, concatenated_string; 144, identifier:format; 145, attribute; 146, subscript; 147, identifier:self; 148, identifier:verbose; 149, identifier:_parallel_predict_proba; 150, attribute; 151, slice; 152, attribute; 153, slice; 154, identifier:self; 155, identifier:n_classes_; 156, identifier:self; 157, identifier:combination; 158, attribute; 159, slice; 160, identifier:n_jobs; 161, identifier:all_proba; 162, identifier:all_proba; 163, attribute; 164, attribute; 165, attribute; 166, identifier:X; 167, attribute; 168, attribute; 169, identifier:predict_proba; 170, identifier:X_stacking; 171, string:"Number of features of the model must "; 172, string:"match the input. Model n_features is {0} and "; 173, string:"input n_features is {1}."; 174, string:""; 175, identifier:self; 176, identifier:n_features_; 177, attribute; 178, integer:1; 179, identifier:self; 180, identifier:estimators_; 181, subscript; 182, subscript; 183, identifier:self; 184, identifier:estimators_features_; 185, subscript; 186, subscript; 187, identifier:self; 188, identifier:estimators_weight_; 189, subscript; 190, subscript; 191, identifier:self; 192, identifier:estimators_; 193, identifier:self; 194, identifier:estimators_features_; 195, identifier:self; 196, identifier:estimators_weight_; 197, identifier:self; 198, identifier:combination; 199, identifier:self; 200, identifier:f_staking; 201, identifier:X; 202, identifier:shape; 203, identifier:starts; 204, identifier:i; 205, identifier:starts; 206, binary_operator:i + 1; 207, identifier:starts; 208, identifier:i; 209, identifier:starts; 210, binary_operator:i + 1; 211, identifier:starts; 212, identifier:i; 213, identifier:starts; 214, binary_operator:i + 1; 215, identifier:i; 216, integer:1; 217, identifier:i; 218, integer:1; 219, identifier:i; 220, integer:1
code: def predict_proba(self, X):
          """Predict class probabilities for X.
  
          The predicted class probabilities of an input sample is computed as
          the mean predicted class probabilities of the base estimators in the
          ensemble. If base estimators do not implement a ``predict_proba``
          method, then it resorts to voting and the predicted class probabilities
          of a an input sample represents the proportion of estimators predicting
          each class.
  
          Parameters
          ----------
          X : {array-like, sparse matrix} of shape = [n_samples, n_features]
              The training input samples. Sparse matrices are accepted only if
              they are supported by the base estimator.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes]
              The class probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
          """
          # Check data
          # X = check_array(X, accept_sparse=['csr', 'csc', 'coo'])  # Dont in version 0.15
  
          if self.n_features_ != X.shape[1]:
              raise ValueError("Number of features of the model must "
                               "match the input. Model n_features is {0} and "
                               "input n_features is {1}."
                               "".format(self.n_features_, X.shape[1]))
  
          # Parallel loop
          n_jobs, n_estimators, starts = _partition_estimators(self.n_estimators, self.n_jobs)
  
          all_proba = Parallel(n_jobs=n_jobs, verbose=self.verbose)(
              delayed(_parallel_predict_proba)(
                  self.estimators_[starts[i]:starts[i + 1]],
                  self.estimators_features_[starts[i]:starts[i + 1]],
                  X,
                  self.n_classes_,
                  self.combination,
                  self.estimators_weight_[starts[i]:starts[i + 1]])
              for i in range(n_jobs))
  
          # Reduce
          if self.combination in ['majority_voting', 'majority_bmr']:
              proba = sum(all_proba) / self.n_estimators
          elif self.combination in ['weighted_voting', 'weighted_bmr']:
              proba = sum(all_proba)
          elif self.combination in ['stacking', 'stacking_proba', 'stacking_bmr', 'stacking_proba_bmr']:
              X_stacking = _create_stacking_set(self.estimators_, self.estimators_features_,
                                                self.estimators_weight_, X, self.combination)
              proba = self.f_staking.predict_proba(X_stacking)
  
          return proba