[R] Save rules with asRules() from Rattle into dataframe

2015-02-23 Thread Kim C.
Hello,  I use asRules from the Rattle package to make rules of a rpart decision tree: asRules(rpart1). It gives a rule such as (don't mind the data, it's merely testdata):   Rule number: 18 [Product=153 cover=3 (1%) prob=0.00]    TotalChildren=4.5    Education=Bachelors,Partial

[R] How to read this Rpart decision tree?

2015-02-11 Thread Kim C.
Hi all, In the attachment or this link (http://oi58.tinypic.com/35ic9qc.jpg) you'll find the decision tree I made. I used the Rpart package to make the tree and the rattle package using the fancyRpartPlot to plot it. The data in the tree looks different than about every example I have seen

[R] xerror and xstd are missing from cptable of the Rpart package

2015-02-03 Thread Kim C.
Hello all, I'm making a decision tree with the rpart package. I want to prune the tree and in many tutorials it says to use cptable. Like so: opt - which.min(model_rpart$cptable[, xerror]) The problem is that when I look up model_rpart$cptable it only show the columns CP, nsplit, rel error. So

[R] Decision trees take long or throws memory limit message

2015-01-30 Thread Kim C.
Hi everyone, I try making decision trees and random forest using the packages rpart and party. I'm already stuck at t he first step. Each time when I enter the code either 1. R takes more than an hour. I haven't waited long enough to see if there's a result but it doesn't look like it! When I

[R] Negative length vectors are not allowed error

2015-01-20 Thread Kim C.
Hi all, I have a question concerning an error that occurs when using the inspect() function on a set of rules made by the apriori function from the arules package. I have a dataset with 12 million records. It contains some basic sales information (such as product, customer data). I want to use

Re: [R] Negative length vectors are not allowed error

2015-01-20 Thread Kim C.
brIf the email is still unreadable, please look at the attachment email.txt.nbsp;brDear Martin,brbrThanks for your fast reply. Sorry about the formatting of the previous email. I actually tested it before sending and it came fine when sending to my own account but when I send it to the r-help

Re: [R] Negative length vectors are not allowed error

2015-01-20 Thread Kim C.
Additionally, maybe it's interesting to note that I remember that I first also tried the apriori function but with support = 0.001 (the rest remains the same). It gave me the negative length vector error as well but then I thought to update the packages and it seemed like it worked because

Re: [R] How to get items for both LHS and RHS for only specific columns in arules?‏

2015-01-16 Thread Kim C.
Sorry, I see that the formatting of the e-mail went all wrong and was completely unreadable. you can find a readable version in the attachment and down below (if it will work this time). -- Hi all, I have a question about the arules

[R] How to get items for both LHS and RHS for only specific columns in arules?‏

2015-01-15 Thread Kim C.
Hi all, I have a question about the arules package in R. I hope the example tables are readable in your email, otherwise you can view it in the question.txt in the attachment.Within the apriori function in the arules package, I want the outcome to only contain these two variables in the LHS