INNER CODE UNIT · Python

loss

ankonzoid/LearningX · basic_ML/classification/decision_tree.py:23

            loss = 1.0 - p2
            return loss

        def perform_split(X, y):
            N, d = X.shape
            loss_best = 9E99
            X_left, y_left = [], []
            X_right, y_right = [], []
            threshold_best = None
            j_threshold_best = None
            for j in range(d):
                for i in range(N):

                    # Set threshold
                    threshold = X[i, j]

                    # Split data by threshold
                    X_left_split, y_left_split = [], []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…