parameters: (self)
return_statement: return math_ops.reduce_mean(array_ops.stack(impurities))
docstring: Constructs a TF graph for evaluating the leaf impurity of a forest.
  
      Returns:
        The last op in the graph.
docstring_summary: Constructs a TF graph for evaluating the leaf impurity of a forest.
docstring_tokens: Constructs a TF graph for evaluating the leaf impurity of a forest .
function: def average_impurity(self):
      """Constructs a TF graph for evaluating the leaf impurity of a forest.
  
      Returns:
        The last op in the graph.
      """
      impurities = []
      for i in range(self.params.num_trees):
        with ops.device(self.variables.device_dummies[i].device):
          impurities.append(self.trees[i].average_impurity())
      return math_ops.reduce_mean(array_ops.stack(impurities))
function_tokens: def average_impurity ( self ) : impurities = [ ] for i in range ( self . params . num_trees ) : with ops . device ( self . variables . device_dummies [ i ] . device ) : impurities . append ( self . trees [ i ] . average_impurity ( ) ) return math_ops . reduce_mean ( array_ops . stack ( impurities ) )