Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 13023

R is a free, open-source programming language and software environment for statistical computing, bioinformatics, and graphics.

0 votes
Accepted

Sparse matrix in R based on the data frame

Your data looks like this at the moment: data <- data.frame(User_Id = c(276725, 276726, 276725, 276726, 276725), ISBN = c("A", "B", "C", "A", "B"), Book_Rating = …
wacax's user avatar
  • 3,460
3 votes
Accepted

Code Vectorization of gsub in R

You have plenty of alternatives for this problem Using sapply data$abstract <- sapply(data$abstract, function(x){gsub(pattern = "no abstract available", …
wacax's user avatar
  • 3,460
10 votes
2 answers
619 views

Software Testing for Data Science in R

However, now that I've found myself using R more than python for ML modelling and development. … I realized that I don't really test my R code (And more importantly I really don't know how to do it well). …
wacax's user avatar
  • 3,460
2 votes
1 answer
2k views

Generating Polynomial Features in R

Is there an optimized way to perform this function "PolynomialFeatures" in R? … want to import data from a Python script using sklearn's PolynomialFeatures function into R. …
wacax's user avatar
  • 3,460
3 votes
Accepted

Dummy coding a column in R with multiple levels

Feature Hashing Here is a great explanation of feature hashing in R (among other techniques) which is also an alternative, specially useful when you have hundreds of thousands or millions of multiple …
wacax's user avatar
  • 3,460
42 votes
Accepted

Hypertuning XGBoost parameters

Whenever I work with xgboost I often make my own homebrew parameter search but you can do it with the caret package as well like KrisP just mentioned. Caret See this answer on Cross Validated for …
wacax's user avatar
  • 3,460
2 votes
Accepted

Financial Time Series data normalization

Z-score normalization, as you have already guessed, cannot deal well with non-stationary time series since the mean and standard deviation of the time series vary over time. Min-max and another commo …
wacax's user avatar
  • 3,460
2 votes
1 answer
4k views

Boruta feature selection in R with custom importance (xgboost feature importance)

According to the documentation - CRAN Boruta is an all relevant feature selection wrapper algorithm, capable of working with any classification method that output variable importance measure (VIM) …
wacax's user avatar
  • 3,460
4 votes
Accepted

Is there any implementation of Extended Isolation Forest algorithm in R/Python?

There is a package on Github called "Extended Isolation Forest for Anomaly Detection", I used it a couple months ago and it seemed to work. For how accurate or how buggy it is, I'm not sure but if any …
wacax's user avatar
  • 3,460