0
$\begingroup$

Bellow I have some code, where the code works with categorical data but produces the error (for the numerical data): Error in data.type(x) : variable chas is not supported in bnlearn (type: integer).

How can I apply Structure learning for numerical type of data

#This does work    
library(bnlearn)
bn_df <- data.frame(coronary)
res <- hc(bn_df)
plot(res)
#This does not work
library(MASS)
attach(Boston)
res <- hc(Boston)
plot(res)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.