Reclezon
11/15/2022, 1:16 AMReclezon
11/15/2022, 1:17 AMhecko
11/15/2022, 1:27 AMhecko
11/15/2022, 1:28 AMReclezon
11/15/2022, 1:34 AMMapleNeko
11/15/2022, 2:51 AMMapleNeko
11/15/2022, 2:51 AMMapleNeko
11/15/2022, 2:51 AMMapleNeko
11/15/2022, 2:52 AMMapleNeko
11/15/2022, 2:53 AMWeegeeFan1
11/16/2022, 1:24 AMWeegeeFan1
11/16/2022, 1:25 AMWeegeeFan1
11/16/2022, 1:25 AMWeegeeFan1
11/16/2022, 1:25 AMWeegeeFan1
11/16/2022, 1:26 AMWeegeeFan1
11/16/2022, 1:26 AMWeegeeFan1
11/16/2022, 2:16 AMbluesky
11/16/2022, 6:44 AM{K EY1} (Kei)
11/16/2022, 1:05 PMRadak
11/16/2022, 6:03 PMhecko
11/16/2022, 7:25 PMliltosh
11/17/2022, 12:36 AMHaianh266
11/17/2022, 8:42 AMQuboMatic2K6
11/17/2022, 8:49 AMKnightKat
11/17/2022, 8:32 PMhecko
11/17/2022, 9:13 PMhecko
11/17/2022, 9:14 PMdualbooting
)Cipher
11/17/2022, 9:48 PMpy
def w1_tree_split_data_left(X, Y, feature_index, split_value):
"""Split the data `X` and `Y`, at the feature indexed by `feature_index`.
If the value is less than `split_value` then return it as part of the left group.
# Arguments
X: np.array of size `(n_objects, n_in)`
Y: np.array of size `(n_objects, 1)`
feature_index: index of the feature to split at
split_value: value to split between
# Output
(XY_left): np.array of size `(n_objects_left, n_in + 1)`
"""
X_left, Y_left = None, None
XY_left = []
for row in X, Y:
if row[feature_index] < split_value:
XY_left = X.append(Y)
return XY_left
Cipher
11/17/2022, 9:48 PMhecko
11/17/2022, 10:15 PM.append()
edits the actual array itself and returns nothing
i'm not sure about the syntax for numpy arrays but with python lists i'd do X + Y
or [*X, *Y]
though it's weird that you're setting it to the entirety of X
and Y
every time