similar to: Combining multiple dependent variables for machine learning -- fortunes candidate?

Displaying 20 results from an estimated 5000 matches similar to: "Combining multiple dependent variables for machine learning -- fortunes candidate?"

2011 Aug 01
1
Inserting column in between -- "better" way?
Folks: I consider my reply below rather clumsy: One has to keep track of index numbers other than that which is inserted and must separately change column names. Is there as "essentially better" way to do this, either via base R or via an R package. I leave it to you to define "essentially better." Thanks. Cheers, Bert On Mon, Aug 1, 2011 at 10:17 AM, Bert Gunter
2011 Jun 18
1
"Justify" PCA? -- was: Bartlett's Test of Sphericity
Apologies for the obvious, but just to clarify: there is no reason to "justify" a PCA -- it's just an eigen decomposition of a matrix and is therefore "justified" by linear algebra. If one wants to determine whether some subset of the eigenvectors = principal components suffice to "represent" the data in some sense, then that is where distributional
2011 May 18
3
R Style Guide -- Was Post-hoc tests in MASS using glm.nb
Thanks Bill. Do you and others think that a link to this guide (or another)should be included in the Posting Guide and/or R FAQ? -- Bert On Tue, May 17, 2011 at 4:07 PM, <Bill.Venables at csiro.au> wrote: > Amen to all of that, Bert. ?Nicely put. ?The google style guide (not perfect, but a thoughtful contribution on these kinds of issues, has avoiding attach() as its very first line.
2011 May 27
1
FW: FW: Unable to Plot using headers (converting to Numeric)
I tried command as.numeric(Qty) #converting column"Qty" in object "demand" to numeric. However it remains a non-numeric value. What is the best way to convert a column of data to a numeric value in R? What is the best way to convert dates into a numeric format (or some format able to be used in an x,y scatter) while still maintaining its inherent "date" property?
2011 Mar 16
1
linear regression in a data.frame using recast -- A fortunes candidate??
Ha! -- A fortunes candidate? -- Bert > > If this is really a time series, then you will have serious validity > problems due to auto-correlation among non-independent units. (But if you > are just searching for a way to pull the wool over the eyes of the > statistically uninformed, then I guess there's no stopping you.) > > -- > > David Winsemius, MD > West
2018 May 11
0
add one variable to a data frame
Sarah's solutions are good, and here's another, even more basic: tmp1 <- unique(dat1$B) tmp2 <- seq_along(tmp1) dat1$C <- tmp2[ match( dat1$B, tmp1) ] > dat1 N B C 1 1 29_log 1 2 2 29_log 1 3 3 29_log 1 4 4 27_cat 2 5 5 27_cat 2 6 6 1_log 3 7 7 1_log 3 8 8 1_log 3 9 9 1_log 3 10 10 1_log 3 11 11 3_cat 4 12 12 3_cat 4 As a single line
2018 Mar 17
0
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
That does clarify for me that you're missing a step: I didn't clearly follow your description at first. corrplot expects a correlation matrix, not your original data. You need to use cor() first. That's pretty clear in the documentation. See for instance the examples: data(mtcars) M <- cor(mtcars) corrplot(M) Sarah On Sat, Mar 17, 2018 at 12:00 PM Shivi Bhatia <shivipmp82 at
2018 May 11
2
add one variable to a data frame
Sarah et. al.: As a matter of aesthetics (i.e. my personal ocd-ness) I prefer using the public API of an object, i.e. *not* to makes use of the representation of a factor as essentially an integer vector with labels, but rather to use its documented behavior. (Feel free to ignore this remark!) Anyway, >cumsum(!duplicated(dat1$B)) [1] 1 1 1 2 2 3 3 3 3 3 4 4 will do it. This is very
2012 Mar 11
0
[R-sig-eco] Landscape ecology in R
Hi Manuel, I've taken the liberty of adding the r-help list back to this email, even though you sent your reply just to me, so that others may contribute. On Fri, Mar 9, 2012 at 6:27 PM, Manuel Sp?nola <mspinola10 at gmail.com> wrote: > Thank you Sarah, > > I am thinking more on?habitat mapping and landscape metrics. Then you've probably seen the adehabitat* and SDMTools
2012 Jun 19
0
[R-sig-Geo] Help in simultaneous equations
On Tue, Jun 19, 2012 at 1:11 PM, Saima Bashir <saimabashir11 at yahoo.com> wrote: > Hi Sarah, > > I have installed and loaded them into R but get same error. > > I am using four equations, cross-section data, version R i386 2.15.0. That is by no means all the information I requested in my original reply, or all that is requested in the posting guide. Nobody can help you
2016 Apr 15
0
Decision Tree and Random Forrest
Since you only have 3 predictors, each categorical with a small number of categories, you can use expand.grid to make a data.frame containing all possible combinations and give that the predict method for your model to get all possible predictions. Something like the following untested code. newdata <- expand.grid( Humidity = levels(Humidity), #(High, Medium,Low)
2008 Jun 10
0
TR : Probs with paste
Thanks for the messages. What I probably should have explained is that I have a data.frame "file" with variables named "A", "B", etc.. I wanted to use paste () to pull the names "file$A", "file$B", etc. and stick them in table() and so get an output of table(file$A). For the record, someone read my thinking and sent the following solution which
2011 Feb 26
0
Weird behavior of a 2-by-2 matrix indicies
The real weird thing is I wrote "weird" and it comes out "wired"... The background is that I did a lot of sparse matrices calculations. Therefore need some indices tweaks, e.g subtract a block from a big matrix. Then I just create an indicies matrix and use it directly as a vector since a matrix is just a vector with dimensions attributed in R. I know I can convert them to a
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",", header = TRUE) ? library(rpart) ? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT) Please: Show me the tree. Mark -------- Original Message -------- Subject: Re: [R] help with rpart From: "Stephen Milborrow" <[1]milbo at sonic.net>
2010 Feb 05
0
remove a row from a dataframe, row names disappear - solution
Thank you Sarah.I'm glad it was a quick fix: On Fri, Feb 5, 2010 at 8:50 AM, Sarah Goslee <> wrote: > You're not only removing a row of data, you are invoking the default > behavior of subset, which is to collapse the subsetted result to the > smallest possible type, which in this case is a vector. Vectors have > no rows, and thus no row names. > > You need the
2011 Jul 29
1
help with predict.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",", header = TRUE) ? library(rpart) ? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT) predict(fit,data[4,]) plot only reveals part of the tree in contrast to the results on obtains with CART or C5 -------- Original Message -------- Subject: Re: [R] help with rpart From: Sarah
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in that group then has of being in the response class. Just like my email in the beginning i need the output that looks like if A and if B and if C then %77 it will be D. The examples you provided are just simply not similar. They are different and would take interpretation to get what i need. On Apr 14, 2016 1:26 AM,
2018 May 11
3
add one variable to a data frame
Hi Sarah, Thank you so much!! I got your good ideas. Ding -----Original Message----- From: Sarah Goslee [mailto:sarah.goslee at gmail.com] Sent: Friday, May 11, 2018 11:40 AM To: Ding, Yuan Chun Cc: r-help mailing list Subject: Re: [R] add one variable to a data frame [Attention: This email came from an external source. Do not open attachments or click on links from unknown senders or
2016 Apr 14
3
Decision Tree and Random Forrest
I still need the output to match my requiremnt in my original post. With decision rules "clusters" and probability attached to them. The examples are sort of similar. You just provided links to general info about trees. Sent from my Verizon, Samsung Galaxy smartphone<div> </div><div> </div><!-- originalMessage --><div>-------- Original message
2004 Aug 12
0
"new" package fortunes 1.0-3
Dear useRs, I used the summer months to work on all of my packages, and so this is the first of a sequence of announcements of "new" or updated packages. The "new" packages are new in the sense that previous versions had been on CRAN for some months but hadn't been announced to the R community via this list until now. All packages are available from the CRAN master site