Skip to contents

Feature selection using random forest

Usage

ML_RF(object, ylim_min = 0, seed = NULL)

Arguments

object

A dataframe-like data object containing log-metabolite intensity values, with columns corresponding to metabolites and must containing the group column, and the rows corresponding to the samples

ylim_min

the min ylim,default is 0

seed

the seed

Value

test

Examples

library(dplyr)

meta_dat1 <- t(meta_dat) %>%
  as.data.frame() %>%
  dplyr::mutate(group=group)
result_ML_RF <- ML_RF(meta_dat1)

result_ML_RF$p

result_ML_RF$feature_result
#> # A tibble: 120 × 6
#>    normal tumor MeanDecreaseAccuracy MeanDecreaseGini names   raw    
#>     <dbl> <dbl>                <dbl>            <dbl> <chr>   <fct>  
#>  1   5.05  4.81                 5.12            0.662 C02045  C02045 
#>  2   4.23  4.03                 4.40            0.499 C00022  C00022 
#>  3   4.11  3.65                 4.22            0.474 C00073  C00073 
#>  4   4.32  3.27                 4.19            0.668 C05378  C05378 
#>  5   3.97  3.49                 4.16            0.484 C03413  C03413 
#>  6   3.71  3.95                 4.13            0.388 C05674  C05674 
#>  7   3.81  3.43                 4.01            0.435 C05938. C05938 
#>  8   3.83  3.33                 3.85            0.427 C00148  C00148 
#>  9   3.74  3.31                 3.75            0.422 C00255  C00255 
#> 10   3.50  2.69                 3.65            0.422 C00025  C00025 
#> # ℹ 110 more rows