paobranco / UBL

An R package for utility-based learning
32 stars 11 forks source link

HVDM distance #17

Closed vocarvalho closed 3 years ago

vocarvalho commented 3 years ago

I found your UBL package. This is helping me a lot. However, I am having problems with the HVDM distance with nominal features. I looked at the code on github, I did a lot of testing, but I can't understand what's going on. Attached I am sending some tests I did to understand. The distance values are not what I expected. Could you help me understand what's going on?

Code col1 <- factor(c("a", "a", "c", "c")) col2 <- factor(c("b", "d", "d", "g")) col3 <- factor(c("c", "b", "e", "h")) col4 <- factor(c("x", "x", "y", "y")) df <- data.frame(col1, col2, col3, col4) dist2 <- distances(4, df, "HVDM") dist2

code ubl comp

Computation.xls

paobranco commented 3 years ago

Hello,

first of all thank you for your interest on UBL package!

A new version (UBL 0.0.7) was released on CRAN in March 29, 2021. This version already corrects this issue with HVDM metric. Please download the new UBL version.

vocarvalho commented 3 years ago

Thanks a lot.