1
$\begingroup$

As stated in R documentation (discretization - R (from CRAN)), R package discretizion offers the function Chi2, which comes to life in the following papers:

Liu, H. and Setiono, R. (1995). Chi2: Feature selection and discretization of numeric attributes, Tools with Artificial Intelligence, 388–391.

Liu, H. and Setiono, R. (1997). Feature selection and discretization, IEEE transactions on knowledge and data engineering, Vol.9, no.4, 642–645.

I wrote the following R programming language code, in which I have set alpha and delta equal to the ones set in the papers above. Finally, the following code prints out the discretized dataframe. I used Iris dataframe, as in one of the examples in the two papers.

library(discretization)
data(iris)
df1 <- iris[FALSE,]
for(i in 1:nrow(iris)){
    if(i %% 2 != 0){
        df1 <- rbind(df1, iris[i,])
    }
}
chi2(df1, alp=0.5, del=0.05)$Disc.data

The two papers above state that, with alfa = 0.5 and delta = 5%, and that "the originally odd numbered data are selected for training (75 patterns) and rest for testing (75 patterns)". Iris attributes selected are only two. The point is that, observing the dataframe printed out by the last instruction, you can see that no attribute is removed. The discretized data frame still have 4 attributes discretized: if I correctly understood the above papers, Sepal Length and Sepal Width should have been both discretized in just one interval by Chi2 algorithm.

$\endgroup$
8
  • 2
    $\begingroup$ General suggestion without knowing the details in such cases is: first read the documentation carefully if any deviations from the original procedure are noted/explained. If not, contact the package's maintainer. $\endgroup$
    – Helix123
    Nov 23 '16 at 14:27
  • $\begingroup$ Thank you. I didn't find explicit signals of deviations from original procedure, so that I wrote to the package's mainainer. I hope he will be not too much busy $\endgroup$
    – Peter
    Nov 23 '16 at 16:56
  • $\begingroup$ I think this question will be a tumbleweed, unfortunately $\endgroup$
    – Peter
    Nov 23 '16 at 16:57
  • $\begingroup$ Seems to be a cross-post to r-help: stat.ethz.ch/pipermail/r-help/2016-November/443356.html $\endgroup$
    – Helix123
    Nov 23 '16 at 20:07
  • $\begingroup$ I wrote that post, after ayone didn't reply here, @Helix123 $\endgroup$
    – Peter
    Nov 24 '16 at 10:13
0
$\begingroup$

The decreSigLevel() function of phase1 and phase2 written in R code differs from the criteria discussed in the original paper. Please review the contents of the original papers and R code again.

$\endgroup$
1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.