0% found this document useful (0 votes)
2 views

Lab_Assignments

The document outlines a series of lab assignments for a Mechatronics Engineering and Automation Program focusing on Computational Intelligence. Each assignment involves writing Python code to perform tasks such as generating random numbers, solving linear equations, visualizing functions, analyzing datasets with Pandas, and creating classifiers for the double moon dataset. Students are required to submit well-commented Python scripts for each assignment, demonstrating their implementation and results.

Uploaded by

Fady Kamil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab_Assignments

The document outlines a series of lab assignments for a Mechatronics Engineering and Automation Program focusing on Computational Intelligence. Each assignment involves writing Python code to perform tasks such as generating random numbers, solving linear equations, visualizing functions, analyzing datasets with Pandas, and creating classifiers for the double moon dataset. Students are required to submit well-commented Python scripts for each assignment, demonstrating their implementation and results.

Uploaded by

Fady Kamil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Mechatronics Engineering and Automation Program

CSE473: Computational Intelligence


Lab Assignment #01

Write a Python code to generate 1000 random numbers between a and b.


• The user inputs a and b values.
• The program displays median, average, and standard deviation.
• The program displays the largest three values.
• The program displays the smallest 5 values.
_____________________________________________________________________
Mechatronics Engineering and Automation Program
CSE473: Computational Intelligence
Lab Assignment #02

A general system of m linear equations with n unknowns and coefficients can be


written as:

Write a Python program to allow the user to enter the a’s and b’s parameters and
returns the solution of the system of equations. Consider the case when m = n for
simplicity. Test your program for different values of n. You may consider generating
random numbers for the parameters.
___________________________________________________________________
Mechatronics Engineering and Automation Program
CSE473: Computational Intelligence
Lab Assignment #03

Write a Python code to visualize the following functions as contour plots:


1- F(x,y) = sin(x)2+cos(y)2.
2- G(x,y) = 9/((x-2)2+(y-4)2)0.5 + 12/((x-5)2 + (y-2)2)0.5 + 25/((x-4)2 + (y-
5)2)0.5
3- G(x,y) = ((x-2)2+(y-4)2)0.5/9+ ((x-5)2 + (y-2)2)0.5/12+ ((x-4)2 + (y-
5)2)0.5/25
In each case, mark the positions of the local minima/maxima points on the graph.
___________________________________________________________________
Mechatronics Engineering and Automation Program
CSE473: Computational Intelligence
Lab Assignment #04

Assignment: Analyzing a Dataset with Pandas


Objective:
You will use the pandas library to load a dataset, explore its structure, clean the data,
and perform some basic analysis to gain insights.
Dataset:
Use the Iris dataset. The Iris dataset contains measurements of 150 iris flowers from
three different species: Iris-setosa, Iris-versicolour, and Iris-virginica. Each flower is
described by four features: sepal length, sepal width, petal length, and petal width.
Tasks:
1. Load the dataset:
o Download the Iris dataset from the provided link.
o Load the dataset into a pandas DataFrame.
2. Explore the dataset:
o Display the first 10 rows of the DataFrame.
o Show a summary of the dataset, including the data types and missing
values.
o Display basic statistics for each numerical column.
3. Data Cleaning:
o Check for and handle any missing values.
o Ensure all data types are appropriate for analysis.
4. Data Analysis:
o Calculate the mean and median for each numerical column.
o Find the correlation between the numerical features.
o Group the data by species and calculate the mean for each feature within
each species.
o Plot histograms for each numerical feature.
Submission:
• Submit your Python script (.py file) containing the implementation of the tasks
above.
• Ensure your script is well-commented and includes any necessary explanations
of your approach and results.
___________________________________________________________________
Mechatronics Engineering and Automation Program
CSE473: Computational Intelligence
Lab Assignment #05

Assignment: Double Moon Data set and Binary Classification


Objective:
You will create a MLNN classifier for the double moon dataset with two points
categories (red and blue) pretty like the points visualized below.

Tasks:
1. Create the data set as shown above.
o The number of points in the red class is N1 entered by the user.
o The number of points in the red class is N2 entered by the user.
o Label, training, validation, and test points.
2. Train a linear classifier for the created data.
o Visualize the training and validation losses/error.
o Visualize the decision boundary.
3. Train a MLNN classifier for the created data.
o Visualize the training and validation losses/error.
o Visualize the decision boundary.
4. Dcompare between the two cases of 2 and 3.

Submission:
• Submit your Python script (.py file) containing the implementation of the tasks
above.
• Ensure your script is well-commented and includes any necessary explanations
of your approach and results.
___________________________________________________________________
Mechatronics Engineering and Automation Program
CSE473: Computational Intelligence
Lab Assignment #06

Assignment: Double Moon Data set and Binary Classification


Objective:
You will create a MLNN classifier for the double moon dataset with four points
categories pretty like the points visualized below.

Tasks:
1. Create the data set as shown above.
o The number of points can be entered by the user.
o Label, training, validation, and test points.
2. Train a MCSVM classifier for the created data.
o Visualize the training and validation losses/error.
o Visualize the decision boundaries.
3. Train a MLNN classifier for the created data.
o Visualize the training and validation losses/error.
o Visualize the decision boundary.
4. Dcompare between the two cases of 2 and 3.

Submission:
• Submit your Python script (.py file) containing the implementation of the tasks
above.
• Ensure your script is well-commented and includes any necessary explanations
of your approach and results.
___________________________________________________________________

You might also like