[R] Random Forest prediction all NA

Chen, Lang l@ngchen @ending from u@bmc@edu
Thu Oct 25 01:39:49 CEST 2018


Dear R user,
I try randomForest and had an issue for the prediction. The training and test data from two separate csv file. However I end with all NA or prediction.

Y is the continuouse variable, X variables are factors, continuous variables, variables with numeric 0/1 indication Y/N (not coverted to factor),  and calendar year.
> haq.pred<-predict(x.rfc, x.2)
> summary(haq.pred)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
     NA      NA      NA     NaN      NA      NA  437990
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
randomForest_4.6-14.




Lang Chen
Center for Education & Research on Therapeutics of Musculoskeletal Disorders (CERTS)
Clinical Immunology and Rheumatology
Dept. of Medicine
Universtiy of Alabama at Birmingham
Mail: 1720 Second Ave. South
FOT 802C,
Birmingham AL 35294
510 20th St S
FOT 802C,
Birmingham AL 35294
205-975-7473 (O)


	[[alternative HTML version deleted]]



More information about the R-help mailing list