Re: [R] Error: evaluation nested too deeply when doing heatmap with binary distfunction
Yes. After I increase the threshould to 1 it got through. Thanks a lot! From: Uwe Ligges <[EMAIL PROTECTED]> To: zhihua li <[EMAIL PROTECTED]> CC: r-help@stat.math.ethz.ch Subject: Re: [R] Error: evaluation nested too deeply when doing heatmap with binary distfunction Date: Thu, 19 Jul 2007 15:18:29 +0200 zhihua li wrote: Hi netters, I have a matrix X of the size (1000,100). The values are from -3 to +3. When I tried heatmap(X, distfun=function(c),dist(c,method="bin"),hclustfun=function(m),hclust(m,method="average")) I got the error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? So, does it help to increase the thresholds? If not, please specify a easily reproducible example that helps us to investigate your problem. Best, Uwe Ligges However, if I used default parameters for distfunction: heatmap(X, hclustfun=function(m),hclust(m,method="average")) there is no error messages at all. But the problem is that I have to use binary method in my disfunction. How can I resolve the problem? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error: evaluation nested too deeply when doing heatmap with binary distfunction
Sorry, that was a typo. Actually there wasn't a comma after 'function(m)' in my expression. So I'll try to increase the threshould to see if that works. Thanks a lot! From: "jim holtman" <[EMAIL PROTECTED]> To: "zhihua li" <[EMAIL PROTECTED]> Subject: Re: [R] Error: evaluation nested too deeply when doing heatmap with binary distfunction Date: Thu, 19 Jul 2007 00:19:54 -0400 you seem to have a syntax error in your statement. There appears to be an extra commas after 'function(m),'. I think is should be: heatmap(X, distfun=function(c)dist(c,method="bin"),hclustfun=function(m)hclust(m,method="average")) On 7/18/07, zhihua li <[EMAIL PROTECTED]> wrote: Hi netters, I have a matrix X of the size (1000,100). The values are from -3 to +3. When I tried heatmap(X, distfun=function(c),dist(c,method="bin"),hclustfun=function(m),hclust(m,method="average")) I got the error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? However, if I used default parameters for distfunction: heatmap(X, hclustfun=function(m),hclust(m,method="average")) there is no error messages at all. But the problem is that I have to use binary method in my disfunction. How can I resolve the problem? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error: evaluation nested too deeply when doing heatmap with binary distfunction
Hi netters, I have a matrix X of the size (1000,100). The values are from -3 to +3. When I tried heatmap(X, distfun=function(c),dist(c,method="bin"),hclustfun=function(m),hclust(m,method="average")) I got the error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? However, if I used default parameters for distfunction: heatmap(X, hclustfun=function(m),hclust(m,method="average")) there is no error messages at all. But the problem is that I have to use binary method in my disfunction. How can I resolve the problem? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] memory error with 64-bit R in linux
Thanks for replying! i don't think i'm paging. i tried to use a smaller version of my matrix and do all the checkings as suggested by jim. The smaller matrix caused another problem, for which I've opened another thread. But i've found something about memory that I don't understand. gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 269577 14.45570995 297.6 8919855 476.4 Vcells 3353395 25.69493567 72.5 15666095 119.6 Does this mean the maximum memory I can use for variables is only 120 M? However, when I tried to check the memory limits: mem.limits() nsize vsize NANA Here it seems the maximum memory is not limited? When there is no R function is being executed, I checked the system process by: ps u PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND 7821 0.0 0.1 10048 2336 pts/0Ss Jul18 0:00 -bash 8076 2.9 24.5 523088 504004 pts/0 S+ Jul18 2:46 /usr/lib64/R/bi 8918 1.5 0.1 9912 2328 pts/1Ss 00:44 0:00 -bash 8962 0.0 0.0 3808 868 pts/1R+ 00:45 0:00 ps u Does this mean R is using 25% of my memory? But my RAM is 2 GB and the objects in R only occupy 40 MB from gc(). Did I interpret it wrong? Thanks a lot! From: "jim holtman" <[EMAIL PROTECTED]> To: "zhihua li" <[EMAIL PROTECTED]> CC: r-help@stat.math.ethz.ch Subject: Re: [R] memory error with 64-bit R in linux Date: Wed, 18 Jul 2007 17:50:31 -0500 Are you paging? That might explain the long run times. How much space are your other objects taking up? The matrix by itself should only require about 13MB if it is numeric. I would guess it is some of the other objects that you have in your working space. Put some gc() in your loop to see how much space is being used. Run it with a subset of the data and see how long it takes. This might give you an estimate of the time, and space, that might be needed for the entire dataset. Do a 'ps' to see how much memory your process is using. Do one every couple of minutes to see if it is growing. You can alway use Rprof() to get an idea of where time is being spent (use it on a small subset). On 7/18/07, zhihua li <[EMAIL PROTECTED]> wrote: Hi netters, I'm using the 64-bit R-2.5.0 on a x86-64 cpu, with an RAM of 2 GB. The operating system is SUSE 10. The system information is: -uname -a Linux someone 2.6.13-15.15-smp #1 SMP Mon Feb 26 14:11:33 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux I used heatmap to process a matrix of the dim [16000,100]. After 3 hours of desperating waiting, R told me: cannot allocate vector of size 896 MB. I know the matrix is very big, but since I have 2 GB of RAM and in a 64-bit system, there should be no problem to deal with a vector smaller than 1 GB? (I was not running any other applications in my system) Does anyone know what's going on? Is there a hardware limit where I have to add more RAM, or is there some way to resolve it softwarely? Also is it possible to speed up the computing (I don't wanna wait another 3 hours to know I get another error message) Thank you in advance! _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] memory error with 64-bit R in linux
Hi netters, I'm using the 64-bit R-2.5.0 on a x86-64 cpu, with an RAM of 2 GB. The operating system is SUSE 10. The system information is: -uname -a Linux someone 2.6.13-15.15-smp #1 SMP Mon Feb 26 14:11:33 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux I used heatmap to process a matrix of the dim [16000,100]. After 3 hours of desperating waiting, R told me: cannot allocate vector of size 896 MB. I know the matrix is very big, but since I have 2 GB of RAM and in a 64-bit system, there should be no problem to deal with a vector smaller than 1 GB? (I was not running any other applications in my system) Does anyone know what's going on? Is there a hardware limit where I have to add more RAM, or is there some way to resolve it softwarely? Also is it possible to speed up the computing (I don't wanna wait another 3 hours to know I get another error message) Thank you in advance! _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] working with R graphics remotely
Hi netters, Now I'm connecting from my local windows machine to a remote linux machine and launch R out there using SSH. When I tried to create grahics, like using plot or heatmap, I cannot see the output. Maybe a new R window displaying the graphics has popped out in the remote machine? Or I need to change some settings for the graphics to display? I don't know. I googled it and tried dev.copy but it didn't work. Can anyone help me here? I need to be able to see the output graphics and save it to a file (like jpeg) Thanks a lot! _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] rJava installation under linux: configuration failed
Hi netter, Recently I was trying to install rJava. The operating system is suse 10.0, and the R versionis 2.5.0. Following the instructions of R Wiki for rJava, I did configuration first: R CMD javareconf and then it showed a series of information, from what it seems that java is in the system and the configuration succeeded. Then I tried to install rJava: install.packages("rJava") following which rJava was downloaded and being installed, but during the last test step it said: can't complie a simple JNL program. Configuration Failed! Did I do something wrong? Or there's something I should do that I didn't? Thanks a lot! Sincerely Yours: Zhihua Li __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] install R under suse: packages dependency
Larry I tried using yast in my shell ( i have the root authority). The yast ncurses did appear in my shell, but i can't control the panel. For example, it says "press F1 for help", but pressing my F1 just resulted in decrease of my screen light (the default function of the F1 key in mac). So even though I launched the yast2 ncurses, I couldn't use it. As for the installation sources, you meant suse or r? Zhihua Li From: Larry Howe <[EMAIL PROTECTED]> To: r-help@stat.math.ethz.ch Subject: Re: [R] install R under suse: packages dependency Date: Wed, 3 May 2006 22:40:28 -0400 On Wednesday 03 May 2006 20:28, zhihua li wrote: > Hi all > > I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login > into the SUSE server, I can't use YAST2, so I have to use rpm -i in the > shell. The system tells me that I need some other packages such as > xorg-x11-fonts-100dpi, blas, libgfortran.so.0(). Is there some website > where I can download and install these packages? Thanks a lot! > > Zhihua Li You CAN use YAST in SSH. Just type yast at the command line. You will get yast in ncurses (text) mode. I recently configured an entire server this way. Do you have root access? You have to have the installation sources configured correctly. Are your installation sources configured? Larry Howe __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] install R under suse: packages dependency
Thanks for your tips. But I don't understand why coping the distribution media to the server's hard disks would enable me to use yast2 remotely with ssh? Actually I can launch yast2 remotely now. After connecting to the remote server by ssh and then typing "yast2", a yast interface will appear within my shell. But I can't seem to control the yast2 panel, as most of the hot keys and arrows on the yast control panal are not working anymore, i.e., I can't navigate through the yast control panel with my local keyboard. It just got "stuck" there in my shell. I can't even quit the yast interface. My local machine is a mac, I don't know if that's the problem. From: Fran�ois Pinard <[EMAIL PROTECTED]> To: zhihua li <[EMAIL PROTECTED]> CC: r-help@stat.math.ethz.ch Subject: Re: [R] install R under suse: packages dependency Date: Wed, 3 May 2006 21:24:24 -0400 [zhihua li] I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login into the SUSE server, I can't use YAST2, I presume this is because you cannot remotely mount the CD's or DVD's? The next time you visit your server, if possible, copy your distribution media to your hard disks, you'll find out that this is really a useful thing to do. You can later use YaST2 to install from the copies you made, even remotely. There is no problem using YaST2 over SSH, either in graphical mode (if you used `ssh -X') or in text mode. In my experience, R 2.3.0 installs painlessly under SuSE 10.0, and needs nothing which is not already available on the distribution media. Should I say, I'm still impressed (even astonished) that R installation succeeds so easily, given the size and complexity of the distribution. -- Fran�ois Pinard http://pinard.progiciels-bpi.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] install R under suse: packages dependency
Hi all I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login into the SUSE server, I can't use YAST2, so I have to use rpm -i in the shell. The system tells me that I need some other packages such as xorg-x11-fonts-100dpi, blas, libgfortran.so.0(). Is there some website where I can download and install these packages? Thanks a lot! Zhihua Li __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] store and retrieve object names in a vector
hi netters, suppose i have a series of objects X1, X2, B1,C1... they all have the same dimensions. i want to combine into one by using cbind: y<-cbind(X1,X2,B1,C1.) but i don't want to type the names of these objects one by one. instead, i've put their names into a vector: x<-c("X1","X2","B1","C1",) i used y<-cbind(x). but what i got is a matrix of the names, not a combination of matrices. anybody know how to handle this? thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to change a dataframe with characters to a numeric matrix?
hi netters, i have a dataframe TEST like this: Y1 Y2 Y3 X1 4 7 8 X2 6 2 Z X3 8 0 1 i would like to change it to a numeric matrix, replacing "Z" with NA Y1 Y2 Y3 X1 4 7 8 X2 6 2 NA X3 8 0 1 i've tried the function data.matrix but it didn't work. is there any easy way to do this? thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to subset rows using regular expression patterns
hi netters, i have a dataframe A with several columns(variables). the elements of column M are character strings. so A$M=c("ab","abc","bcd","ac","abcd","fg",."fl"). i wanna extract all the rows where A$M match some regular expression pattern. for a simple example, let the pattern be just "ab", i wanna subset the rows where A$M="ab" or "abc" or "abcd" or "abXX". i know i can write a loop,using some regular expression pattern functions like grep row by row. but when A's size is pretty large, it's inefficient. could anyone give me a hint about a faster code? thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] a silly question on index of a matrix
Hi netters, This is probably a silly question,but I can't find the answer after searching the R-help archives online. ok, I have a matrix. I know there is a "10" somewhere in it. Now I want to know the index of the element "10" in this matrix. That is, if X[i,j]=10, I want to know i and j. Is there a R function to do this? Just like the "find" function in matlab. Thanks all! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] learning decision trees with one's own scoring functins
Hi netters, I want to learn a decision tree from a series of instances (learning data). The packages tree or rpart can do this quite well, but the scoring functions (splitting criteria) are fixed in these packages, like gini or something. However, I'm going to use another scoring function. At first I wanna modify the R code of tree or rpart and put my own scoring function in. But it seems that tree and rpart perform the splitting procedure by calling external C functions, which I have no access to. So do I have to write R code from scratch to build the tree with my own scoring functions? It's a really tough task. Or r there other R packages that can do similar things with more flexible and extensible code? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to generate argument from a vector automatically
hi netters i have a vector NAMES containing a series of variable names: NAMES=c(x,r,z,m,st,qr,.nn). i wanna fit a regression tree by using the code: my.tree<-tree(y~x+r+z+m+nn,my.dataframe) but i don't want to type out "x+r+z+m++nn" one by one, as there are so many variables. besides, sometimes i wanna put the code in a function. so i need to have the argument "x+r+z+m++nn" generated from NAMES automatically. i've tried the code: paste(X,collpase="+") but it didn't work. could anybody give me a hint? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] quotient and remainder
Dear Dimitris, I've read thoroughly and gooogled in the internet about my question, but got no answer. I think it would be great if there's a doc grouping R functions into different functional categories. Thanks a lot for your replies! From: "Dimitris Rizopoulos" <[EMAIL PROTECTED]> To: "zhihua li" <[EMAIL PROTECTED]> CC: Subject: Re: [R] quotient and remainder Date: Thu, 23 Jun 2005 09:01:08 +0200 11%/%5 [1] 2 11%%5 [1] 1 Best, Dimitris p.s., I'd suggest you to take a look at the "An Introduction to R" doc Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015 Web: http://www.med.kuleuven.be/biostat/ http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm - Original Message - From: "zhihua li" <[EMAIL PROTECTED]> To: Sent: Thursday, June 23, 2005 8:37 AM Subject: [R] quotient and remainder hi netters Is there a function in R that can compute the quotient and remainder of a division calculation? such that when 11 is given as the dividend and 5 the divider, the function returns 2(quotient) and 1(remainder). Thanks a lot! _ ���璐逛��杞� MSN Explorer: http://explorer.msn.com/lccn/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] quotient and remainder
hi netters Is there a function in R that can compute the quotient and remainder of a division calculation? such that when 11 is given as the dividend and 5 the divider, the function returns 2(quotient) and 1(remainder). Thanks a lot! _ 免费下载 MSN Explorer: http://explorer.msn.com/lccn/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to count "associated" factors?
hi netters Suppose I have a factor X, with 10 elements and 3 levels: A B B C A C B A C C . It is easy to count the number of elements for each level: tapply(X,X,length). Now I have another factor Y, which formed a matrix with X: X| A B B C A C B A C C Y| B B C C C A A A B B I wanna count the number of elements for each of these conditions: when X=A and Y=A; when X=A and Y=B; when X=A and Y=C; when X=B and Y=A; when X=B and Y=B; when X=B and Y=C; when X=C and Y=A; when X=C and Y=B; when X=C and Y=C. The code I have written for this task is too complicated, involving a lot of for loops and if conditions. I believe there's some nice code that can do it far more efficiently. Can anyone give me a hint? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to "singlify" entries
hi netters I have a rather simple question. I have a data frame with two variables X and Y, both of which are factors. X has 100 levels while Y has 10 levels only. The data frame has 100 rows in all, so for X the values are unique, and Y has many replicate values. Now I wanna reduce the data frame into 10 rows only, according to the 10 levels of Y. I don't care which value of X is in the same row with Y in the final data frame, as long as it is in agreement with the original data frame. I think this task can be carried out with some function like aggregate. but I failed in figuring it out. Could anybody give me a hint? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] manipulating dataframe according to the values of some columns
hi netters, I'm a newbie to R and there are some very simple problems puzzeled me for two days. I've a dataframe here with several columns different in modes. Two of the columns are special for me: column 1 has the mode "factor" and column 2 has the mode "numeric vectors". The values for column 1 are either "T" or "F". I wanna do two things: Firstly, remove those rows whose values for column 1 are "F"; Secondly,sort the rows in the ascending order of values for column 2. I believe the code to do these things is simple. But I can't figure it out. Please help me! Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] learning networks with a large number of variables and pre-set parents.
I have 100 cases. So i think the dimension is (100, 1). The PC has a pentium 4 CPU with 512M memory. I don't know if it is enough? From: Christian Schulz <[EMAIL PROTECTED]> To: zhihua li <[EMAIL PROTECTED]> CC: r-help@stat.math.ethz.ch Subject: Re: [R] learning networks with a large number of variables and pre-set parents. Date: Sat, 26 Mar 2005 08:13:34 +0100 Hi, you have 1 variables and how many cases? In my experience you need a lot of memory working with this kind/size of data and deal! >> dim(pk.df) [1] 7321 24 >> pk <- network(pk.df) >> pk.prior <- jointprior(pk) Error in rep.default(data, length.out = vl) : cannot allocate vector of length 577368000 Perhaps this is usefuel for you? Ines - Induction of Network Structure (learning probabilistic and possibilistic graphical models) http://fuzzy.cs.uni-magdeburg.de/~borgelt/ines.html regards, Christian zhihua li schrieb: > hi netters: > I have a series of discrete variables which form a network and I want > to learn the network structure from some training data. I could have > used packages like deal but there are two problems. > First of all, I have 1 variables. So the possible network > structure is awfully huge, I don't know how long it will take my PC to > find the highest-scoring network..maybe a month? Secondly, I > have some prior knowledge that only 500 out of the 1 variales are > possible parents. In another word, only those arrows startting from > the 500 variables and pointing to the remaining 99500 variables are > allowed in the network. In deal an assignment to "banlist" should help > me rule out the impossible arrows. But in my case the number of > "impossible arrows" is 500*499+99500*99549, and so the "banlist" would > get unacceptable long. Are there any methods (in deal or other > packages) to specify the parents set in advance? > Thanks a lot! > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] learning networks with a large number of variables andpre-set parents.
I didn't go into details when I asked the question for feat that I would overly specific and blur my real goals. The links between variables are defined as conditional probability distributions. So if the probability distribution of a variable X's value is conditioned on the probability distribution of the values of Y and Z, we say Y and Z are X's parents, and in the network, there are two arrows starting from Y and Z and poining both to X. Clearly it's something like a bayesian network. And I do know some packages, such as deal, can learn the bayesian networks structure from training data. But I'm not sure if deal or other similar packages can handle 1 variables.. Thanks a lot for your information. From: "Shelby Berkowitz" <[EMAIL PROTECTED]> To: "'zhihua li'" <[EMAIL PROTECTED]> Subject: RE: [R] learning networks with a large number of variables andpre-set parents. Date: Fri, 25 Mar 2005 10:00:17 -0500 It's not really clear to me what it is you're trying to do, how you've defined links between these variables, or how you're defining 'highest scoring network', but for manipulating a network of that size you might want to check out Pajek http://vlado.fmf.uni-lj.si/pub/networks/pajek/ network analysis software - there is probably a way from there to extract the network you want, and you can export from it back into R for further analysis. HTH, Shelby >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Achim Zeileis >Sent: Friday, March 25, 2005 5:41 AM >To: zhihua li >Cc: r-help@stat.math.ethz.ch >Subject: Re: [R] learning networks with a large number of >variables andpre-set parents. > > >This is the second time within 24 hours that you cross-posted >the same question to two of the R mailing lists, please read >the posting guide linked at the bottom of this mail on how to >properly ask your questions. > >As for your question: I'm not aware of an R package that would >be able to do what you are looking for, but you might also ask >the maintainer of the package you're specifically interested >in for more details. Z > > > >On Fri, 25 Mar 2005, zhihua li wrote: > >> hi netters: >> >> I have a series of discrete variables which form a network and I >> want to learn the network structure from some training data. I could >> have used packages like deal but there are two problems. >> >> First of all, I have 1 variables. So the possible network >> structure is awfully huge, I don't know how long it will >take my PC to >> find the highest-scoring network..maybe a month? Secondly, I >> have some prior knowledge that only 500 out of the 1 >variales are >> possible parents. In another word, only those arrows startting from >> the 500 variables and pointing to the remaining 99500 variables are >> allowed in the network. In deal an assignment to "banlist" should >> help me rule out the impossible arrows. But in my case the number of >> "impossible arrows" is 500*499+99500*99549, and so the "banlist" >> would get unacceptable long. Are there any methods (in deal or other >> packages) to specify the parents set in advance? >> >> Thanks a lot! >> >> __ >> R-help@stat.math.ethz.ch mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html >> > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read >the posting guide! http://www.R-project.org/posting-guide.html > >-- >No virus found in this incoming message. >Checked by AVG Anti-Virus. >Version: 7.0.308 / Virus Database: 266.8.1 - Release Date: 3/23/2005 > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] learning networks with a large number of variables and pre-set parents.
Sorry, I didn't mean to break the posting rules. I just thought that r-help and r-sig-gr are two seperate mailing list. And the reason I posted my messages twice within 24 hours was that I forgot to add subjects to my first postings, so I'm afraid my first postings would be ignored at all. Thank you. From: Achim Zeileis <[EMAIL PROTECTED]> To: zhihua li <[EMAIL PROTECTED]> CC: r-help@stat.math.ethz.ch Subject: Re: [R] learning networks with a large number of variables and pre-set parents. Date: Fri, 25 Mar 2005 11:40:46 +0100 (CET) This is the second time within 24 hours that you cross-posted the same question to two of the R mailing lists, please read the posting guide linked at the bottom of this mail on how to properly ask your questions. As for your question: I'm not aware of an R package that would be able to do what you are looking for, but you might also ask the maintainer of the package you're specifically interested in for more details. Z On Fri, 25 Mar 2005, zhihua li wrote: > hi netters: > > I have a series of discrete variables which form a network and I want to > learn the network structure from some training data. I could have used > packages like deal but there are two problems. > > First of all, I have 1 variables. So the possible network structure is > awfully huge, I don't know how long it will take my PC to find the > highest-scoring network..maybe a month? > Secondly, I have some prior knowledge that only 500 out of the 1 > variales are possible parents. In another word, only those arrows startting > from the 500 variables and pointing to the remaining 99500 variables are > allowed in the network. In deal an assignment to "banlist" should help me > rule out the impossible arrows. But in my case the number of "impossible > arrows" is 500*499+99500*99549, and so the "banlist" would get > unacceptable long. Are there any methods (in deal or other packages) to > specify the parents set in advance? > > Thanks a lot! > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] learning networks with a large number of variables and pre-set parents.
hi netters: I have a series of discrete variables which form a network and I want to learn the network structure from some training data. I could have used packages like deal but there are two problems. First of all, I have 1 variables. So the possible network structure is awfully huge, I don't know how long it will take my PC to find the highest-scoring network..maybe a month? Secondly, I have some prior knowledge that only 500 out of the 1 variales are possible parents. In another word, only those arrows startting from the 500 variables and pointing to the remaining 99500 variables are allowed in the network. In deal an assignment to "banlist" should help me rule out the impossible arrows. But in my case the number of "impossible arrows" is 500*499+99500*99549, and so the "banlist" would get unacceptable long. Are there any methods (in deal or other packages) to specify the parents set in advance? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] (no subject)
hi netters: I have a series of discrete variables which form a network and I want to learn the network structure from some training data. I could have used packages like deal but there are two problems. First of all, I have 1 variables. So the possible network structure is awfully huge, I don't know how long it will take my PC to find the highest-scoring network..maybe a month? Secondly, I have some prior knowledge that only 500 out of the 1 variales are possible parents. In another word, only those arrows startting from the 500 variables and pointing to the remaining 99500 variables are allowed in the network. In deal an assignment to "banlist" should help me rule out the impossible arrows. But in my case the number of "impossible arrows" is 500*499+99500*99549, and so the "banlist" would get unacceptable long. Are there any methods (in deal or other packages) to specify the parents set in advance? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Are there any R packages that can deduce causal relationship between variables?
Hi netters. Assume Y = {Y1,.Yn} and X = {X1..Xm}, where Yi and Xi are random variables that can take on discrete values from V={0,1,2}. Each Yi in Y has some (0-k) parent variables in X, which means given the values of the parent variables (Xi0Xik) the values of Yi is set. Yi = F(Xi0,...Xik), where F is a mapping function from parents to sons. Considering there are some noise in the data, we can put it in a probabilistic way: the parents and sons have the joint probability distribution P(Yi) = P(Yi|Xi0...Xik). Now I have a training dataset D, which includes a series of instances of Y and X. For each Yi, I want to find its parent variables (Xi0...Xik) in X and the mapping function F so that in most cases Yi = F(Xi0,...Xik). In terms of probabilistics, I want to find the joint probability distribution P(Yi|Xi0...Xik) , that best matches D. I realized it's not a simple task. I've read papers describing how to solve this problem using Bayesian Networks. But it's way too difficult for me to understand. So are there any R packages that can solve this problem in a neat way? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html