Data Science Lab record2025(2)
Data Science Lab record2025(2)
No Date
Study and usage of Python
1
Aim:
Algorithm:
Program:
Aim:
Algorithm:
Program:
Step 9: View the first and last few rows of a DataFrame using. head () and. tail ()
methods.
Step 10: Create a linear plot using Matplotlib to visualize data.
Result:
Ex. No Date
Find-S Algorithm
3
Aim:
Algorithm:
Program:
Step:1 Initialize the most specific hypothesis to the first positive example
Aim:
Algorithm:
Program:
Aim:
Algorithm:
Program:
Aim:
Algorithm:
Program:
Step 1: Import necessary libraries
Aim:
Algorithm:
Program:
Step1: Loading The Data Set
Step2: Calculate the Entropy of Target Variable
Aim:
Algorithm:
Program:
Aim:
Algorithm:
Program:
Step 1: Import Libraries
Aim:
Algorithm:
Program:
Step:1 Import the libraries
Aim:
Algorithm:
Program:
Step:1 Import the necessary libraries
Aim:
Algorithm:
Program:
Step:1 Import necessary libraries (NumPy, random, Matplotlib).
Step:2 Define a Grid World class to simulate a 5x5 grid with obstacles. The agent
(robot) must navigate from the top-left to the bottom-right corner, avoiding obstacles.
Step:3 Define the Q-learning agent class, where the agent learns the optimal actions
using the Q-learning algorithm. It maintains a Q-table to store the expected future
rewards for each state-action pair.
Step:4 Initialize the environment and obstacles, and train the Q-learning agent over
multiple episodes. The agent learns to navigate the grid by updating its Q-values after
each action.
Step:5 Visualize the agent's learned path, showing how the robot navigates the grid
from start to goal while avoiding obstacles.