bmihaljevic / bnclassify

Learning Discrete Bayesian Network Classifiers from Data
18 stars 10 forks source link

Sparse information of argument #62

Open mlindsk opened 2 years ago

mlindsk commented 2 years ago

Hi,

The information about the argument dag_learner in function bnc could be improved. There is no information about the possible values. There are of course some examples; but I wonder if there are other possibilities as well. A small description of what each method does is also welcome - I guess you could describe a TAN in very few words and likewise for naive bayes etc.

In addition, a wrapper along the lines: as_igraph <- function(x, ...) igraph::graph_from_edgelist(x$.dag$edges, ...) would also be awesome.

/Mads

bmihaljevic commented 2 years ago

Thanks a lot for the thoughtful input.

I agree with your comment regarding the documentation of bnc; I just had a look at it and, indeed, there is no list of possible values.

Rather than explaining the TAN and the naive Bayes in the functions' documentation, perhaps a better approach would be to point to the vignettes that do contain such descriptions. I think I would prefer this so to keep the functions' documentation as lean as possible.

Finally, the reason I have not provided a wrapper for igraph is that I have never personally used the igraph package. Would you mind saying what do you use it for? Mainly for plotting? One reason I might hesitate to include such a wrapper is to avoid introducing an additional package dependency, as these can complicate the compliance with CRAN's checks.

It only remains for me to find some time to incorporate your comments on improving the documentation. In the meanwhile, if you are interested in contributing in any way to the package - you are most welcome.

mlindsk commented 2 years ago

Yes, I agree with you about looking up such information in the vignette. And I agree, that you shouldn't bloat up dependencies if the package is not already using igraph (I actually didn't checked it; sorry).

I had an idea of benchmarking TAN classifiers when the underlying graph is "far from" the TAN assumption and then I planned on using my own package, jti (which relies on igraph objects), to classify. I never initiated the project though. For the record, jti, is complementary to gRain, not a competitor. jti uses sparse tables for table operations and can speed things up for large networks with sparse tables.

/Mads

bmihaljevic commented 2 years ago

Great to know about jit. Could be really useful for bnclassify.

mlindsk commented 2 years ago

Reach out if, one day, you decide to give it a go.