Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从给我的数据集中生成一些派生字段。下面是一个这样的派生字段的示例。我从出生日期计算年龄。有没有办法为此类计算生成 pmml 代码。
年龄 <- as.numeric(format(Sys.Date(), "%Y")) - as.numeric(format(as.Date(birth_date, "%m/%d/%Y"), "%Y" ))
您应该查看PMML 内置函数 dateDaysSinceYear和dateSecondsSinceYear.
dateDaysSinceYear
dateSecondsSinceYear