Question: need step by step algorithm to this code Problem Statement-2: Write a program to implement the find F algorithm. Source code -: import csv a=[]

need step by step algorithm to this code
Problem Statement-2: Write a program to implement the find F algorithm. Source code -: import csv a=[] with open("enjoySport.csv", "r")as csvFile: for row in csv.reader(csvFile): a.append(row) print("|n", a) print("|n The total number tarining intances are :", len(a)-1) num_att = len(a[0])-1 print("|n The total number num_att are :", len(a[0])-1) print("|n Initial hypthesis is :") hypothesis = ['0']*num_att print(hypothesis) for i in range(0, len(a)): if a[i][num_att] == 'yes': for j in range(0, num_att): if hypothesis[j] == '0' or hypothesis[j] == a[i][j]: hypothesis[j] = a[i][j] else: hypothesis[j] = '?' print(hypothesis,i) print("|n The hypothesis for the \{\} is : n".format(i), hypothesis) print("|n The specific hypothesis for the training instance is") print(hypothesis) [['sKy', 'airtemp', 'humidity', 'wind', 'water', 'forcast', 'enjoysport'], ['sunny', 'warm', 'normal', 's trong', 'warm', 'same', 'yes'], ['sunny', 'warm', 'high', 'strong', 'warm', 'same', 'yes'], ['rainy', 'col d', 'high', 'strong', 'warm', 'change', 'no'], ['sunny', 'warm', 'high', 'strong', 'cool', 'change', 'yes']] The total number tarining intances are : 4 The total number num_att are : 6 Initial hypthesis is : ['0', '0', '0', '0', '0', '0'] ['sunny', 'warm', '?', 'strong', 'warm', 'same'] 2 ['sunny', 'warm', '?', 'strong', 'warm', 'same'] 4 ['sunny', 'warm', '?', 'strong', '?', 'same'] 4 ['sunny', 'warm', '?', 'strong', '?', '?'] 4 The hypothesis for the 4 is : ['sunny', 'warm', '?', 'strong', '?', '?'] The specific hypothesis for the training instance is ['sunny', 'warm', '?', 'strong', '?', '?']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
