##### Removing constant features
cat("n## Removing the constants features.n")
for (f in names(train)) {
if (length(unique(train[[f]])) == 1) {
cat(f, "is constant in train. We delete it.n")
train[[f]] [Read more...]
I find this code super useful because R’s implementation of xgboost (and to my knowledge Python’s) otherwise lacks support for a grid search: [Read more...]
Writing an R package is simple. Writing an R package via Github is simple and smart. Github adds all the traditional benefits of version control, in addition to showing off your work and providing and facilitating publication of your package. This tutorial was inspired by a blog post from the ... [Read more...]
Today, 3/14/2015, is Pi Day (see http://piday.org).
In honor of Pi Day, I threw together a little R code on Github, which discusses pi, prints it, and creates Julia set (fractal) images based on it:
https://github.com/hack-r/Rpiday
Happy Pi Day!
[Read more...]
The second column is simply the first column divided by the variance of the response that have been OOB up to that point (20 trees), times 100.
Source:
https://stat.ethz.ch/pipermail/r-help/2008-July/167748.html
[Read more...]
____ sample_size = 10 ____ R.eval “x __ R.eval “summary(x)” ____ R.eval “sd(x)” With a here document: require "rinruby" #Set all your variables in Ruby n = 10 beta_0 = 1 beta_1 = 0.25 alpha = 0.05 seed = 23423 R.x = (1..n).entries #Use actual R code to perform the analysis R.eval […] [Read more...]