Questions tagged [r]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
31 views

xgboost in R have different results compared to boosted decision tree in Azure ML

I have a small data set (4000 records with 10 features) and I used XGBOOST in R as well as Boosted Decision Tree model in Azure ML studio. Unfortunately the results are different. I like to optimize ...
0
votes
0answers
118 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: ...
0
votes
1answer
35 views

Grouping factors in more general ones

I have to work on this database on R. I have tried to make a tree model, but all the variables are factors with too many levels. I tried changing the column "operator" in three levels (keeping private,...
2
votes
1answer
2k 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 ...
1
vote
0answers
14 views

r - tbart package, allocations function - How can I force a solution without a list of sites?

I am attempting to solve a p-median problem for a given dataset. I can successfully produce a list of optimal candidate sites. However, I am interested in a secondary list of optimal candidate sites ...
0
votes
1answer
34 views

R packages: How to access csv files in data subfolder? [closed]

I have successfully written an R package and want to ship it with a specific csv file. I placed the file in the data and ...
0
votes
1answer
28 views

How do I compare data frames in R?

I have two data frames, dfA (t1) and dfB (t2), with subject IDs and associated variables. I want to compare the two data frames based on subject IDs and retain the subject IDs (and the associated ...
0
votes
1answer
29 views

How to perform logistic regression in R with grouped data?

Say I have a categorical variable with 2 levels, and for instance 289 people fall in level 1 and 386 fall in level 2. How would I go about modelling such a variable as a logistic response? All ...
1
vote
0answers
48 views

Hyperparameter Tuning using Bayesian Techniques

I've been looking into Bayesian optimization for hyperparameter tuning and trying to compare the results I get to those I get using different methods (random grid search). I came across this site, ...
0
votes
0answers
10 views

Sample the transaction set with close lift or/and confidence estimate with original set[association rules]

In frequency set mining, for large sets, we can use sample to reduce the calculation while not miss too much for the support using formula: ...
0
votes
0answers
15 views

Detect positive and negative changes

Having a dataset like this: What model change I use to show positive and negative transitions between the the 5 variables and correlate them? ...
0
votes
0answers
12 views

How to encode factor predictors in prediction models

The response variable as well as all predictor variables in my dataset are factors. I want to build a model for predicting the response variable. As I understand I have to first encode my predictor ...
0
votes
0answers
25 views

How to apply bootstrap to knn model in r

I have test data and train data in test.csv and train.csv respectively. train$X are volt to current ratio and train$y are the ...
0
votes
3answers
39 views

What is the better to pre-process data, MS-Excel or Python/R [closed]

While handling data, many anomalies occur that might change the results. For example, outliers, missing values, etc. So in this context, what is the better tool to pre process data? A visual tool like ...
0
votes
1answer
601 views

On which algorithm for boosting is the method xgbLinear of the xgboost/caret- package based on?

In caret package of R, there is a method 'xgblinear'. What is the working algorithm behind this method.
0
votes
0answers
11 views

Error in the train function

I'm building a model and i want to re preocess the data using PCA but i have an error in the train function : ...
0
votes
0answers
9 views

Labelling through Markov Switching models

I am new to machine learning, in the past I have worked with time series techniques. I have a database composed by the financial time series of SPX, its Exponential Moving average 20days, BBB ...
0
votes
0answers
23 views

Structure learning for numerical type of data

Bellow I have some code, where the code works with categorical data but produces the error (for the numerical data): Error in data.type(x) : variable chas is not supported in bnlearn (type: integer)...
0
votes
1answer
45 views

Correlation Matrix Issues: Can't Convert Variables to Numerics

QUESTIONS: Can you tell me how I can convert int and factor variables to numeric variables in R? Can you tell me why ...
0
votes
0answers
14 views

thermal images in R

I have a large set of thermal images to process in R. Taken with Infratec IRBIS camera. Is there an R package to import the images directly in R? What are some other ways to get temperature data ...
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?
2
votes
1answer
80 views

Logistic Regression - Coefficients have p-value more than alpha(0.05)

I am very new to the machine learning field and have been practicing logistic regression on few sample data sets. I have built a Model using the logistic regression algorithm. Few of the coefficients ...
2
votes
2answers
843 views

Multi-touch Attribution Model

I would like to develop an algorithm for Multi-Touch Time-Decay Attribution Model for an e-mail campaign. I have the research paper ready and I would convert the paper into R-script. I am struggling ...
0
votes
2answers
47 views

finding the percentage > x with r

Trying to locate the names of countries in my data.frame where the most spoken language is not an official language. My columns data.frame is World. The column <...
3
votes
1answer
65 views

What does “exaggeration” mean in the context of Boosting?

I am learning boosting, the machine learning ensemble meta-algorithm. The professor is grouping 3 weak classifiers into an ensemble and said that before this time point it is easy to understand. Take ...
0
votes
1answer
13 views

Calculate mean by decile in Svydesign object

So, I´m working with ENIGH - Database, which stands for ¨National Survey of Household Income and Expenses¨ in Spanish, this is an exercise conducted by the Mexican government and like most surveys of ...
0
votes
3answers
130 views

what to do if the missing data in one column is based on some value/condition in another column in r?

I have a dataset with 20,000 observations and 19 variables. To start off with I have a gender column which has three levels namely 'M', 'F' and 'U' where U can be taken as not disclosed. Whenever ...
1
vote
1answer
60 views

Finding the equation for a multiple and nonlinear regression model?

Regarding nonlinear and multivariable regression, I am using R or Matlab. In the case where I have a regression with just two variables, I simply draw the graph Y with respect to X and look for the ...
0
votes
2answers
326 views

How to mask or crop IDW results

My question is: how can I mask or crop the results, using R, of IDW interpolation to only the area containing the original set of data points? In the example below, 20 random points are used to ...
2
votes
3answers
377 views

Clustering big data by reducing data accuracy?

I have 1 million rows with 20 attributes to do hierarchical clustering. When I want to build a distance matrix on this data by dist() in R, it says that it needs 5 ...
0
votes
0answers
13 views

Extra Alignment Error with KableExtra in R-markdown

I am relitively new to R and R-Markdown. I am receiving an error message of ! Extra alignment tab has been changed to \cr. \endtemplate In Table 4. I do not know what the error is telling me, ...
1
vote
2answers
86 views

Estimating test AUC using k-fold CV for imbalanced classification problem

I have an imbalanced classification problem. I first partitioned my data into a training set (Dataset A) and a test set (Dataset B). I then used the R package ...
0
votes
0answers
14 views

POS extraction using CoreNLP

I have a corpus of windows related documents, for which I need to extract nouns and verbs. However, it is required that I keep certain windows specific words such as "inline hooking", "instruction ...
2
votes
2answers
901 views

Binary Classification Probabilities

I'm using keras in R to predict financial time series. I guess that ANN converges. But when I do predictions I can see that probabilities don't sum up to 1 I'm using ...
0
votes
2answers
382 views

Big Data and a fwf files reading with filters

I have searched at all possible areas and haven't been able to find the solution to my problem. I am hoping that someone here would be able to help me out. If you feel that this question is already ...
4
votes
1answer
44 views

Count and summarise ID's each day while creating a new column that shows the accumulated ID's

I have two column, first one being the ID of a customer and second one being the Date of purchase. ...
2
votes
3answers
150 views

References for longitudinal data analysis

So my goal is to study longitudinal data (data in time series) by applying some data mining techniques. Ultimately I want to be able to "predict" outcomes. For example, a study of patients along the ...
2
votes
0answers
76 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 ...
0
votes
0answers
16 views

Use sequential pattern mining rules to predict next window of a dataset

Suppose that I am performing Sequential Pattern Mining (maxgap = 1, i.e. rules for consecutive windows) and I ran the following code from arulesSequences in R Studio to determine significant rules ...
1
vote
0answers
19 views

Sapply is not working like for loop

sapply(c(2:5), function(y){ x[y,]<-x[y,]-(x[1,]*x[y, 1]/x[1, 1])}) for (i in c(2:5)){ x[i,]<-x[i,]-(x[1,]*x[i, 1]/x[1,1])} Can someone explain to me why ...
1
vote
0answers
9 views

What would be a good threshold number to convert some categories to Not Specified

The current topic is derived from this topic: https://community.rstudio.com/t/39722 (optional to read). I have the following dataset: myds : ...
1
vote
1answer
72 views

R stem and leaf values

How to make a stem and leaf plot with the following data in "R": 1717 1719 1645 3739 3024 3664 3830 2991 2430 2730 3469 5086 2119 3021 3292 2844 3426 2067 3215 2767 3124 2573 2840 2449 2584 1505 1390 ...
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 ...
0
votes
0answers
17 views

R- stem and leaf plot [duplicate]

I am having trouble constructing a stem and leaf plot in "R" The data is: 1717, 1719, 1645, 3739, 3024 (This is only a subset of a larger sample but it is sufficient to show my problem) The output I ...
0
votes
0answers
31 views
0
votes
0answers
4 views

how to replace loadings in factanal object in r

I am trying to create a diagram but the function for it from package library(semPlot) takes an object. I can use factanal object or many other objects from FA packages. I chose factanal for ...
0
votes
0answers
26 views

Table flattening with spread in R

I am trying to use the spread function in dplyr to "flatten" a table but it does not appear to be working as intended. Example table: I am trying to flatten this one so that each Record Number is ...
11
votes
1answer
2k views

GPU Accelerated Data Processing for R in Windows

I'm currently taking a paper on Big Data which has us utilising R heavily for data analysis. I happen to have a GTX1070 in my pc for gaming reasons. Thus, I thought it would be really cool if I could ...
0
votes
1answer
26 views

Why the Logistic regression model trained with tensorflow performed so poor

I trained a logistic regression model with tensorflow but the accuracy of the model was so poor (accuracy = 0.68). The model was trained using simulated dataset and the result should be very good. is ...
0
votes
0answers
22 views

Are application assignments in Datascience common practice?

this might seem off topic, but I hope this question will be tolerated. I was recently asked to help a friend with an assignment in the process of applying for a new job as data scientist. And ...