Exponential or power functions are mathematical transformations that follow , where lambda can be any exponent. The square and cube root transformations are special cases of power transformations where lambda is 1/2 or 1/3, respectively. In practice, we try different lambdas to determine which one offers the best transformation. In this recipe, we will carry out power transformations using NumPy, scikit-learn, and Feature-engine.
Using power transformations on numerical variables
How to do it...
Let's begin by importing the libraries and getting the dataset ready:
- Import the required Python libraries and classes:
import numpy as np
import pandas as pd
from sklearn.datasets import load_boston
from sklearn.preprocessing...