Research Article

[Retracted] Implementing Machine Learning for Smart Farming to Forecast Farmers’ Interest in Hiring Equipment

Algorithm 1

Decision tree.
INPUT: S, where S = set of classified instances
OUTPUT: decision tree
Require: S ≠ Φ, num_attributes >0
(1)Procedure BUILD TREE
(2)Repeat
(3)maxGain < - 0
(4)Split A < - null
(5)e < - Entropy(Attributes)
(6)For all attributes a in S do
(7)Gain < - Information Gain (a, e)
(8)If gain > maxGain then
(9)maxGain < - gain
(10)splitA < - a
(11)End if
(12)End for
(13)Partition (S, split A)
(14)until all partitions processed
(15)End procedure