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
0
votes
0answers
7 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 : ...
1
vote
1answer
15 views

how can I replicate working of Multi Label Binarizer from sklearn package in R?

I want to achieve same working of MultiLabelBinarizer from sklearn.preprocessing package in R. I have list of labels for each example (for Predicated and Actual) like below. ...
0
votes
0answers
16 views

Calculating the premium of an insurance company [on hold]

I'm following an online data science course, where the current section in probability. I'm having a problem with a current assignement. The task is the following: An insurance company wants to make ...
0
votes
0answers
8 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
12 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
0answers
12 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 ...
0
votes
0answers
22 views

Forecasting futures prices [closed]

I was hoping someone could point me to some skeleton code, algorithm, or other nudge in the right direction for dealing with futures predictions. This is somewhat of a tricky problem, because it ...
0
votes
0answers
6 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, ...
4
votes
2answers
48 views

R has {drake} which makes it easy to make reproducible data pipelines. Does Python have a similar package?

See R's {drake}. It allows you to define a reproducible pipeline ...
1
vote
1answer
19 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
1answer
22 views

SQL and JSON database - R

I have a database (PostgresSQL) which looks like this: ""results"": {""WEBS"": {""WEBS_4"": [{""ip"": ""XXXXX"", ""value"": ""YYYY""}]}} I would ...
0
votes
0answers
10 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 ...
1
vote
1answer
32 views

Turning R scripts into a “data science tool”

I have R scripts that process a client's datasets (make figures, summary tables, etc). I'd like to package these scripts into a standalone program, aka data science tool, that I can give to the client ...
0
votes
1answer
22 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 ...
0
votes
0answers
10 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
17 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 ...
2
votes
0answers
35 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
12 views

How to get a output of a hidden layer of a single-layer LSTM

How can get the hidden layer outputs in a simple one-layer lstm? ...
2
votes
3answers
95 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 ...
0
votes
0answers
6 views

Expression evaluation not working inside a function (weird) [migrated]

You can copy/paste the following code on a R script file: ...
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 : ...
3
votes
0answers
25 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 ...
1
vote
1answer
34 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 ...
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
23 views

Exploratory Data Analysis for Big Data with continuous and categorical variables (mixed data types)

I have a dataset with 28 variables (6 continuos + 22 categorical). I'm using ...
0
votes
0answers
11 views

Performance of standalone R script loading dependencies [migrated]

I am working on a Python application that extracts data, transforms it, and then calls a script that visualises the data. The vis component is handled by an R script. I'm aware you can do data vis ...
0
votes
0answers
13 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 ...
0
votes
0answers
3 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
1answer
20 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
1answer
20 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 ...
4
votes
0answers
53 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 ...
0
votes
0answers
19 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 ...
2
votes
0answers
16 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 ...
1
vote
0answers
13 views

How do I use LIME in R to explain a Model created in KERAS?

I have created a model in KERAS R, using a data table, with the following script: ...
0
votes
0answers
32 views

Custom Cohen's Kappa metric for R in Keras is always zero

I created my own custom metric (Cohen's Kappa) in R using Keras backend. I defined the metric as follows: ...
0
votes
0answers
20 views

How can I create a terrain that looks like a staircase in R

I am trying to develop a terrain in R that looks like a stretched out staircase, i.e. the tread is the horizontal parts that I want to place buildings on, while the rise should be gentle sloping (not ...
2
votes
0answers
35 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 ...
0
votes
1answer
29 views

Caret “train” or special package

I see that there is an XGBoost package as well as XGBoost option in the "train" function in Caret. What is the difference between these two options, is it that they provide different settings? More ...
-1
votes
1answer
57 views

How Retail Analytics Project Can Be Done?

I have a project and I couldn't understand what I have to do because I am new with retail analytics. They said "Our goal is to measure the effects of promotion on sales" and "Your goal is to model ...
0
votes
1answer
29 views

Median of a list of frequencies

I have a list of groups and the frequencies of every group. E.g. ...
0
votes
0answers
9 views

Further analysis after topic identificatio

Using lda to find topics ...
0
votes
1answer
24 views

Which are the appropriate prameters for lda modeling?

I try to implement in R test for appropriate metrics for lda. Here the way I try to use LDA ...
0
votes
1answer
16 views

Conditional Function in R [closed]

I have an R function for (i in 1:10) that reads in data and performs some cleaning. Is it possible to write a flexible statement to execute certain parts of the ...
1
vote
1answer
26 views

Measure degree of heteroscedasticity [closed]

I analyzed my time series using Breusch Pagan test and observed the presence of heteroscedasticity in it. After box-cox transformation, I again tested the time series using Breusch Pagan test. The ...
0
votes
0answers
34 views

Save xboost model from R as Python pickle

I trying save R model to pickle, but I getting error Evaluation error: Unable to convert R object to Python type. ...
0
votes
1answer
26 views

R package vs REST API

I have a logistic regression algorithm in R to predict irresponsible users. I need this to be as flexible as possible for any market. I would need to use the logistic regression algorithm to ...
0
votes
1answer
33 views

Error loading tidyverse in R Studio - No broom package

I'm getting numerous errors when trying to install packages, namely tidyverse and ggplot. The error is of the form are always in the form: ...
0
votes
0answers
11 views

how use RBF for primal model of svm?

I know if we want to solve primal model of non-linear SVM, we have to generate new features. for example for kernel (1+xz)^2 for primal problem for any pair of features x1 and x2 we have to generate: ...
0
votes
1answer
37 views

How to execute a git project with different input data?

I would like to run this project and receive result from this project However I have problem to execute the step mailcorpus.json created by executing the sql script data/get_mail_corpus.sql on ...
0
votes
1answer
28 views

Merging three different customer segmentation systems into one

I have been given a task where I have three existing customer segmentation systems (rule based e.g. if customer spends X in Y amount of time AND whatever then put in top spender segment is one segment,...