Open ShixiangWang opened 2 years ago
> ggeffects::ggpredict(mm$model, "x")
Error in names(datlist) <- names(focal_terms) :
'names' attribute [1] must be the same length as the vector [0]
In addition: Warning message:
Could not get model data.
> ggeffects::ggpredict(mm$model, terms = "x")
Error in names(datlist) <- names(focal_terms) :
'names' attribute [1] must be the same length as the vector [0]
In addition: Warning message:
Could not get model data.
好像不兼容。模型本身的数据访问可能存在问题,这跟函数通过代码自动构建有关系
交互项可视化还不支持:
library(regport)
library(survival)
lung = survival::lung
lung$sex = factor(lung$sex)
model = REGModel$new(
lung,
recipe = Surv(time, status) ~ age * sex
)
model
model$get_forest_data()
model$plot_forest()
$build()
并行支持
link to https://github.com/ShixiangWang/ezcox/issues/21
定义Model和Batcher两个对象
model分为数据,公式,focal term,covars,strates等
To be rethink
表格展示
R6
By default, R6 objects have a clone() method, which is a fairly large function. If you do not need this feature, you can save some memory by using cloneable=FALSE.
By default, a class attribute is added to R6 objects. This attribute adds a slight performance penalty because R will attempt to use S3 dispatch when using $ on the object.
可视化