Last active
June 29, 2020 04:37
-
-
Save pycaret/ab3838d63c2c6482a43ceecef38a718f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import dataset from pycaret repository | |
from pycaret.datasets import get_data | |
insurance = get_data('insurance') | |
# Initialize environment | |
from pycaret.regression import * | |
r1 = setup(insurance, target = 'charges', session_id = 123, | |
normalize = True, | |
polynomial_features = True, trigonometry_features = True, | |
feature_interaction=True, | |
bin_numeric_features= ['age', 'bmi']) | |
# Train a linear regression model | |
lr = create_model('lr') | |
# save transformation pipeline and model | |
save_model(lr, model_name = 'c:/username/pycaret-deployment-azure/deployment_28042020') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment