Posts

Showing posts from November, 2024

B.tech 5th Sem Machin learning lab practical

 Program 1:   Implement and demonstrate the FIND-S algorithm for finding the most specific hypothesis   based on a  given set of training data samples. Read the training data from a .CSV file. import random import csv import pandas as pd att= [['Sunny','Rainy'],               ['Warm','Cold'],               ['Normal','High'],               ['Strong','Weak'],               ['Warm','Cool'],               ['Same','Change']] attribute=len(att) print("attribute length=",attribute) print("\n Most general hypothesis:['?','?','?','?,'?','?']") print("\n Most specific hypothesis:['0','0','0','0','0','0']") a=[] print("\n Given training data set") with open('C:\\Users\pc1\\Desktop\\machine\\ws.csv') as file:     reader=csv.reader(file)     for r in reader:       ...