Divide Dataset Based on Feature Threshold
Tree Models & Ensembles DS practice problem on Onlearn.
Difficulty: medium.
Topics: Understanding Divide Dataset Based on Feature Threshold, Binary Splitting, Thresholding, Boolean Masking, Gini Impurity, Information Gain, Supervised Learning, Data Preprocessing, Decision Theory, Algorithmic Complexity, Information Theory, Recursive Partitioning, Feature Engineering, Boolean Logic Operations, Data Structure Manipulation, Impurity Measures.
Write a Python function to divide a dataset based on whether the value of a specified feature is greater than or equal to a given threshold. The function should return two subsets of the dataset: one with samples that meet the condition and another with samples that do not.