bayeso.trees.trees_generic_trees

It defines generic trees.

bayeso.trees.trees_generic_trees.get_generic_trees(X: numpy.ndarray, Y: numpy.ndarray, num_trees: int, depth_max: int, size_min_leaf: int, ratio_sampling: float, replace_samples: bool, num_features: int, split_random_location: bool) → list

It returns a list of generic trees.

Parameters:
  • X (np.ndarray) – inputs. Shape: (N, d).
  • Y (str.) – outputs. Shape: (N, 1).
  • num_trees (int.) – the number of trees.
  • depth_max (int.) – maximum depth of tree.
  • size_min_leaf (int.) – minimum size of leaf.
  • ratio_sampling (float) – ratio of dataset subsampling.
  • replace_samples (bool.) – flag for replacement.
  • num_features (int.) – the number of split features.
  • split_random_location (bool.) – flag for random split location.
Returns:

list of trees

Return type:

list

Raises:

AssertionError