Build a Decision Tree from scratch using Python (numpy)

Поділитися
Вставка
  • Опубліковано 8 вер 2024

КОМЕНТАРІ • 1

  • @MeerkatStatistics
    @MeerkatStatistics  9 місяців тому

    In the find_best_split function, the line "if np.any(left_indices) and np.any(right_indices)" is pretty redundant. It will save checking an empty split (= no split) for the last threshold, and might avoid some problems if the metric_func implementation can't handle an empty set.