0% found this document useful (0 votes)
27 views40 pages

AL-405 Machine Learning Lab Manual

The document outlines the Machine Learning laboratory course (AL-405) at Acropolis Institute of Technology and Research for the academic year 2024-2025, detailing its objectives, syllabus, and practical components. It emphasizes algorithm design principles, computational complexity, and hands-on experience with various machine learning techniques and tools such as NumPy, pandas, and Matplotlib. Additionally, it includes guidelines for laboratory conduct, course prerequisites, and expected outcomes for students.

Uploaded by

Shaurya Verma
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)
27 views40 pages

AL-405 Machine Learning Lab Manual

The document outlines the Machine Learning laboratory course (AL-405) at Acropolis Institute of Technology and Research for the academic year 2024-2025, detailing its objectives, syllabus, and practical components. It emphasizes algorithm design principles, computational complexity, and hands-on experience with various machine learning techniques and tools such as NumPy, pandas, and Matplotlib. Additionally, it includes guidelines for laboratory conduct, course prerequisites, and expected outcomes for students.

Uploaded by

Shaurya Verma
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/ 40

2024-25

Acropolis Institute of
Technology and
Research, Indore
Submitted To:
Department of CSE
Prof. Rishi Acharya
(Artificial Intelligence & Machine Learning)

Machine Learning (AL-405)


Submitted To: Prof. Rishi Acharya

Submitted By:
0827AL2311xx
ALS-2/2nd Year/ 4th Sem

ACROPOLIS INSTITUTE OF TECHNOLOGY & RESEARCH

[LAB ASSIGNMENT ML (AL-405)]


The objective of this laboratory work in Machine Learning is to educate students on algorithm design principles and how to analyze the
behavior of algorithms without actual implementation on a computer. Additionally, it aims to demonstrate a practical

understanding of estimating the time and space resources needed to execute machine learning algorithms.
CERTIFICATE

This is to certify that the experimental work entered in this journal as per

the B. TECH. II year syllabus prescribed by the RGPV was done by Mr. Yash

Suroshe B.TECH II year IV semester in the Machine Learning Laboratory of

this institute during the academic year 2024-2025.

Signature of the Faculty


About the Laboratory

The Machine Learning laboratory provides students with a comprehensive understanding of


algorithms and their applications in solving machine learning problems. Through hands-on exercises,
students develop proficiency in algorithm design and coding, while also analyzing computational
complexity to assess algorithm efficiency. By modeling engineering problems with various data
structures and applying algorithmic principles, students gain practical experience in developing
machine learning solutions. Furthermore, the laboratory strengthens students' ability to identify and
apply appropriate algorithms to real-world problems, offering an invaluable overview of algorithm
design and its application in machine learning contexts.
1. GENERAL INSTRUCTIONS FOR LABORATORY CLASSES

1. DO’S

✔ Without Prior permission do not enter into the Laboratory.

✔ While entering into the LAB students should wear their ID cards.

✔ The Students should come with proper uniform.

✔ Students should sign in the LOGIN REGISTER before entering into the
laboratory.

✔ Students should come with observation and record note book to the laboratory.

✔ Students should maintain silence inside the laboratory.

✔ After completing the laboratory exercise, make sure to shutdown the system
properly.

2. DONT’S

✔ Students bringing the bags inside the laboratory.

✔ Students using the computers in an improper way.

✔ Students scribbling on the desk and mishandling the chairs.

✔ Students using mobile phones inside the laboratory.

✔ Students making noise inside the laboratory.


SYLLABUS
Course: AL405(Machine Learning)

Branch/Year/Sem: CSE (Artificial Intelligence & Machine Learning) / II / IV

Module1: Introduction to machine learning, scope and limitations, machine learning models,
Supervised Learning, Unsupervised Learning, hypothesis space and inductive bias, evaluation, cross-
validation, Dimensionality Reduction: Subset Selection, Shrinkage Methods, Principle Components
Analysis, Partial Least Squares.

Module2: Neural Networks: From Biology to Simulation, Neural network representation, Neural
Networks as a paradigm for parallel processing Perceptron Learning, Training a perceptron,
Multilayer perceptron, back propagation Algorithm, Training & Validation, Activation functions,
Vanishing and Exploding Gradients.

Module3: Supervised Learning Techniques:- Decision Trees, Naive Bayes, Classification, Support
vector machines for classification problems, Random forest for classification and regression
problems, Linear regression for regression problems, Ordinary Least Squares Regression, Logistic
Regression.

Module4: Unsupervised Learning, Clustering: k-means, adaptive hierarchical clustering, Gaussian


mixture model, Optimization Using Evolutionary Techniques, Number of Clusters, Advanced
discussion on clustering, Expectation Maximization.

Module5: Design and Analysis of Machine Learning Experiments: Factors, response and strategy of
experimentation, Guidelines for machine learning experiments, cross-validation and resampling
methods, Measuring classifier performance, Hypothesis testing, comparing multiple algorithms,
comparison over multiple datasets
Software Requirements:

S. Name of Item Specification


No
.
1 Computer System Hard Disk min 5 GB
RAM: 2 GB or higher
Processor: Intel i3 or above

2 Operating system Window 8 or higher version

3 Editor DevC++, TurboC++, Vscode or any other


compatible

RATIONALE:
This subject aims to impart fundamental concepts and practical skills in analyzing and designing
algorithms within the domain of Machine Learning (ML). By covering both theoretical foundations
and practical implementation aspects, students gain a comprehensive understanding of algorithmic
principles specific to ML.
PREREQUISITE:-

• Basic understanding of programming concepts and data structures,


preferably using languages commonly used in machine learning such as
Python or Java.
• Familiarity with fundamental concepts of data structures and algorithms.
• Sound background in discrete mathematics, including topics like sets, relations,
functions, and logic, to comprehend theoretical aspects of machine learning
algorithms effectively.

COURSE OBJECTIVES AND OUTCOMES


Course Objectives
This course provides a broad introduction to machine learning.
It offers some of the most cost-effective approaches to automated knowledge acquisition in
emerging data-rich disciplines and focuses on the theoretical understanding of these
methods, as well as their computational implications.
To provide an understanding of the theoretical concepts of machine learning and
prepare students for research or industry application of machine learning techniques.

Course Outcomes :

At the end of the course student will be able to:

1. NumPy:
1. Utilize NumPy arrays for efficient data manipulation and numerical computations.
2. Apply various mathematical functions and operations available in NumPy to analyze data
effectively.
3. Understand and implement basic linear algebra operations using NumPy arrays.

2. pandas:
1. Use pandas DataFrame and Series to efficiently handle and manipulate tabular data.
2. Perform data cleaning, manipulation, and transformation tasks using pandas methods and
functions.
3. Apply grouping, aggregation, and filtering techniques to analyze and summarize data
effectively.

3. Matplotlib:
1. Create various types of plots, including line plots, scatter plots, histograms, and bar plots, using
Matplotlib.
2. Customize plot aesthetics such as colors, labels, titles, and legends to improve
visualization clarity.
3. Understand and apply advanced plotting techniques such as subplots, annotations, and 3D
plotting to visualize complex data relationships.
Index

Date of Date of Grade & Sign


Exp. Submission of the Faculty
S.No Name of the Experiment

1
Introduction to Pandas

2
NumPy

3
Matplotlib

4
Car Price Project

5
Diabetes Prediction Project

6
Loan Status

7
House Price Prediction

8
Wine Quality Prediction
Program Outcomes:

The engineering graduate of this institute will demonstrate:

1.Apply knowledge of mathematics, science, computing and engineering fundamentals to computer


science engineering problems.

2.Able to identify, formulate, and demonstrate with excellent programming, and problem solving skills.

3.Design solutions for engineering problems including design of experiment and processes to meet
desired needs within reasonable constraints of manufacturability, sustainability, ecological, intellectual
and health and safety considerations.

4.Propose and develop effective investigational solution of complex problems using research
methodology; including design of experiment, analysis and interpretation of data, and combination of
information to provide suitable conclusion. synthesis

5.Ability to create, select and use the modern techniques and various tools to solve engineering problems and
to evaluate solutions with an understanding of the limitations.

6.Ability to acquire knowledge of contemporary issues to assess societal, health and safety, legal and
cultural issues.

7.Ability to evaluate the impact of engineering solutions on individual as well as organization in a societal and
environmental context, and recognize sustainable development, and will be aware of emerging
technologies and current professional issues.

8.Capability to possess leadership and managerial skills, and understand and commit to professional ethics
and responsibilities.

9.Ability to demonstrate the team work and function effectively as an individual, with an ability to design,
develop, test and debug the project, and will be able to work with a multi-disciplinary team.

10.Ability to communicate effectively on engineering problems with the community, such as being able
to write effective reports and design documentation.

11.Flexibility to feel the recognition of the need for, and have the ability to engage in independent and life-
long learning by professional development and quality enhancement programs in context of
technological change.

12.A practice of engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and entrepreneurship.
Pandas
Q1. Create a Pandas Series named s1 and what will be the datatype of the elements in s1?

Q2. What are the following values for the s1 Series?

(a)Mean (b) Minimum Value (c) Variance (d) Maximum Value


Q3. What are the 25th, 50th and 75th percentiles (quantiles) of the series s1?

Q4. What does the line s1 [s1>50] = 0 do to the s1 series?

Q5. What will be the descriptive statistics (Summary stats) of the series s1?
Q6. What kind of plot is shown, and what does the height of the bar at 0 on the x-axis and tell us
about the data’s distribution?

Q7. How does the creation of s (a pandas Series) differ from the creation of a (a numpy array)?

Q8. How is the random data for s2 series generated?


Q9. Which output show a Date, time, Index that represents a daily sequence of dates for the first 10
days of June 2021?

Q10. Which program execution output presents a Pandas Series of integer values (marks) where
each value is identified by a unique person’s name?

Q11. Write a program to fetch specific data of dates?


Q12. Write a program for slicing by label or manual index?

Q13. Write a program to show the segment of ‘sales’ Series by using default indexing?

(Slicing by default index)

Q14. Write a program to show the result of adding 10 to every value in the ‘sales’ series?
Q15. Write a program to show a python dictionary where names are associated with Numerical
height values?

Q16. Write a program for creation and display of a Pandas DataFrame with multiple Columns,
including ‘Name’ , ‘Sex’ , ‘Height ’, ‘Weight ’, and ‘Salary’?

Q17. Write a Program to show a Pandas DataFrame where the original numerical row labels have
been replaced by the names from the ‘Name’ Column?
Q18. Write a program to visually represents the ‘Salary’ data from the df1 DataFrame as a bar chart?

Q19. Write a program to illustrate how to retrieve a single data point from a DataFrame using both
its numerical position and its corresponding row and column labels?
NUMPY
Q.1 How to create array in numpy library of python?

Q. 2 Write a program to create 1 Dimensional Array and find minimum and maximum element.

Q. 3 Write a program to create 1 Dimensional Array and find size, shape, dtype, ndim and data.
Q.4 Write a program to create 1 Dimensional array and find Statistical

Q.5 Write a program to create 2Dimensional Array named two .

Q. 6 Write a program access element of two using slicing.


Q.7 Write a program to create 2 Dimensional array consisting of numbers 1 to 100.

Q.8 Write a program to create two 2-Dimensional array and perform Multiplication
operations on them
Matplotlib

Q.1 What is the simplest way to create a basic line plot with matplotlib?

Q. 2 How can you set the facecolor of a figure? Provide examples of different colors used.
Q. 3 How do you label the x-axis and y-axis of a plot? How do you set the color of individual
lines in a plot?
Q. 4How do you plot sine and cosine functions on the same graph?
Q.5 How do you set the x-ticks and y-ticks on a plot? What does ax.grid() do? How do you
add a label to a plotted line (e.g., 'square', 'cube')?
Car Price
(Linear Regression and Lasso Regression)
Diabetes Prediction (Logistic Regression)
House Price Prediction
(XGBoost for Regression)
Wine Quality Prediction
(Random Forest Classifier)

You might also like