I am fairly new to machine learning. I came across the concept of Data Leakage. The article says that always split the data before performing preprocessing steps.
My question is, do steps such as discretization, grouping categories to a single category to reduce cardinality, converting categorical variables to binary variables, etc. lead to Data Leakage?
Should I split the data to train and test set before applying these steps?
Also, which are the main preprocessing steps I really need to be cautious of in order to avoid data leakage?