Skip to content

Commit 37443a1

Browse files
Randomforest implemented
1 parent b611e5f commit 37443a1

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

md/Random-Forest.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1-
#Random Forest
1+
# Random Forest
22

3-
##function ##
3+
__function__ RANDOMFOREST( S,F ) __return__ solution:
4+
 __input__ S --> training set consisting of (Xi,Yi)
5+
  F --> No. of features
6+
&emsp;&emsp;H <-- null
7+
8+
&emsp;for __each__ i 1,..B(no.of trees) __do__
9+
&emsp;&emsp;&emsp;h(i) --> RANDOMISEDTREE( S(i),F )
10+
&emsp;&emsp;&emsp;H <-- H U {h(i)}
11+
&emsp;&emsp;&emsp;__return__ H
12+
13+
__function__ RANDOMISEDTREE(S,F) __return__ learnt_tree :
14+
15+
&emsp;for each node of the tree do
16+
&emsp;&emsp;&emsp;f <-- Randomised subset of F
17+
&emsp;&emsp;&emsp;Split and choose best feature in f
18+
19+
20+
21+
22+
23+

0 commit comments

Comments
 (0)