@@ -446,7 +446,7 @@ plot_lz = function(dat_eva_lst, pm=NULL, co=NULL, title=NULL, ...) {
446446 legend.background = element_blank(),
447447 legend.key = element_blank(),
448448 legend.key.size = unit(1.5 , ' lines' )) +
449- guides(color = guide_legend(title = NULL ), fill = FALSE )
449+ guides(color = guide_legend(title = NULL ), fill = ' none ' )
450450
451451 # axis, labs, theme
452452 plz = plz + ggtitle(paste0(title , ' Lorenz' )) +
@@ -479,18 +479,23 @@ plot_f1 = function(dat_eva_lst, pm=NULL, co=NULL, beta=1, title=NULL, ...) {
479479 # max_fb = ceiling2(max(dt_f[[paste0('f',beta)]],na.rm = TRUE))
480480
481481 # plot
482- pf = ggplot(data = dt_f , aes(x = cumpop )) +
483- geom_line(aes_string(y = paste0(' f' ,beta ), color = ' datset' ), na.rm = TRUE ) +
484- geom_point(data = dt_cut , aes_string(x = ' cumpop' , y = paste0(' f' ,beta )), color = ' red' ) +
485- # geom_text(data = dt_cut, aes_string(x='cumpop', y=paste0('f',beta), label='oc', color='datset'), vjust=0) +
486- geom_segment(data = dt_cut , aes_string(x = ' cumpop' , y = 0 , xend = ' cumpop' , yend = paste0(' f' ,beta ), color = ' datset' ), linetype = " dashed" ) +
482+ pf =
483+ # ggplot(data = dt_f, aes(x=cumpop)) +
484+ # geom_line(aes_string(y=paste0('f',beta), color='datset'), na.rm = TRUE) +
485+ # geom_point(data = dt_cut, aes_string(x='cumpop', y=paste0('f',beta)), color='red') +
486+ # # geom_text(data = dt_cut, aes_string(x='cumpop', y=paste0('f',beta), label='oc', color='datset'), vjust=0) +
487+ # geom_segment(data = dt_cut, aes_string(x = 'cumpop', y = 0, xend = 'cumpop', yend = paste0('f',beta), color='datset'), linetype = "dashed") +
488+ ggplot() +
489+ geom_line(data = dt_f , aes(x = .data [[' cumpop' ]], y = .data [[paste0(' f' , beta )]], color = .data [[' datset' ]]), na.rm = TRUE ) +
490+ geom_point(data = dt_cut , aes(x = .data [[' cumpop' ]], y = .data [[paste0(' f' , beta )]]), color = ' red' ) +
491+ geom_segment(data = dt_cut , aes(x = .data [[' cumpop' ]], y = 0 , xend = .data [[' cumpop' ]], yend = .data [[paste0(' f' , beta )]], color = .data [[' datset' ]]), linetype = " dashed" ) +
487492 theme_bw() +
488493 theme(legend.position = c(1 ,0 ),
489494 legend.justification = c(1 ,0 ),
490495 legend.background = element_blank(),
491496 legend.key = element_blank(),
492497 legend.key.size = unit(1.5 , ' lines' )) +
493- guides(color = guide_legend(title = NULL ), fill = FALSE )
498+ guides(color = guide_legend(title = NULL ), fill = ' none ' )
494499
495500 # axis, labs, theme
496501 pf = pf + ggtitle(paste0(title , paste0(" F" ,beta ))) +
@@ -870,8 +875,8 @@ psicsi_metric = function(dt_sn, names_datset, is_totalscore=TRUE) {
870875
871876 # data frame of bin, actual, expected
872877 dt_bae = dcast(
873- dt_sn [, .N , keyby = c(' datset' , ' bin' )],
874- bin ~ datset , value.var = " N " , fill = 0.99
878+ dt_sn [, as.numeric( .N ) , keyby = c(' datset' , ' bin' )][ ],
879+ " bin ~ datset" , value.var = " V1 " , fill = 0.99
875880 )
876881
877882
0 commit comments