0% found this document useful (0 votes)
22 views7 pages

University Institute of Engineering Department of Computer Science & Engineering

Chandigarh University

Uploaded by

Kumar Ankit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views7 pages

University Institute of Engineering Department of Computer Science & Engineering

Chandigarh University

Uploaded by

Kumar Ankit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

University Institute of Engineering

Department of Computer Science & Engineering

Experiment: : Develop a prediction model based on linear/logistic regression.

Student Name: Ankit Kumar UID: 21BCS5999


Branch: Computer Science & Engineering Semester:-1
Date of Performance: 4-07-23
Subject Name: Disruptive Technologies-1
SubjectCode:21ECP-102B

1. Aim of the practical:1(a)


To develop a prediction model based on linear/logistic regression

2. Tool Used: Google Colab

3. Basic Concept/ Command Description: : Logistic regression is a technique for modelling


the probability of an event. Just like linear regression, it helps you understand the relationship
between one or more variables and a target variable, except that, in this case, our target
variable is binary: its value is either 0 or 1

4. Code:
University Institute of Engineering
Department of Computer Science & Engineering

4.1 (a) Install Pycaret


!pip install --pre pycaret print ("Pycaret

installed sucessfully!!") 4.1 (b) Get the

version of the pycaret


from pycaret.utils import version
version()

4.2 Loading Dataset - Loading dataset from pycaret


from pycaret.datasets import get_data

4.3 Get the list of datasets available in pycaret


dataSets = get_data('index')

4.4 Get boston dataset


bostonDataSet = get_data("boston")

4.5 Parameter setting for all regression models


from pycaret.regression import * s =
setup(data = bostonDataSet, target='medv')

4.6 Run and compare the Model Performance


cm = compare_models()
# Explore more parameters

4.7 Model Performance using data "Normalization"


s = setup(data = bostonDataSet, target = 'medv', normalize = True, normalize_method =
'zscore') cm =
compare_models()

#normalize_method = {zscore, minmax, maxabs, robust}


University Institute of Engineering
Department of Computer Science & Engineering

4.8 Model Performance using "Feature Selection"


s = setup(data = bostonDataSet, target = 'medv', feature_selection = True)
cm = compare_models()

4.9 Model Performance using "Outlier Removal"


s = setup(data = bostonDataSet, target = 'medv', remove_outliers = True, outliers_thr
eshold = 0.05) cm = compare_models()

4.1.0 Model Performance using "Transformation"


s = setup(data = bostonDataSet, target = 'medv', transformation = True, transformatio
n_method = 'yeo-johnson') cm = compare_models()

4.1.1 Model Performance using "PCA"


s = setup(data = bostonDataSet, target = 'medv', pca = True, pca_method = 'linear')
cm = compare_models()

4.1.2 Model Performance using "Outlier Removal" + "Normalization"


s = setup(data = bostonDataSet, target = 'medv', remove_outliers = True, outliers_thr
eshold = 0.05, normalize = True, normalize_method = 'zscore') cm = compare_models()

4.1.3 Model Performance using "Outlier Removal" + "Normalization" + "Transformation"


s = setup(data = bostonDataSet, target = 'medv', remove_outliers = True, outliers_thr
eshold = 0.05, normalize = True, normalize_method = 'zscore', transformation = True,
transformation_method = 'yeo-johnson') cm = compare_models()

5. Observations, Simulation Screen Shots and Discussions:


University Institute of Engineering
Department of Computer Science & Engineering

5.1 (a)

5.1 (b)

5.2

5.3

5.4
University Institute of Engineering
Department of Computer Science & Engineering

5.5

5.6

5.7
University Institute of Engineering
Department of Computer Science & Engineering

5.8

5.9

5.1.0

5.1.1
University Institute of Engineering
Department of Computer Science & Engineering

6. Result and Summary: Logistic regression is a statistical analysis method to predict a binary
outcome, such as yes or no, based on prior observations of a data set. A logistic regression
model predicts a dependent data variable by analyzing the relationship between one or more
existing independent variables.

7. Additional Creative Inputs (If Any):


Learning outcomes (What I have learnt):
1. . Describe AI/ML algorithms and techniques to demonstrate its applications.

2. Experiment with effective data visualizations, and explain how to work with data
through the entire data science process

3.

Evaluation Grid (To be filled by Faculty):


Sr. No. Parameters Marks Obtained Maximum Marks
1. Student Performance (task 12
implementation and result evaluation)
2. Viva-Voce 10
3. Worksheet Submission (Record) 8
Signature of Faculty (with Date): Total Marks Obtained: 30

You might also like