A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [r]

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

345 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
15
votes
0answers
882 views

Visualization of multiple Markov models

I am working on a project where we compare over 10 different Markov models, each representing a different treatment plan. Most often single models are visualized with a decision tree or transition ...
8
votes
1answer
77 views

Features reduction for the not correlated data set

I am working with classification problem on a training data set, which have 100 features. All the features in pairs haven't visible correlation. One can see it in the example pair plot for the some of ...
5
votes
1answer
349 views

A clear visualization of a two-way ANOVA

To provide a full yet simple picture of a 3-level, one-way ANOVA, I use the following visualization where variation within each group (the filled circles) and variation between the groups (black ...
5
votes
0answers
964 views

AdaBoost implementation and tuning for high dimensional feature space in R

I am trying to implement the AdaBoost.M1 algorithm (trees as base-learners) to a data set with a large feature space (~ 20.000 features) and ~ 100 samples in R. ...
4
votes
3answers
5k views

Additive vs Multiplicative model in Time Series Data

The above time series plot is a daily closing stock index of a company. I want to know which model between additive and multiplicative best suits the above data. I know what the two models are, but i ...
4
votes
1answer
326 views

Clustering for high dimensional data

I am have a data set with 52 variables. Most of them have zeros, it resembles a sparse matrix. How can I cluster this kind of data and are there any special types of clustering? I am attaching pca ...
3
votes
0answers
32 views

Features selection with a lot of dummy variables in R

I am performing features selection on 3849 dummy variable (one-hot encoding) using Boruta algorithm and the algorithm is taking forever to run. Is there a faster way I can perform features selection ...
3
votes
2answers
69 views

Is ARIMA appropriate for time series prediction involving a mix of explanatory and independent variables?

I have a table with the following columns: Date(Month,Year), Sold_Past_Month, Quantity_Available, Quantity_Shipping_In, Missed_Sales, Quantity_Needed Quantity_Needed is the dependent variable that ...
3
votes
0answers
45 views

Fitting model to differenced time series

I have a time series on daily stock price of company(2013 data points).I took a first order difference and the following acf and pacf plots of the differenced series were obtained. However, I am ...
3
votes
2answers
515 views

How can I use two different datasets as a training model for svm

I know that you're supposed to scale your test data using the parameters (mean and stdev) from your training data. This is relatively simple; but what if the number of samples is limited in one ...
3
votes
1answer
109 views

Look for previous date in dataframe that has certain column category in R

I have the following data frame: ...
3
votes
0answers
227 views

k-Nearest Neighbours with time series data - how to obtain whole-time-period estimators

I have a large dataset for the activities performed by multiple staff in a factory over a long period of time - 01/01/2017 - present. The activities performed by different staff are recorded at each ...
3
votes
0answers
49 views

Echo-Effect-Metric Network

I have been working on data science project where I am trying to build a metric for how inbred a source is in a network. We hope to apply this to intelligence reporting, in which documents tend to ...
3
votes
1answer
50 views

Alternative to VGAM for Zero Truncated Negativ Binomial GLM in R

Is there an alternative to the vgam Package to do a zero truncated negativ Binomial GLM in R?
3
votes
1answer
7k views

Plot of ACF & PACF

There are 96 observations of energy consumption per day from 01/05/2016 - 31/05/2017. I am trying an ARIMA model in R to be fitted to these time series observations. I have chosen the frequency of ...
3
votes
0answers
326 views

Examples for predict.FAMD?

I am doing a study on unsupervised data with various categorical variables. So I have found the FactoMineR package to be really handy for this, particularly with the FAMD functions. I can get to a ...
3
votes
2answers
1k views

fix first two levels of decision tree?

I am trying to build a regression tree with 70 attributes where the business team wants to fix the first two levels namely country and product type.To achieve this,I have two proposals: 1.Build a ...
3
votes
0answers
428 views

How to use hunspell_stem(or a ordinary function) with tm_map?

Recently I've been doing some text mining and the stemming processing is taking a lot of time (I'm working with portuguese language). I found the hunspell package, ...
3
votes
0answers
492 views

Problem Screen Scraping Google Data

I'm trying to use rvest to screen scrape headline news items from google and failing. Having previously written a utility to screen scrape high level stats from DS.SE (not user info I have to say!), ...
3
votes
1answer
276 views

Understanding Spikeslab Output

I'm using spikeslab for the first time, but don't understand what the output means. It was suggested to me that I use it to tell which variables my dependent variable is most correlated to, in a ...
3
votes
0answers
89 views

Is there an interface for bootstrap sampling in rattle in R?

I am using rattle in R for predictive models and am trying to see whether there is a difference in different sampling methods. The split function at the start of rattle for splitting into training and ...
3
votes
0answers
64 views

Identifying sequences of behavioral interactions between multiple individuals

I'm wondering if anyone might have some novel insights as to the best way to analyze the following data. It's a problem I've been thinking about in the back of my mind for a while, so I thought that ...
3
votes
0answers
38 views

What are the parameter estimation methods for the two methods in this paper?

Automated Time Series Forecasting for Biosurveillance in the above paper, page 4, two models, non-adaptive regression model, adaptive regression model, the non-adaptive regression model's parameter ...
2
votes
0answers
30 views

R: Creating a loop to run decompose() on numerous CSVs

I could use some help creating a loop from some code that I've already created to decompose a Time Series. What I have to run on a single .csv: ...
2
votes
0answers
18 views

How to find transictions and group variables

Having a dataset like this: ...
2
votes
1answer
34 views

Machine learning dataframe dimension concept vs NumPy dimension

From Machine Learning for Absolute Beginners: A Plain English Introduction: Contained in each column is a feature. A feature is also known as variable, a dimension or an attribute - but they all ...
2
votes
0answers
15 views

Four parameter self-starting function based on SSfpl

I am currently working with a self-starting function for four parameters which I based on SSfpl but with a different formula. This is the formula for my self-starting function: ...
2
votes
0answers
18 views

R train(method=“naive_bayes”) and naiveBayes() very different performance

I am an R novice and having some difficulty. I was hoping R would be a good (flexible, easy) way to do machine learning of textual data. A few years ago, I wrote a naive Bayesian classifier (from ...
2
votes
0answers
17 views

Distinction of different types of missing values is lost after importing data from SPSS into R

I've got a file containing survey data in SPSS. There are 3 types of missing values defined: invalid (coded as 900), not applicable (990), not filled in (999). After importing the SPSS file into R ...
2
votes
0answers
75 views

Tools for reading data from large, irregular csv files (aka excel file hell)

I have a csv file with 1000 columns and 50 rows that was collected over a few months. Embedded randomly in the file are ~1000 small datasets with semi-standard formats (some columns differ, so does ...
2
votes
0answers
17 views

Packages for regression presentation

I have a linear regression model with 20+ variables and am looking for the best way to present my results in R Markdown HTML. Are there any R packages that make significant coefficients stand out and ...
2
votes
0answers
147 views

Can you do automated feature engineering in R?

Since now Python has its own deep feature synthesis library, is there anything similar available in R? I know of bounceR but I'm not sure if it does the job as DFS does. Is anyone aware of anything ...
2
votes
0answers
27 views

Calculate a mean on condtions in a dataframe with dyplr

My table looks like this: ...
2
votes
1answer
83 views

Difference in model performance measures of train and test data sets

I am using CART classification technique by dividing a dataset into train and test sets. I have been using Mis-classification error, KS by rank ordering, AUC and Gini as MPMs(model performance ...
2
votes
2answers
505 views

How to define a custom metric function in R for Keras?

I just started using keras and would like to use unweighted kappa as a metric when compiling my model. Following the instructions from here, I tried to define my custom metric as follows: ...
2
votes
1answer
1k views

R Combine Multiple Rows of DataFrame by creating new columns and union values

I have a dataframe in R that looks like this ...
2
votes
1answer
779 views

R NbClust for Python?

Is somebody know a Python equivalent to R NbClust? I'm searching for a way to determine the optimal clusters number for many 'similar datasets' and NbClust sounds good but it's for R and i'm a Python ...
2
votes
0answers
55 views

ML/Statistical Model to Analyse the Distribution

Consider a Sample Data-set provided below; ...
2
votes
1answer
1k views

Is there an R tutorial of using LSTM for multivariate time series forecasting?

There is a great blog post about how to use keras stateful LSTM in R to forecast sunspots. I applied it to financial ts data ...
2
votes
0answers
70 views

detecting anomaly from cdr data

I need to find anomalies from this. The term anomaly in my case is in which square id and in which time the total activity goes higher, how can I detect anomalies with the help of machine learning ...
2
votes
0answers
31 views

personalize the output with Rstudio

I'm trying to mine some data with Rstudio, but I have problem in the results output. Trying to search big number from 100000 to 900000 the function works well but ...
2
votes
0answers
32 views

Database for storing nested s3 objects from broom, sweep, or tidy in R

I'm working on a product that requires automated forecasting of time-series data in R & Shiny. Using R's sweep, broom, & tidy packages, I get these 'tibbles', which are like dataframes with ...
2
votes
0answers
19 views

Classification problem: custom minimization measure

Assume a binary classification problem, with $1$ denoted as a "bad" outcome, and $0$ as a "good" outcome. If it's relevant, in the sample there are significantly more bads than goods. I'm trying to ...
2
votes
1answer
40 views

Convert from many sub-tables to a single tidy dataframe

I have data in a bad format that I want to make tidy using an R script. I lack the skills to convert it into the format I want, so I look for an answer that (a) outlines a method, or (b) hands me the ...
2
votes
0answers
361 views

Keras/TensorFlow in R - Additional Vector to Custom Loss Function

I would like to pass a vector that is outside of the training data, but the same length as the training data, to a custom loss function. The vector represents a post-prediction funnel (one or zero) ...
2
votes
0answers
153 views

Group_by field is not showing in the summarise output in R

In R,using dplyr package, I tried the function "summarise" and I expect the result to show along with the groupby field. However, all of a sudden I see summarized output but without the groupby filed ...
2
votes
0answers
282 views

GPU Processing in R (using openCL)

I am trying to estimate a parameter by repeated sampling (Monte Carlo simulation). Each time I sample, I have to run a particular operation on a data.table object. ...
2
votes
0answers
210 views

k- means clustering on Markov chain trasition probability

I have data set of 50 students. I want to cluster them on their sequential data ( While doing a job they followed multiple sequences A, B, c total 7 stages). I am planning to apply k-means clustering ...
2
votes
0answers
427 views

Getting the following error with my LSTM in R

I am getting the following error whenever I train my model in R: ...
2
votes
0answers
401 views

What stopping metric to chose to optimize 'sensitivity' for a GBM in H2O?

I am predicting a disease and want to get the highest possible sensitivity score for the predicted values on my validation and test set. What stopping metric can be used to optimize the sensitivity ...