Re: [R] Classification Tree Prediction Error

2020-08-25 Thread John Smith
As Bert advised correctly, this is not an R programming question. There is some misunderstanding on how training//test data work together in predictions. Suppose your test data has only one class. Therefore, you can get the following rate by betting on the majority class every time, again using

Re: [R] Classification Tree Prediction Error

2020-08-25 Thread Xu Jun
Thank you for your comment! This tree function is from the tree package. Although it might be a pure statistical question, it could be related to how the tree function is used. I will explore the site that you suggested. But if there is anyone who can figure it out off the top of their head, I'd

Re: [R] Classification Tree Prediction Error

2020-08-24 Thread Bert Gunter
Purely statistical questions -- as opposed to R programming queries -- are generally off topic here. Here is where they are on topic: https://stats.stackexchange.com/ Suggestion: when you post, do include the package name where you get tree() from, as there might be more than one with this

[R] Classification Tree Prediction Error

2020-08-24 Thread Xu Jun
Dear all R experts, I have a question about using cross-validation to assess results estimated from a classification tree model. I annotated what each line does in the R code chunk below. Basically, I split the data, named usedta, into 70% vs. 30%, with the training set having 70% and the test

Re: [R] Classification of wind events

2020-05-19 Thread Abby Spurdle
I was impressed by Jim's effort. So, I thought I'd try to produce an exploratory plot. I've adapted some of his code. The following script produces a heatmap for a cylindrical density estimate. Bright areas are (mathematical) regions of high density. However, the interpretation is complicated by

Re: [R] Classification of wind events

2020-05-18 Thread Jim Lemon
Sorry, I should know better: rollmean<-function(x,width=2) { lenx<-length(x) result<-rep(NA,lenx) for(i in 1:lenx) { chunk<-i:(i+width-1) if(i(lenx-width)) chunk<-c(i:lenx,rep(lenx,i-(width-1))) result[i]<-mean(x[chunk]) } return(result) } I forgot to replace this with: library(zoo)

Re: [R] Classification of wind events

2020-05-18 Thread Jeff Newmiller
? source("../rollmean.R") ? On May 18, 2020 4:11:52 AM PDT, Jim Lemon wrote: >Hi Stefano, >If I understand your request, this may also help, Uses the same data >transformations as my previous email. > >png("SS_foehn.png") >plot(mydf$data_POSIX, > ifelse(mydf$main_dir %in%

Re: [R] Classification of wind events

2020-05-18 Thread Jeff Newmiller
gt; > >Da: Jeff Newmiller [jdnew...@dcn.davis.ca.us] >Inviato: sabato 16 maggio 2020 21.04 >A: Stefano Sofia; Jim Lemon; r-help mailing list >Oggetto: RE: [R] Classification of wind events > >Please run your code before posting it... you fo

Re: [R] Classification of wind events

2020-05-18 Thread Jim Lemon
Hi Stefano, If I understand your request, this may also help, Uses the same data transformations as my previous email. png("SS_foehn.png") plot(mydf$data_POSIX, ifelse(mydf$main_dir %in% c("WSW","SW"),mydf$max_speed,NA), type="b",main="Wind speed (WSW or SW) by time", xlab="Time of

Re: [R] Classification of wind events

2020-05-18 Thread Stefano Sofia
A: Stefano Sofia; Jim Lemon; r-help mailing list Oggetto: RE: [R] Classification of wind events Please run your code before posting it... you forgot the quotes in your main_dir column. first_day_POSIX <- as.POSIXct("2020-02-19-00-00", format="%Y-%m-%d-%H-%M") last_day_POSIX

Re: [R] Classification of wind events

2020-05-17 Thread Jim Lemon
> > > min")) > > > > > > mydf$main_dir <- c(WSW, WSW, SW, SW, W, WSW, WSW, WSW, W, W, SW, WSW, > > > SSW, S, SW, SW, WSW, WNW, W, WSW, WSW, SE, SE, SE, NW, NNE, ENE, SE, NNW, > > > NW, NW, NW, NW, NW, NW, NE, NW, NW, NW, NW, NW, N, WNW, NW, NNW,

Re: [R] Classification of wind events

2020-05-17 Thread Abby Spurdle
t; Stefano > > > > > > (oo) > > --oOO--( )--OOo---- > > Stefano Sofia PhD > > Civil Protection - Marche Region > > Meteo Section > > Snow Section > > Via del Colle Ameno 5 > > 60126 Torrette di Ancona, Ancona > >

Re: [R] Classification of wind events

2020-05-17 Thread Abby Spurdle
> 60126 Torrette di Ancona, Ancona > Uff: 071 806 7743 > E-mail: stefano.so...@regione.marche.it > ---Oo-oO > > > Da: Jim Lemon [drjimle...@gmail.com] > Inviato: mercoledì 13 maggio 2020 11.01 > A: Stefano Sof

Re: [R] Classification of wind events

2020-05-16 Thread Jeff Newmiller
, NW, NW, NW, N, WNW, NW, NNW, >NNW, NW, NW, NW, WNW, ESE, W, WSW, SW, SW, SW, WSW, SW, S, S, SSW, SW, >WSW, WSW, WSW, WSW, WSW, WSW, WSW, SW, WSW, WSW, WSW, WSW, SW, SW, WSW, >WSW, WSW, WSW, WSW, SW, SW, SW, SW, SW, SW, SW, SW, SW, WSW, WSW, WSW, >WSW, SW, SW, SW, SW, WSW, SW, SW, SW, SW, SW, WSW, SW, SW, W, WSW, WSW, >SSW, S, WNW, SW

Re: [R] Classification of wind events

2020-05-16 Thread Stefano Sofia
__ Da: Jim Lemon [drjimle...@gmail.com] Inviato: mercoledì 13 maggio 2020 11.01 A: Stefano Sofia; r-help mailing list Oggetto: Re: [R] Classification of wind events Hi Stefano, Given only one observation point you will find it difficult. If your automatic weather station is in the low area wher

Re: [R] Classification of wind events

2020-05-13 Thread Jim Lemon
Hi Stefano, Given only one observation point you will find it difficult. If your automatic weather station is in the low area where the foehn wind is felt, it can only be distinguished from a dry katabatic wind if the upwind conditions are known. There is a similar but milder version of this in

Re: [R] Classification of wind events

2020-05-12 Thread Jeff Newmiller
Please make a reproducible R example of input and output. On May 12, 2020 1:11:41 AM PDT, Stefano Sofia wrote: >Dear R list users, >I am aware that this question is not strictly related, at the present >moment, to R code and it is more general. Please forgive me, but I need >to share my

[R] Classification of wind events

2020-05-12 Thread Stefano Sofia
Dear R list users, I am aware that this question is not strictly related, at the present moment, to R code and it is more general. Please forgive me, but I need to share my thoughts with you. Foehn conditions on the southern slope of Alps happen with strong northerly flows that impact

Re: [R] Classification and Regression Tree for Survival Analysis

2017-06-13 Thread Achim Zeileis
On Tue, 13 Jun 2017, Dimitrie Siriopol via R-help wrote: I am trying to use the CART in a survival analysis. I have three variables of interest (all 3 ordinal - x, y and z, each of them with 5 categories) from which I want to make smaller groups (just an example 1st category from X variable

Re: [R] Classification and Regression Tree for Survival Analysis

2017-06-13 Thread Bert Gunter
1. Please read and follow the posting guide below. Your post does not meet the guidelines. 2. Search before posting! e.g. on rseek.org: "Regression trees survival analysis" in which you will find: https://cran.r-project.org/web/views/MachineLearning.html -- Bert Bert Gunter "The trouble

[R] Classification and Regression Tree for Survival Analysis

2017-06-13 Thread Dimitrie Siriopol via R-help
I am trying to use the CART in a survival analysis. I have three variables of interest (all 3 ordinal - x, y and z, each of them with 5 categories) from which I want to make smaller groups (just an example 1st category from X variable with the 2nd and 3rd categories from the Y category and 2, 3

[R] Classification of polynomial regression: simple or multiple (conceptual doubt)

2013-12-20 Thread Jose Claudio Faria
Dear list, I'm posting in the R-help list due to: - Not knowing a better place for it; - I would like to know the opinion of more specialized people. What is the best place to classify polynomial regressions (Y = bo + b1X + b2X^2 + ... + bnX^n): single or multiple linear regression? Regards, --

Re: [R] Classification of polynomial regression: simple or multiple (conceptual doubt)

2013-12-20 Thread Gilson Carvalho
Dear Dr. José Faria, I think that the best category to put polynomial regressions is single regressions. Although, in polynomial regressions there are more then one term as in multiple regressions this is an adjustment consequence, not a design consequence. So, to me this is sufficient to justify

[R] Classification of Multivariate Time Series

2013-05-27 Thread Lorenzo Isella
Dear All, Apologies for not posting a code snippet, but I really need a pointer about a methodology to look at my data and possibly some R package which can ease my task. I am given a set consisting of several multivariate noisy time series, let's call it {A}. Each A_i in {A}, in turn, consists of

Re: [R] Classification of Multivariate Time Series

2013-05-27 Thread Emre Sahin
Did you have a look at Dynamic Time Warping and dtw package? Best, E. On Mon, May 27, 2013 at 01:34:42PM +0200, Lorenzo Isella wrote: Dear All, Apologies for not posting a code snippet, but I really need a pointer about a methodology to look at my data and possibly some R package which can

Re: [R] Classification of Multivariate Time Series

2013-05-27 Thread Roy Mendelssohn - NOAA Federal
Look at: State - Space Discrimination and Clustering of. Atmospheric Time Series Data. Based on Kullback Information Measures. Thomas Bengtsson If you Google the topic, there are host of other papers too, but the one meshes with exiting star-space methods. -Roy On May 27, 2013, at 4:34 AM,

[R] Classification by Standard Deviation of Lognormal with Weight

2013-01-18 Thread Fiona
Hi, We got a actuarial question which cannot be solved in Excel, so we are wondering if R can help us on it. As the sample table below, variable X has 50 different values and the weighted Y has a lognormal distribution. We want to make X into four or five classes, based on the standard

[R] Classification methods - which one?

2012-11-20 Thread Pedro Silva
e Gestão Universidade Católica Portuguesa / Porto www.feg.porto.ucp.pt Date: Mon, 19 Nov 2012 20:53:10 +0100 From: Peter Kupfer peter.kup...@me.com To: Max Kuhn mxk...@gmail.com Cc: r-help@r-project.org r-help@r-project.org Subject: Re: [R] Classification methods - which one? Message-ID: ed56664a

[R] Classification methods - which one?

2012-11-19 Thread Peter Kupfer
Dear all, i searched for some classification methods and I have no glue if i took the right once. My problem: I have a matrix with 17000 rows and 33 colums (genes and patients). The patients are grouped into 3 diseases. No I want to classify the patients and for sure i want to know which rows

Re: [R] Classification methods - which one?

2012-11-19 Thread Peter Kupfer
Dear Max, first: Thanks a lot for your suggestion and the open words about methods in real life. I guess: Thats my problem. Regarding my analysis: Yes, thats the problem and I have to coerce to do this analysis regarding lack of time to start something/other methods. So you suggest Linear

[R] Classification with GBM and imbalanced class sizes

2012-07-31 Thread Yohann R
Hi all I'm dealing with a supervised binary classification issue. I'd like to use the GBM package to classify individuals as uninfected/infected. I have 15 times more uninfected than infected individuals. I was wondering if GBM models suffer in the case of imbalanced class sizes? I didn't find

Re: [R] classification using zero-inflated negative binomial mixture model

2012-07-09 Thread Ben Bolker
Kai Ying yingk at iastate.edu writes: Hi, I want using zero-inflated negative binomial regression model to classify data(a vector of data), that is I want know each observed value is more likely belong to the zero or count distribution(better with relative probability). My data is some

[R] classification using zero-inflated negative binomial mixture model

2012-07-08 Thread Kai Ying
Hi, I want using zero-inflated negative binomial regression model to classify data(a vector of data), that is I want know each observed value is more likely belong to the zero or count distribution(better with relative probability). My data is some like: count site samp 1290911

[R] Classification of Cluster-Correlated data

2012-05-10 Thread Yohann R
Dear R-Help, I'm dealing with a supervized binary classification issue. My dataset is composed of 1500 individuals, living in 600 households. I have approximately 4000 variables to classify my subjects as infected/uninfected. I was wondering how would it be possible to account for the

[R] Classification by range

2012-03-08 Thread Ajay Askoolum
Given studentNumbers-10; subjEnglish-sample(-1:100,studentNumbers,replace=TRUE); when subEnglish =0, 'U'     =39, 'F'     =49 'D'     =59, 'C'     =69, 'B'     =79,'A'    

Re: [R] Classification by range

2012-03-08 Thread jim holtman
?findInterval subjEnglish-sample(-1:100,studentNumbers,replace=TRUE); grade - c(-Inf, 39, 49, 59, 69, 79, 100) # grade break points let - c(U, F, D, C, B, A, A+)[findInterval(subjEnglish, grade)] cbind(subjEnglish, let) subjEnglish let [1,] 77B [2,] 93A [3,] 52

Re: [R] Classification by range

2012-03-08 Thread David Winsemius
On Mar 8, 2012, at 3:14 PM, Ajay Askoolum wrote: Given studentNumbers-10; subjEnglish-sample(-1:100,studentNumbers,replace=TRUE); when subEnglish =0, 'U' =39, 'F' =49 'D' =59, 'C' =69, 'B'

[R] Classification tree - Uniform vertical spacing of the nodes

2012-03-06 Thread Nathalia Machado
Hello everyone! I'm working with Decision tree and I have doubt about one of the arguments of plot.rpart function: When we use uniform=F, the vertical spacing of nodes will be proportional to the error in the fit. But, I want to build a scale next my classif tree to show it. So, how could I

[R] R classification

2011-10-18 Thread Comp. Eng. Mohammed Al-Ghareeb
hello, i am so glad to write you. i am dealing now with writing my M.Sc in Applied Statistics thesis, titled Data Mining Classifiers and Predictive Models Validation and Evaluation. I am planning to compare several DM classifiers like NN, kNN, SVM, Dtree, and Naïve Bayes according to their

[R] Classification from candisc

2011-09-08 Thread adigs
This is a probably a daft question, but I would appreciate some help. I want to attempt to separate groups in a dataset using discriminant function analysis, and have been using linear discriminant analysis (lda(klaR)) and canonical discriminant analysis (candisc(candisc)). # CDA: iris.mod -

[R] Classification trees problem.

2011-08-08 Thread Jose Bustos Melo
Hello Everyone, I'm doing a Classification trees with categorical explanatory variables using library rpart and I would like to do a prediction for some data imputs. I don't know where's a function or how can I do it?. Is there someone can help ?? ¿. Here's the code that I'm using.

Re: [R] Classification trees problem.

2011-08-08 Thread Weidong Gu
?predict.rpart Weidong Gu On Mon, Aug 8, 2011 at 6:08 PM, Jose Bustos Melo jbustosm...@yahoo.es wrote: Hello Everyone, I'm doing a Classification trees with categorical explanatory variables using library rpart and I would like to do a prediction for some data imputs. I don't know where's

[R] classification

2011-04-07 Thread array chip
Dear all, this is not a pure R question, but really about how to set up a multinomial logistic regression model to do a multi-class classification. I would really appreciate if any of you would give me some of your thoughts and recommendation. Let's say we have 3-class classification problem:

[R] classification question

2010-11-18 Thread Marcelo Barbudas
Hi. Working with a data set like: age, demographic data (n fields), interests(n fields) has performed X actions for event Y. I want to ask how likely is it for another person with his/her age, demographic data and interests to perform actions for that event. My query set might be partial

[R] R: classification tree model!

2010-08-03 Thread aline uwimana
# Classification Tree with rpart library(rpart) # grow tree fit - rpart(y~ x1 + x2+ x3 + x4+ x5,method=class, data=data) printcp(fit) # display the results plotcp(fit) # visualize cross-validation results summary(fit) # detailed summary of splits # plot tree plot(fit,

Re: [R] R: classification tree model!

2010-08-03 Thread Tal Galili
People who speak only English and Hebrew (like myself), can't help you. Consider reposting in English. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

[R] classification algorithms with distance matrix

2010-06-07 Thread sidahmed BENABDERRAHMANE
Dear all, I have a problem when using some classification functions (Kmeans, PAM, FANNY...) with a distance matrix, and i would to understand how it proceeds for the positioning of centroids after one execution step. In fact, in the classical formulation of the algorithm, after each step,

Re: [R] classification algorithms with distance matrix

2010-06-07 Thread Peter Langfelder
On Mon, Jun 7, 2010 at 9:05 AM, sidahmed BENABDERRAHMANE sidahmed.benabderrahm...@loria.fr wrote: Dear all, I have a problem when using some classification functions (Kmeans, PAM, FANNY...)  with a distance matrix, and i would to understand how it proceeds for the positioning of centroids

[R] classification tree

2010-04-27 Thread Sabariah Saharan
Hi, I've a problem with growing a classification tree. I have 26427 observations and divided into 4 groups. A=17866 B=6873 C=1556 D=132 The problems is when I want to plot the tree, the result appear there is no splitnodes for the tree. What should I do now? Is there any ideas how to build

[R] Classification of supernovae - a challenge

2010-01-29 Thread Jarle Brinchmann
Hi all, I thought I'd just point out, to those not having yet seen this, that today there was a classification challenge posted for astronomy. The web-site is http://www.hep.anl.gov/SNchallenge/ [I have nothing to do with this project so don't ask me any details!] Basically the idea behind is

Re: [R] Classification

2009-11-21 Thread Chris Li
Thanks to both of you. Problem's solved. Greatly appreciated. :] Chris Chris Li wrote: Hi all, I have got a dataset like the following: 3 5 7 3 9 7 i.e. random numbers with some repeats. I want R to classify them for me. E.g. every row that has a value of 3 will be asigned

[R] Classification

2009-11-20 Thread Chris Li
Hi all, I have got a dataset like the following: 3 5 7 3 9 7 i.e. random numbers with some repeats. I want R to classify them for me. E.g. every row that has a value of 3 will be asigned a value of 1, and every row that has a value will be asigned a value of 2 etc. I want R to return the

Re: [R] Classification

2009-11-20 Thread smu
Hello, x - c(3,5,7,3,9,7) as.numeric(as.factor(x)) [1] 1 2 3 1 4 3 regards, stefan On Fri, Nov 20, 2009 at 12:02:59AM -0800, Chris Li wrote: Hi all, I have got a dataset like the following: 3 5 7 3 9 7 i.e. random numbers with some repeats. I want R to classify them

Re: [R] Classification

2009-11-20 Thread Karl Ove Hufthammer
On Fri, 20 Nov 2009 10:43:19 +0100 smu m...@z107.de wrote: x - c(3,5,7,3,9,7) as.numeric(as.factor(x)) [1] 1 2 3 1 4 3 While that is my preferred solution too, this may be easier to understand: match(x,sort(unique(x))) (It is basically what 'factor' does.) The question wasn't quite

[R] classification task with RBF neural networks

2009-07-18 Thread Francesco Tatullo
Hello everybody, I'm looking for a way to build an RBF classification network with R but I can't find any. I know there is the 'neural' package, but apparently the RBF networks I can build with that are for approximation tasks only. Is there any package I can use to build an RBF network for a

[R] [Classification] lifting score in R

2009-06-24 Thread Michael
Hi all, Could anybody give me some pointers to Cross Validation using Lifting Score as error function, as commonly used in data-mining and classification field in marketing and e-commerce research? Thanks! __ R-help@r-project.org mailing list

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Christian Schulz
Maybe the packages caret,RWeka and ROCR are usefuel starting points. Cheers, Christian Hi all, Could anybody give me some pointers to Cross Validation using Lifting Score as error function, as commonly used in data-mining and classification field in marketing and e-commerce research? Thanks!

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Tobias Sing
Michael, a lift chart for evaluating binary scoring classifiers, as I understand it, plots... lift score: P(Yhat = + | Y = +)/P(Yhat = +) against rate of rate of positive predictions: P(Yhat = +). ...across the continuum of possible cutoffs. If you want to do this, here is how you would do this

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Michael
Thanks a lot! Yet is there a way to incorporate the lifting score into Cross Validation, not just a plot? Thanks again! On Wed, Jun 24, 2009 at 9:07 AM, Tobias Singtobias.s...@gmail.com wrote: Michael, a lift chart for evaluating binary scoring classifiers, as I understand it, plots...

[R] Classification problem

2009-02-05 Thread anil rohilla
Hi List, I want to do classification using neural network (e.g Package neural, Amore etc). How these packages handles nominal variables. Is there any specific coding we have to use or we have to do dummy coding for each nominal variable. Any help will be appreciated. Is any body know how to do

[R] classification accuracy in logistic regression

2008-11-20 Thread David Kaplan
Hi all, I'm looking for a program that will take the predicted probabilities from a logistic regression using glm{stats}, dichotomize them according to a threshold that I can control, and then use them to form sensitivity, specificity, false pos and false neg rates. Thanks in advance.

Re: [R] classification accuracy in logistic regression

2008-11-20 Thread Achim Zeileis
On Thu, 20 Nov 2008, David Kaplan wrote: Hi all, I'm looking for a program that will take the predicted probabilities from a logistic regression using glm{stats}, dichotomize them according to a threshold that I can control, and then use them to form sensitivity, specificity, false pos and

Re: [R] classification accuracy in logistic regression

2008-11-20 Thread Frank E Harrell Jr
Achim Zeileis wrote: On Thu, 20 Nov 2008, David Kaplan wrote: Hi all, I'm looking for a program that will take the predicted probabilities from a logistic regression using glm{stats}, dichotomize them according to a threshold that I can control, and then use them to form sensitivity,