Trigonometry Features

Similar to Polynomial Features, PyCaret also allows creating new trigonometry features from the existing features. It is achieved usingĀ trigonometry_features parameter within setup.


Parameters in setupĀ 

trigonometry_features: bool, default = False
When set to True, new features are created based on all trigonometric combinations that exist within the numeric features in a dataset to the degree defined in the polynomial_degree param.


How to use?


# Importing dataset
from pycaret.datasets import get_data
insurance = get_data('insurance')

# Importing module and initializing setup
from pycaret.regression import *
reg1 = setup(data = insurance, target = 'charges', trigonometry_features = True)


Try this next


Was this page helpful?

Send feedback