ML Practicals
ML Practicals
Unit – III 3.1 Describe different types of 3.1.1 Machine Learning activities
Preparing to Machine learning Activities • Preparing to Model
Model and 3.2 Explain Data preprocessing • Learning: Data Partition-k-fold cross
Preprocessing validation, Model Selection
• Performance Evaluation: confusion
matrix
• Performance Improvement:
Ensemble
3.2.1 Types of Data
• Qualitative/Categorical Data:
Nominal, Ordinal
• Quantitative/Numeric Data:
Interval, Ratio
3.2.2 Data quality and remediation
• Handling outliers
• Handling missing values
3.2.3 Data Pre-Processing
Dimensionality reduction
• Feature subset selection: Filter,
Wrapper, Hybrid, Embedded
Approx.
S.
Practical Outcomes (PrOs) Unit No. Hrs.
No.
required
Explore any one machine learning tool. I 4
1
(like Weka, Tensorflow, Scikit-learn, Colab, etc.)
Write a NumPy program to implement following operation
• to convert a list of numeric values into a one-dimensional
NumPy array
2 • to create a 3x3 matrix with values ranging from 2 to 10 II 4
• to append values at the end of an array
• to create another shape from an array without changing its
data(3*2 to 2*3)
Write a NumPy program to implement following operation
• to split an array of 14 elements into 3 arrays, each with 2, 4, and
3 II 4
8 elements in the original order
• to stack arrays horizontally (column wise)
4 Write a NumPy program to implement following operation
• to add, subtract, multiply, divide arguments element-wise
• to round elements of the array to the nearest integer
II 4
Operators arithmetic
Total 56
Total 42 23 25 22 70
Ex:
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
2. Write a Python program using Scikit-learn to print the keys, number of rows-columns,
feature names and the description of the given data.
import pandas as pd
iris_data = pd.read_csv("iris.csv")
print("\nKeys of Iris dataset:")
print(iris_data.keys())
print("\nNumber of rows and columns of Iris dataset:")
print(iris_data.shape)
o/p:
• to find and drop the missing values from the given dataset
https://www.w3resource.com/python-exercises/pandas/filter/pandas-filter-exercise-4.php