1_finding_s_algorithm
1_finding_s_algorithm
1 Finding S Algorithm
[27]: import pandas as pd
import numpy as np
[29]: data
n The attributes are: [['sunny' 'warm ' 'normal ' 'strong' 'warm ' 'same']
['sunny' 'warm ' 'high' 'strong' 'warm ' 'same']
['rainy' 'cold' 'high' 'strong' 'warm ' 'change']
['sunny' 'warm ' 'high' 'strong' 'cold' 'change']]
[31]: #segregating the target that has positive and negative examples
target = np.array(data)[:,-1]
print("n The target is: ",target)
1
specific_hypothesis[x] = '?'
return specific_hypothesis
The final hypothesis is: ['sunny' 'warm ' '?' 'strong' '?' '?']
[ ]: