jpmml / jpmml-converter

Java library for authoring PMML
GNU Affero General Public License v3.0
15 stars 4 forks source link

Request Support for 'survival::coxph' models #3

Closed benneely closed 9 years ago

benneely commented 9 years ago

Under PMML - General Regression, CoxRegression is listed as a model type. Would it be easy to add support for this modeling framework?:

test   <- survival::coxph(survival::Surv(futime,fustat) ~ age + rx + ecog.ps, survival::ovarian, x=TRUE)
print(test)
library(r2pmml)
r2pmml(test, "test.pmml")
vruusmann commented 9 years ago

You can already use the standard pmml package to perform the conversion of survival::coxph models:

library("pmml")
saveXML(pmml(test), "coxph.pmml")

I haven't tested if it is possible to train coxph models using the caret package. Maybe such coxph model objects are incompatible with the standard exporter code (eg. see issue #1), which would justify the development of another converter class.