This function initializes the training environment and creates the transformation pipeline . Setup function must be called before executing any other function. It takes two mandatory parameters: data and target . All the other parameters are optional.