-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRFThesis.go
33 lines (27 loc) · 882 Bytes
/
RFThesis.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"fmt"
"os"
"github.com/SamuelCarroll/DecisionForest"
"github.com/SamuelCarroll/readFile"
)
func main() {
NUMCLASSES := 2
NUMTREES := 10000
if len(os.Args) < 3 {
fmt.Println("Run ./RFThesis dataFile treeFile")
os.Exit(-1)
}
inFile := os.Args[1]
outBase := os.Args[2]
//readFile.Read(inFile, uidPresent, classPresent)
fmt.Println("Reading the data")
myData := readFile.Read(inFile, true, true)
//DecisionForest.GenForest(allData, numClasses, numTrees, printRes, writeTrees, readTrees, outBase)
//Uncomment the following lines to test data
fmt.Println("Testing the forest")
DecisionForest.GenForest(myData, NUMCLASSES, NUMTREES, true, false, true, outBase)
//Uncomment the following lines to train the forest
//fmt.Println("Training the forest")
//DecisionForest.GenForest(myData, NUMCLASSES, NUMTREES, true, true, false, outBase)
}