B_Miner
  • Member for 11 years, 2 months
  • Last seen more than a week ago
How to stop excel from changing a range when you drag a formula down?
Accepted answer
42 votes

A '$' will lock down the reference to an absolute one versus a relative one. You can lock down the column, row or both. Here is a locked down absolute reference for your example. (A1-MIN($A$1:$A$30))/...

View answer
Obtaining knowledge from a random forest
26 votes

To supplement these fine responses, I would mention use of gradient boosted trees (e.g. the GBM Package in R). In R, I prefer this to random forests because missing values are allowed as compared to ...

View answer
Caret package in R - get top Variable of Importance
Accepted answer
22 votes

What is the issue with #1? It runs fine for me and the result of the call to varImp() produces the following, ordered most to least important: > varImp(modelFit) rpart variable importance ...

View answer
ANOVA on binomial data
Accepted answer
22 votes

No to ANOVA, which assumes a normally distributed outcome variable (among other things). There are "old school" transformations to consider, but I would prefer logistic regression (equivalent to a chi ...

View answer
Why is there a difference between manually calculating a logistic regression 95% confidence interval, and using the confint() function in R?
20 votes

I believe if you look into the help file for confint() you will find that the confidence interval being constructed is a "profile" interval instead of a Wald confidence interval (your formula from HL)....

View answer
Standard errors for lasso prediction using R
12 votes

To add to the answers above, the issue appears to be that even a bootstrap is likely insufficient as the estimate from the penalized model is biased and bootstrapping will only speak to the variance - ...

View answer
Meaning of output terms in gbm package?
Accepted answer
11 votes

You should find these are related to determining the best value for the number of basis functions - i.e. iterations - i.e. number of trees in the additive model. I cant find documentation describing ...

View answer
Cross-validating time-series analysis
11 votes

http://robjhyndman.com/researchtips/crossvalidation/ contains a quick tip for cross validation of time series. Regarding using random forest for time series data....not sure although it seems like an ...

View answer
Calibrating a multi-class boosted classifier
Accepted answer
11 votes

This is a topic of practical interest to me as well so I did a little research. Here are two papers by an author that is often listed as a reference in these matters. Transforming classifier scores ...

View answer
How to do logistic regression in R when outcome is fractional (a ratio of two counts)?
10 votes

As a start, if you have a dependent variable that is a proportion, you can use Beta Regression. This doesn't extend (with my limited knowledge) to multiple proportions. For Beta Regression overview ...

View answer
Strategy for deciding appropriate model for count data
Accepted answer
10 votes

You can always compare count models by looking at their predictions (preferrably on a hold out set). J. Scott Long discusses this graphically (plotting the predicted values against actuals). His text ...

View answer
Modeling customer churn - Machine learning versus hazard/survival models
9 votes

I think your question could be further defined. The first distinction for churn models is between creating (1) a binary (or multi-class if there are multiple types of churn) model to estimate the ...

View answer
Intuition and uses for coefficient of variation
Accepted answer
9 votes

I think of it as a relative measure of spread or variability in the data. If you think of the statement, "The standard deviation is 2.4" it really tells you nothing without respect to the mean (and ...

View answer
Partitioning trees in R: party vs. rpart
9 votes

I agree with @Iterator that the methodology is easier to explain for rpart. However, if you are looking for easily explainable rules, party (without bagged trees) doesn't lose anything in regard to ...

View answer
Hypothesis testing on zero-inflated continuous data
Accepted answer
9 votes

@msp, I think you are looking at a two stage model in that attachment (I did not have time to read it), but zero inflated continuous data is the type I work with a lot. To fit a parametric model to ...

View answer
Obtaining a formula for prediction limits in a linear model (i.e.: prediction intervals)
7 votes

@Tal: Might I suggest Kutner et al as a fabulous source for linear models. There is the distinction between a prediction of $Y$ from an individual new observation $X_{vec}$, the expected value of a $...

View answer
Ensembling regression models
Accepted answer
7 votes

If you are experiencing over fitting you could look into regularized regression which in R can be fit using many packages such as (glmnet). There are many good tutorials for this - one is ...

View answer
What is the best tool for customer segmentation?
6 votes

I would suggest with your limited data (and perhaps limited experience with clustering), you simply create an RFM coding and separate into the three bins your desire. Otherwise, cluster analysis on ...

View answer
Are decision trees almost always binary trees?
6 votes

Regarding uses of decision tree and splitting (binary versus otherwise), I only know of CHAID that has non-binary splits but there are likely others. For me, the main use of a non binary split is in ...

View answer
Strangely imbalanced dataset
5 votes

There are several components to your question - but first I would ask why is your sample so skewed? You have an under-sampled training set which as you point out is odd. Can you assume that the two ...

View answer
What is the best out-of-the-box 2-class classifier for your application?
5 votes

Gradient Boosted Trees. At least as accurate as RF on a lot of applications Incorporates missing values seamlessly Var importance (like RF probably biased in favor of continuous and many level ...

View answer
How to get generalisation performance from nnet in R using k-fold cross-validation?
5 votes

If you are planning to tune the network (e.g. select a value for the learning rate) on your training data and determine the error generalization on that same data set, you need to use a nested cross ...

View answer
Intervention Analysis Coding in R TSA Package
Accepted answer
4 votes

@forecaster gave a great answer using a package that I will be checking out. This is the answer to my question using the arimax function. The trick is to see that (assuming the event occurs at T=200): ...

View answer
Time Series Similarity : Differing Lengths with R
Accepted answer
4 votes

This feels like a hack, but I can get the dtw function to work as follows. #this shows how to register a distance function with proxy install.packages("proxy") require("proxy") DWT.DIST<-...

View answer
Decision Tree as variable selection for Logistic Regression
Accepted answer
4 votes

If you have access to LASSO and your predictors are all numeric then that is a good choice as Peter mentioned. If you have a massive number of predictors as experienced often in fields like ...

View answer
What happens if a survival curve doesn't reach 0.5?
4 votes

Yes, unless you use a parametric approach and are willing to extrapolate. See SAS Lifereg.

View answer
When is the shrinkage applied in Friedman's stochastic gradient boosting machine?
Accepted answer
4 votes

Using trees, the shrinkage takes place at the update stage of the algorithm, when the new function $f(x)_k$ is created as the function prior step ($f(x)_{k-1}$) + the new decision tree output ($p(x)_k$...

View answer
What are the assumptions for applying a Tobit regression model?
4 votes

@Firefeather: Does your data contain (and can only really ever contain) only positive values? If so, model it using a generalized linear model with gamma error and log link. If it contains zeros then ...

View answer
odds ratio from decision tree and random forest
Accepted answer
3 votes

You could use the idea of partial dependency plots which basically plot the change in the average predicted value (from a given model) as specific variable(s) vary over their marginal distribution. ...

View answer
Re-scaling a confusion matrix after down sampling one class
3 votes

In response to the comments, here is the general answer on how to adjust the probabilities returned out of any predictive model that has been built on a stratified / oversampled data set. Since you ...

View answer