Professional Documents
Culture Documents
Experiment:
!pip install pycaret &> /dev/null #for installation
print ("Pycaret installed sucessfully!!")
Output:
from pycaret.utils import version #getting the version
version()
Output:
2.3.10
1. Regression: Basics
from pycaret.datasets import get_data #loading datasets
# No output
# Internet connection is required
dataSets = get_data('index')
Output:
University Institute of Engineering
Department of Computer Science & Engineering
bostonDataSet = get_data("boston")
Output:
# import pandas as pd
# bostonDataSet = pd.read_csv("myFile.csv")
cm = compare_models()
Output:
University Institute of Engineering
Department of Computer Science & Engineering
1.6 Three line of code for model comparison for "Insurance" dataset
from pycaret.datasets import get_data # performing tasks on different dataset
from pycaret.regression import *
insuranceDataSet = get_data("insurance")
s = setup(data = insuranceDataSet, target='charges', silent=True)
cm = compare_models()
Output:
University Institute of Engineering
Department of Computer Science & Engineering
1.7 Three line of code for model comparison for "House" dataset
from pycaret.datasets import get_data # performing tasks on different dataset
from pycaret.regression import *
houseDataSet = get_data("house")
s = setup(data = houseDataSet, target='SalePrice', silent=True)
cm = compare_models()
Output:
University Institute of Engineering
Department of Computer Science & Engineering
1.
2.
3.
4.
5.