brulee icon indicating copy to clipboard operation
brulee copied to clipboard

Linear activation function leads to "object of type 'closure' is not subsettable" error

Open christophscheuch opened this issue 2 years ago • 1 comments

The problem

I cannot use linear activation functions in brulee_mlp(). I instead get my favorite R error :)

Reproducible example

library(brulee)
library(recipes)
library(yardstick)

data(bivariate, package = "modeldata")
set.seed(20)
nn_log_biv <- brulee_mlp(Class ~ log(A) + log(B), data = bivariate_train, 
                         epochs = 150, hidden_units = 3, activation = "linear")
#> Error in x$parameters: object of type 'closure' is not subsettable

Session info

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)

Matrix products: default


locale:
[1] LC_COLLATE=English_Austria.utf8  LC_CTYPE=English_Austria.utf8   
[3] LC_MONETARY=English_Austria.utf8 LC_NUMERIC=C                    
[5] LC_TIME=English_Austria.utf8    

time zone: Europe/Vienna
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] yardstick_1.2.0 brulee_0.2.0    recipes_1.0.6   dplyr_1.1.2    

loaded via a namespace (and not attached):
 [1] utf8_1.2.3          future_1.32.0       generics_0.1.3     
 [4] class_7.3-22        lattice_0.21-8      listenv_0.9.0      
 [7] digest_0.6.31       magrittr_2.0.3      grid_4.3.1         
[10] timechange_0.2.0    rprojroot_2.0.3     Matrix_1.5-4.1     
[13] processx_3.8.2      nnet_7.3-19         survival_3.5-5     
[16] torch_0.11.0        ps_1.7.5            purrr_1.0.1        
[19] fansi_1.0.4         scales_1.2.1        coro_1.0.3         
[22] codetools_0.2-19    lava_1.7.2.1        cli_3.6.1          
[25] rlang_1.1.1         hardhat_1.3.0       parallelly_1.36.0  
[28] future.apply_1.11.0 munsell_0.5.0       bit64_4.0.5        
[31] splines_4.3.1       withr_2.5.0         prodlim_2023.03.31 
[34] tools_4.3.1         parallel_4.3.1      colorspace_2.1-0   
[37] ggplot2_3.4.3       globals_0.16.2      vctrs_0.6.2        
[40] R6_2.5.1            rpart_4.1.19        lifecycle_1.0.3    
[43] lubridate_1.9.2     bit_4.0.5           MASS_7.3-60        
[46] desc_1.4.2          pkgconfig_2.0.3     callr_3.7.3        
[49] gtable_0.3.3        pillar_1.9.0        data.table_1.14.8  
[52] glue_1.6.2          Rcpp_1.0.10         tibble_3.2.1       
[55] tidyselect_1.2.0    ipred_0.9-14        timeDate_4022.108  
[58] gower_1.0.1         compiler_4.3.1 

christophscheuch avatar Oct 05 '23 14:10 christophscheuch

Any update on this? Still can't use it

statslover123 avatar Sep 01 '24 15:09 statslover123