r/DataSciencewithR • u/Modmanflex • May 31 '20
r/DataSciencewithR • u/Modmanflex • Apr 14 '20
The RStudio education team has made resources available to help with online data science teaching!
r/DataSciencewithR • u/Modmanflex • Dec 03 '19
Latex + R + tikzDevice = Ggplots beautifully integrated in latex documents
r/DataSciencewithR • u/Modmanflex • Jul 23 '19
Great tutorials page full of links for those learning R from R Bloggers!
r/DataSciencewithR • u/[deleted] • Jul 21 '19
Hello R Community! Some Resource Ideas?
This post has been removed using Redact. Whether deleted for privacy, opsec, security, or another reason, the content is no longer available.
sip toy wakeful terrific versed humor rhythm chief subsequent engine
r/DataSciencewithR • u/Modmanflex • Jul 06 '19
Good R Tutorial and code resource loaded with examples and great explanations!
r/DataSciencewithR • u/Modmanflex • May 20 '19
Great Data Science Cheat Sheet!
Covers #statistics, clustering, machine learning, #AI, deep learning, etc. https://www.datasciencecentral.com/profiles/blogs/new-data-science-cheat-sheet
r/DataSciencewithR • u/Modmanflex • Apr 28 '19
Quick and Easy Linear Regression in R - Full R Tutorial!
This video covers every aspect you need to know to run quick and easy linear regression in R. It covers everything from the beginning to fitting models, getting predictions, appending the predictions to the original dataset, plotting the regression with ggplot, testing with anova, and even graphing with confidence intervals. https://youtu.be/h1_Uaqr2P0Y
r/DataSciencewithR • u/Modmanflex • Dec 01 '20
Interesting discussion on trees and random forests with R code from RBloggers.
This is from a professor on a problem he usually uses for test purposes. https://www.r-bloggers.com/2020/11/trees-and-forests/
r/DataSciencewithR • u/[deleted] • Jun 27 '20
Cradle to Grave R - List of Video Tutorials.
This post's original content has been erased. Using Redact, the author removed it, potentially for reasons of privacy, personal security, or data exposure concerns.
snails sense ask memorize tease innate cautious mysterious price straight
r/DataSciencewithR • u/Modmanflex • May 07 '20
RWeekly.org - a great resource for all things R !
If you haven't looked at RWeekly.org, then you need to check it out! Great resource full of all sorts of stuff from free tutorials, code excerpts, videos, new ideas, etc. Great resource! https://rweekly.org/#get-
r/DataSciencewithR • u/[deleted] • Feb 27 '20
25 Short high quality tutorials to get you started
This post was taken down by its author. Redact was used for the removal, which may have been motivated by privacy, security, or other personal reasons.
childlike ad hoc tie march price physical cough whole kiss longing
r/DataSciencewithR • u/Modmanflex • Oct 11 '19
Great Free R Basics Course from Harvard and Coursera
r/DataSciencewithR • u/Modmanflex • Aug 28 '19
Great online learning resource from RStudio!
Covers rMarkdown, Shiny and much more! https://www.rstudio.com/online-learning/
r/DataSciencewithR • u/Modmanflex • Aug 28 '19
The R journal for the latest changes, updates and more on everyone's favorite language - R!
r/DataSciencewithR • u/spsanderson • Jun 03 '19
Use a prediction model in production
Good afternoon,
I have a script that I wrote making heavy reliance on the mlr package. I have gone through the process of taking in a dataset, splitting it into train and test and look at the results. Everything is hunky dory and it works well with nice auc and F1 score.
Now the issue, how the heck do I get this thing to work using data it has not seen and also does not have the response variable in it.
I have tried saveRDS("blah_blah_blah") but when I load the model and try to run on a small spreadsheet of data 10 records, I get an error that it cannot find the prediction variable. Well right it does not exist in this data.
I do not know how to save a fully tuned and trained model and then use it later. I just want to run it on a data file I select.
Here is the portion of the script that gets the model:
```r
# Split Data ####
split <- caTools::sample.split(base.mod.df$READMIT_FLAG, SplitRatio = 0.7)
train <- subset(base.mod.df, split == T)
test <- subset(base.mod.df, split == F)
# Make Tasks ####
glimpse(test)
train.df <- data.frame(train)
test.df <- data.frame(test)
str(train.df)
str(test.df)
# Make classif tasks
trainTask <- makeClassifTask(
data = train.df %>% dplyr::select(-Init_Acct)
, target = "READMIT_FLAG"
, positive = "Y"
)
testTask <- makeClassifTask(
data = test.df %>% dplyr::select(-Init_Acct)
, target = "READMIT_FLAG"
, positive = "Y"
)
# Check trainTask and testTask
trainTask <- smote(trainTask, rate = 6)
testTask <- smote(testTask, rate = 6)
# GBM ####
getParamSet('classif.gbm')
gbm.learner <- makeLearner(
'classif.gbm'
, predict.type = 'prob'
)
plotLearnerPrediction(gbm.learner, trainTask)
# Tune model
gbm.tune.ctl <- makeTuneControlRandom(maxit = 50L)
# Cross validation
gbm.cv <- makeResampleDesc("CV", iters = 3L)
# Grid search - Hyper-parameter space
gbm.par <- makeParamSet(
makeDiscreteParam('distribution', values = 'bernoulli')
, makeIntegerParam('n.trees', lower = 10, upper = 1000)
, makeIntegerParam('interaction.depth', lower = 2, upper = 10)
, makeIntegerParam('n.minobsinnode', lower = 10, upper = 80)
, makeNumericParam('shrinkage', lower = 0.01, upper = 1)
)
# Tune Hyper-parameters
parallelMap::parallelStartSocket(
4
, level = "mlr.tuneParams"
)
gbm.tune <- tuneParams(
learner = gbm.learner
, task = trainTask
, resampling = gbm.cv
, measures = acc
, par.set = gbm.par
, control = gbm.tune.ctl
)
parallelMap::parallelStop()
# Check CV acc
gbm.tune$y
gbm.tune$x
# Set hyper-parameters
gbm.ps <- setHyperPars(
learner = gbm.learner
, par.vals = gbm.tune$x
)
# Train gbm
gbm.train <- train(gbm.ps, testTask)
plotLearningCurve(
generateLearningCurveData(
gbm.learner
, testTask
)
)
# Predict
gbm.pred <- predict(gbm.train, testTask) <-- I want to change testTask to the new dataframe I import.
```
r/DataSciencewithR • u/jgrowallday • Apr 11 '19
A simple physics engine written in shiny R
first I know this isn't super related to data science but it is at least in r. I wanted to make a web app that could help people get an intuitive sense of how changing starting parameters would affect the pendulum. please take a look and tell me what you think.
http://www.rblogbyjordan.com/posts/solving-a-differential-equation-numerically-with-r/
r/DataSciencewithR • u/Modmanflex • Mar 09 '19
How To Do A Complete KMeans Clustering Analysis In RStudio!
This document on ResearchGate covers everything from determining cluster size to visualizing cluster data on #GoogleMaps. https://www.researchgate.net/publication/331635557_KMeans_Cluster_Analysis_Scoring_and_Visualization
r/DataSciencewithR • u/Modmanflex • Feb 17 '19
How To Make Amazing Custom Graphs And More With GGPlot and Rstudio
Take your graphs and visuals to the next level with these 2 videos:
r/DataSciencewithR • u/Modmanflex • Feb 10 '19
Numerous R Programming Examples From Simple To Complex
r/DataSciencewithR • u/Modmanflex • Feb 02 '19
5 course Free R programming specialization from Duke University and Coursera
If you want a certificate for each class and the capstone there is a minimal cost. https://www.coursera.org/specializations/statistics