Posts

Showing posts with the label random-forest

Error in running randomForest : object not found

Error in running randomForest : object not found So i am trying to fit a random forest classifier for my dataset. I am very new to R and i imagine this is a simple formatting issue. I read in a text file and transform my dataset so it is of this format: (taking out confidential info) >head(df.train,2) GOLGA8A ITPR3 GPR174 SNORA63 GIMAP8 LEF1 PDE4B LOC100507043 TGFB1I1 SPINT1 Sample1 3.726046 3.4013711 3.794364 4.265287 -1.514573 7.725775 2.162616 -1.514573 -1.5145732 -1.514573 Sample2 4.262779 0.9261892 4.744096 7.276971 -1.514573 4.694769 4.707387 2.031476 -0.8325444 2.615991 ... ... CD8B FECH PYCR1 MGC12916 KCNA3 resp Sample1 -1.514573 2.099336 3.427928 1.542951 -1.514573 1 Sample2 -1.145806 1.204241 2.846832 1.523808 1.616791 1 In essence the columns are my features and the rows my samples, the last column is my response vector which is a column of factors, resp. Then i use: set.seed(1) #Set the seed in order to gain reproduci...