similar to: Cross validation for Naive Bayes and Bayes Networks

Displaying 20 results from an estimated 1000 matches similar to: "Cross validation for Naive Bayes and Bayes Networks"

2013 Oct 09
1
Using "cpquery" function from bnlearn package inside loop
Hi everyone, I'm attempting to use the bnlearn package to calculate conditional probabilities, and I'm running into a problem when the "cpquery" function is used within a loop. I've created an example, shown below, using data included with the package. When using the cpquery function in a loop, a variable created in the loop ("evi" in the example) is not
2012 Sep 26
1
Specifying a response variable in a Bayesian network
I'm trying to teach myself about Bayesian Networks and am working with the following data and the bnlearn package. I understand the conceptual aspects of BNs, but I'm not sure how to specify the response variables in R when constructing a dag plot. I've cecked ?hc and done numerous google searches without luck. Can anyone help? library("bnlearn")
2007 Oct 04
2
bnlearn package compilation failure on MacOSX
Hi all. I've recently uploaded a package (bnlearn) to CRAN. It builds fine on both Linux (32 and 64 bit) and Windows, but fails on MacOSX ix86 because of C90 vs C99 issues: http://www.r-project.org/nosvn/R.check/r-patched-macosx-ix86/bnlearn-00install.html Since I've no MacOSX machine at hand, I would like to ask you: why is C99 not the default for gcc on MacOSX ix86? Is it safe to
2017 Jul 13
2
bnlearn and cpquery
Hi all I have built a Bayesian network using discrete data using the bnlearn package. When I try to run the cpquery function on this data it returns NaN for some some cases. Running the cpquery in debug mode for such a case (n=10^5, method="lw") creates the following output: generated a grand total of 1e+05 samples. > event has a probability mass of 14982.37 out of
2017 Jul 13
0
bnlearn and cpquery
Dear Ross, This usually happen because you have parameters with a value of NaN in your network, because the data you estimate the network from are sparse and you are using maximum likelihood estimates. You should either 1) use simpler networks for which you can estimate all conditional distributions from the data or 2) use posterior estimates for the parameters. Cheers, Marco On 13 July
2012 Apr 11
1
bayesian gene network construction
Hello: I have looked at the bnlearn and deal packages for infering bayesian network. Can anyone suggest any other suitable package for constructing bayesian gene regulatory network using gene expression data? Thanks! John [[alternative HTML version deleted]]
2008 Jul 01
2
Prediction with Bayesian Network?
Hi, I am interested in using a bayesian network as a predictor (machine learning); however, I can't get any of the implementations (deal, nblearn) to learn & predict stuff. Shouldn't there also be probabilites for each node after the learning phase, how can I access these? Cheers, Stephan -- View this message in context:
2017 Jun 15
1
(no subject)
Hi every one I am working on shiny app using bnlearn for Bayesian networks and using r studio I get a fatal error and when I use R GUI I get this error ** caught segfault *** address 0xfffffffc0fcd6248, cause 'memory not mapped' Traceback: 1: .Call("mappred", node = node, fitted = fitted, data = data, n = as.integer(n), from = from, prob = prob, debug = debug) 2:
2013 Apr 10
1
bnlearn: how to compute boot strength with mmhc and a blacklist
Dear R-help list: I have two related questions regarding the functions boot.strength and custom.strength in bnlearn. 1) I am using the following commands (on a set of continuous data, the example here run on fake data): > myblacklist<-data.frame(from=c("x1", "x1", "x1", "x2", "x2", "x2")) , to=c("x2",
2007 Oct 30
1
NAIVE BAYES with 10-fold cross validation
hi there!! i am trying to implement the code of the e1071 package for naive bayes, but it doens't really work, any ideas?? i am very glad about any help!! i need a naive bayes with 10-fold cross validation: code: library(e1071) model <- naiveBayes(code ~ ., mydata) tune.control <- tune.control(random = FALSE, nrepeat = 1, repeat.aggregate = min, sampling = c("cross"),
2013 Nov 30
1
bnlearn and very large datasets (> 1 million observations)
Hi Anyone have experience with very large datasets and the Bayesian Network package, bnlearn? In my experience R doesn't react well to very large datasets. Is there a way to divide up the dataset into pieces and incrementally learn the network with the pieces? This would also be helpful incase R crashes, because I could save the network after learning each piece. Thank you.
2009 May 06
1
How to do Naive Bayes in R?
I am wondering if anybody here have a simple example in R for Naive Bayes. For example, I can do k-means clustering on the "iris" data - data(iris) cl <- kmeans(iris[,1:4], 3) cl$cluster cbind(1:150,iris$Species) =========== But how to do Naive Bayes classification in the same "iris" data? Many thanks! -- View this message in context:
2011 Jul 07
1
Naive Bayes Classifier
Hi, Currently I testing the packets that contain built-in features for classification. Actually I looked packages such as: e1071, Klar, Caret, CORElearn. However, from what I noticed when building a naive Bayesian classifier, that they package use of the finite mixture model to estimate P (x | C) and using a normal distribution. In my research I use binary data and I want modeled P (x | C), eg the
2007 Sep 25
1
10- fold cross validation for naive bayes(e1071)
Hallo! I would need a code for 10-fold cross validation for the classifiers Naive Bayes and svm (e1071) package. Has there already been done something like that? I tried to do it myself by applying the tune function first: library(e1071) tune.control <- tune.control(random =F, nrepeat=1, repeat.aggregate=min.,sampling=c("cross"),sampling.aggregate=mean, cross=10, best.model=T,
2011 Feb 08
1
Naive Bayes Issue - Can't Predict - Error is "Error in log(sapply(attribs...)
Hey guys, I can't get my Naive Bayes model to predict. Forgive me if its simple... I've tried about everything and can't get it to work. Reproduceable code below. Thank you, Mike -- Michael Schumacher Manager Data & Analytics - ValueClick mike.schumacher@gmail.com * Functional Example Code from UCLA:
2012 Aug 02
1
Naive Bayes in R
I'm developing a naive bayes in R. I have the following data and am trying to predict on returned (class). dat = data.frame(home=c(0,1,1,0,0), gender=c("M","M","F","M","F"), returned=c(0,0,1,1,0)) str(dat) dat$home <- as.factor(dat$home) dat$returned <- as.factor(dat$returned) library(e1071) m <- naiveBayes(returned ~ ., dat) m
2012 Jul 05
1
Different level set when predicting with e1071's Naive Bayes classifier
Hi! I'm using the Naive Bayes classifier provided by the e1071 package ( http://cran.r-project.org/web/packages/e1071) and I've noticed that the predict function has a different behavior when the level set of the columns used for prediction is different from the ones used for fitting. From inspecting the predict.naiveBayes I came to the conclusion that this is due to the conversion of
2001 May 16
7
Naive Bayes Classifier
Dear r-users, I am looking for an implementation of the Naive Bayes classifier for a multi-class classification problem. I can not even find the Naive Bayes classifier for two classes, though I can not believe it is not available. Can anyone help me? Uschi -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2011 Feb 25
0
e1071's Naive Bayes with Weighted Data
Hello fellow R programmers, I'm trying to use package e1071's naiveBayes function to create a model with weighted data. See example below, variable "d" is a count variable that provides the # of records for the given observation combination. Is anyone aware of a "weight" argument to this method? I've been unsuccessful in my research. Thanks, Mike
2012 May 04
1
weird predict function error when I use naive bayes
Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. > m<- naiveBayes(iris[,1], iris[,5]) > table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric argument to mathematical function However, when I use two predictors, there is not error any more. > m<-