You are on page 1of 7

University Institute of Engineering

Department of Computer Science & Engineering

Experiment: 1.3
Student Name: DIVYANSHU KUSHWAHA
UID:22BCS14850
Branch: Computer Science & Engineering Section/Group:424/A
Semester:1st Semester
Date of Performance:07/10/2022
Subject Name: Disruptive Technologies-1
Subject Code: 22ECH-102_22BCS-424

1. Aim of the practical: Understand supervised learning to train and develop classifier
models.

2. Tool Used: Google Colab.


3. Basic Concept/ Command Description:
Machine Learning:
Machine learning is the science (and art) of programming computers so they can learn
from
data.
Machine learning is the field of study that gives computers the ability to learn without
being
explicitly programmed. – Arthur Samuel, 1959

A computer program is said to learn from experience E with respect to some task T and
some
performance measure P, if its performance on T, as measured by P, improves with
experience
E. – Tom Mitchell, 1997

Supervised Learning:
Supervised learning, also known as supervised machine learning, is a subcategory of
machine learning and artificial intelligence. It is defined by its use of labelled datasets to
train algorithms that to classify data or predict outcomes accurately. As input data is fed
University Institute of Engineering
Department of Computer Science & Engineering

into the model, it adjusts its weights until the model has been fitted appropriately, which
occurs as part of the cross validation process. Supervised learning helps organizations
solve for a variety of real- world problems at scale, such as classifying spam in a separate
folder from your inbox.

Classification:
Classification is a process of categorizing a given set of data into classes, It can be
performed on both structured or unstructured data. The process starts with predicting
the class of given data points. The classes are often referred to as target, label or
categories.
The classification predictive modeling is the task of approximating the mapping function
from input variables to discrete output variables. The main goal is to identify which
class/category the new data will fall into.
Heart disease detection can be identified as a classification problem, this is a binary
classification since there can be only two classes i.e. has heart disease or does not have
heart disease. The classifier, in this case, needs training data to understand how the given
input variables are related to the class. And once the classifier is trained accurately, it can
be used to detect whether heart disease is there or not for a particular patient.
Since classification is a type of supervised learning, even the targets are also provided with
the input data.

4. Code:
from pycaret.datasets import get_data dataSets = get_data('index')
telescopeDataSet = get_data("telescope") # SN is 7
# This is binary classification dataset. The values in "Class variable" have two (binary)
values.
from pycaret.classification import *
s = setup(data=telescopeDataSet, target='Class variable', silent=True)
rfModel = create_model('rf') plot_model(rfModel, plot='confusion_matrix')
plot_model(rfModel)
sm = save_model(rfModel, 'rfModelFile')
plot_model(rfModel, plot='feature') newDataSet = get_data("telescope").iloc[:10]
newPredictions = predict_model(rfModel, data = newDataSet) newPredictions
University Institute of Engineering
Department of Computer Science & Engineering

5. Observations, Simulation Screen Shots and Discussions:


University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering

4. Learning outcomes (What I have learnt):

1.Pycaret library function.

2.Classification Models.

3.Import data from pycaret repository.

4.Details about RandomForest (rf).

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