def fill(self):
    'Intelligently sets any non-specific parameters.'
    _ = getattr(self, 'num_classes')
    _ = getattr(self, 'num_features')
    self.bagged_num_features = int((self.feature_bagging_fraction * self.num_features))
    self.bagged_features = None
    if (self.feature_bagging_fraction < 1.0):
        self.bagged_features = [random.sample(range(self.num_features), self.bagged_num_features) for _ in range(self.num_trees)]
    self.regression = getattr(self, 'regression', False)
    self.num_outputs = (self.num_classes if self.regression else 1)
    self.num_output_columns = (self.num_classes + 1)
    self.max_depth = (self.max_depth or int((2 * math.ceil(math.log(self.max_nodes, 2)))))
    self.num_splits_to_consider = (self.num_splits_to_consider or max(10, int(math.ceil(math.sqrt(self.num_features)))))
    num_fertile = int(math.ceil((self.max_nodes / self.num_splits_to_consider)))
    num_fertile = max(num_fertile, 1000)
    self.max_fertile_nodes = (self.max_fertile_nodes or num_fertile)
    self.max_fertile_nodes = min(self.max_fertile_nodes, int(math.ceil((self.max_nodes / 2.0))))
    num_split_initializiations_per_input = max(1, int(math.floor((self.num_splits_to_consider / self.split_after_samples))))
    self.split_initializations_per_input = getattr(self, 'split_initializations_per_input', num_split_initializiations_per_input)
    self.base_random_seed = getattr(self, 'base_random_seed', 0)
    return self
Intelligently sets any non-specific parameters.
def fill(self):
    
    _ = getattr(self, 'num_classes')
    _ = getattr(self, 'num_features')
    self.bagged_num_features = int((self.feature_bagging_fraction * self.num_features))
    self.bagged_features = None
    if (self.feature_bagging_fraction < 1.0):
        self.bagged_features = [random.sample(range(self.num_features), self.bagged_num_features) for _ in range(self.num_trees)]
    self.regression = getattr(self, 'regression', False)
    self.num_outputs = (self.num_classes if self.regression else 1)
    self.num_output_columns = (self.num_classes + 1)
    self.max_depth = (self.max_depth or int((2 * math.ceil(math.log(self.max_nodes, 2)))))
    self.num_splits_to_consider = (self.num_splits_to_consider or max(10, int(math.ceil(math.sqrt(self.num_features)))))
    num_fertile = int(math.ceil((self.max_nodes / self.num_splits_to_consider)))
    num_fertile = max(num_fertile, 1000)
    self.max_fertile_nodes = (self.max_fertile_nodes or num_fertile)
    self.max_fertile_nodes = min(self.max_fertile_nodes, int(math.ceil((self.max_nodes / 2.0))))
    num_split_initializiations_per_input = max(1, int(math.floor((self.num_splits_to_consider / self.split_after_samples))))
    self.split_initializations_per_input = getattr(self, 'split_initializations_per_input', num_split_initializiations_per_input)
    self.base_random_seed = getattr(self, 'base_random_seed', 0)
    return self