Questions tagged [r]

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

386 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
381 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
1k 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
0answers
49 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 ...
4
votes
2answers
635 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 ...
4
votes
2answers
2k views

Constrained k-means algorithms in R (must-link constraints)

I currently face an unsupervised learning task that is to be approaches using clustering. More specifically, it is a segementation task and hence there is some prior knowledge about a) the number of ...
3
votes
1answer
19 views

Identify members who are likely to switch where they receive drug administration

I have access to medical claim data from a large health insurance company. As some of you may know there is a large delta between the price of drug X depending on where it is administered. My ...
3
votes
0answers
48 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
0answers
385 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 ...
3
votes
2answers
79 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
1answer
163 views

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

I have the following data frame: ...
3
votes
1answer
311 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
52 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
57 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
9k 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
987 views

XgBoost error: contrasts can be applied only to factors with 2 or more levels

...
3
votes
0answers
349 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
2k 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
457 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
499 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
0answers
91 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

Platt Scaling vs Isotonic Regression for reliability curve

I am learning classifier probability calibrations and have calibrated an eleastic net model using both Platt scaling and isotonic regression. As you can see in the attached image Platt scaling (on the ...
2
votes
0answers
46 views

K-Means Clustering Profile Plot & Data Normalization

I am new to k-means clustering and I am working on a project on cryptoanalysis. I have a few questions and I hope to get some help here. I have four variables and my variables data values can range ...
2
votes
0answers
8 views

How to create new graph vertices from existing one with igraph in R?

I have the following DF in R representing a directed graph: ...
2
votes
0answers
26 views

how to plot a mixed graph in R?

How can I plot a mixed graph in R? I have used this but doesn't work (in bnlearn he calls 'arc' to a directed edge and 'edge' to an undirected edge): ...
2
votes
0answers
40 views

How can I improve the accuracy of my model? (Cab Cancellation Prediction)

I am trying to predict based on several parameters like trip type, car type, source of booking, start time, lead time (start- book) and a few other params whether or not a customer will cancel. From ...
2
votes
0answers
20 views

How to find transictions and group variables

Having a dataset like this: ...
2
votes
1answer
39 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
17 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
26 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
18 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
1answer
371 views

Why does Caret featurePlot returns returns NULL?

I am trying to use featurePlot of caret in R. This is the code I am using: ...
2
votes
0answers
94 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
19 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
29 views

Calculate a mean on condtions in a dataframe with dyplr

My table looks like this: ...
2
votes
1answer
105 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
692 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
2k 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
1k 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
58 views

ML/Statistical Model to Analyse the Distribution

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

Weighted mean with summarise_at dplyr

I strictly need to use the summarise_at to compute a weighted mean, with weights based on the values of another column ...
2
votes
0answers
79 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
1answer
174 views

Can you reuse observations from your train data in your final test data?

For an employee population, I am trying to determine who among the employees are likely to get injured in the future based on 2 years worth of data. Unlike in most machine learning problems where you ...
2
votes
1answer
44 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
401 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
281 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
297 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
1answer
214 views

Missing population values in census data

I have population data from Census.gov: Total US population by age by year from 1940 through 2010 Depending on the range of decades, the data is missing discrete population values for ages greater ...
2
votes
0answers
263 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 ...

1
2 3 4 5
8