Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

2
votes
0answers
25 views

Duration in seconds the session lasts

i have a dataframe contain session start and end time ...
2
votes
0answers
16 views

`mean` returns NA in R

A table fitness in R has three columns. I am trying to get the mean value of them for each row, so I use this piece of a code: ...
0
votes
0answers
17 views

Different results for Linear Regression using lm (R) vs linear_model (sklearn-python)?

I'm implementing a linear regression to compare users (categorical variable) to a percent difference (target variable and continuous). When I was using linear_models from sci-kit learn (python), the ...
0
votes
2answers
20 views

calculating average of each session by unique itemID

i have a data frame ...
0
votes
0answers
10 views

How to make a contingency table from survey data

I am trying to run a correspondence analysis in R, using survey data. I usually run this in SPSS, but am struggling to create the contingency table I need in R. I have 14 brands and 15 attributes ...
0
votes
1answer
33 views

finding start and end time of each session id in r

suppose i have a dataframe suppose i have a dataframe ...
0
votes
0answers
11 views

What defines tidy data formatting in the tidyverse?

I'm working through a training video on beginner use of R. One of the features it points to is the "tidyverse". Here it defines tidyverse data as "Each variable must have its own column. Each ...
0
votes
0answers
14 views

Scorecard in R/Python, save in PMML format

Does anyone know how to build a Scorecard model in R/Python? and save it in PMML format? Is there any popular implementation in R/Python (or some other language)? Please feel free to respond even ...
1
vote
0answers
9 views

How to work with string data with a lot of NAs in an aggregation task with R

I have recently taken up a data wrangling task and inherited a data from my predecessor which contains keyphrases extracted by hand like the following : ...
2
votes
0answers
8 views

hdfs.init() Error in RHadoop [migrated]

After setting up Hadoop single node cluster on my machine, I tried to execute commands using R-Studio in windows. However, I am getting an error message with following code: ...
1
vote
0answers
35 views

R codes for “Matrix estimation by Universal Singular Value Thresholding”

Consider a real demand estimation problem of a retailer where matrix Y is the real demand need to be estimated by using sales data (matrix) X which is bounded by stock (matrix) C. The estimation ...
0
votes
0answers
12 views

Relief Algorithm misses relevant feature?

I have a generated a set of imbalanced data: 70 samples of class 1 and 1000 samples of class 2. The target variable and all predictors are boolean. I've made two predictors that should be relevant to ...
1
vote
0answers
16 views

using deep learning with kares to produce ANN model Error: could not convert string to float: '2014-04-02 17:50:04'

i am trying to fit a model a using deep learning with kares to produce ANN model using the following code Load libraries ...
0
votes
0answers
14 views

increase accuracy of DNN tfestimator in r

I'm trying to use tfestimator for purchase prediction that the customer will be either a purchaser or not. For this purpose, I used deep neural networks using the code mention below. ...
2
votes
0answers
16 views

personalize the output with Rstudio

I'am trying to mine some data with Rstudio, but i have problem in the output results. Trying to search big number from 100000 to 900000 the function works well but ...
1
vote
0answers
9 views

How do i create the same categories across two or more variables(columns) when converting integers to Factors in R?

I did merge the columns, arranged them as rows and then converted them to categories. I just wanted to know if there was a better way in doing this.
2
votes
0answers
8 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 ...
0
votes
0answers
11 views

Binomial Test with Bonferroni Correction

I have 28 images that I am showing individuals (2 at a time) in which they select their favorite image. I have the following metrics for each image image1,image2,number of people who selected image1,...
0
votes
1answer
28 views

converting column from a factor to date format YYYY-MM-DDThh:mm:ss.SSSZ

i want to convert the whole column from a factor to date. The str of the dataset I am using is given below: ...
2
votes
1answer
31 views

getting error while installing install_tensorflow()

i am trying to install tensorflow in r library. when i try to install using ...
0
votes
1answer
14 views

Fitting an arimax model on out of sample dataset

I have built an arimax model where we have sales data across time as the response variable and price is one of the external variables. I used the below code to build a simple arimax model. I had data ...
1
vote
0answers
18 views

Statistical Significance in Pairwise Ranking Algorithm

Can anyone recommend an algorithm/toolkit to rank items that have been rated in a hot-or-not style that gives statistical significance? For example, out of a set of N images, two images are shown to ...
0
votes
0answers
13 views

Parameter estimation of somewhat complex model

I have a model that consists of three parameters that are unknown. What I need to do is get the best fit for these parameters from some data I have. The model is given by: $$NTCP = \frac{1}{\sqrt{2 \...
0
votes
1answer
18 views

Finding the equation for a multiple and nonlinear regression model?

Regarding nonlinear and multivariable regression, I use R or Matlab. In the case where a regression with just two variables, I simply draw the graph Y with respect to X, and look for the equation of ...
0
votes
0answers
7 views

R: Unable to change background color dynamically in Wordcloud2

I want to dynamically change the background color of wordcloud based on input selection in my shiny UI, a reactive value. But wordcloud2 just won't recognise the change in the variable: ...
1
vote
0answers
20 views

Evaluating the performance of a random forest classifier

I'm using a random forest classifier (in R) to impute missing data in a dataset. Basically, I have a bunch of objects (companies) and I want to guess an attribute (...
0
votes
1answer
32 views

Setting up network communication between R and Python [closed]

I want to share data between R and python via network sockets (I expect the solution to also work for R-R and python-python). I am interested in server being both R and Python side. For now I am ...
0
votes
0answers
53 views

XGboost - different AUC score when using R and Python

I had a project in R which I used XGboost in R and got AUC of 74%. I needed to transfer the project to python, I used the same dataframes: train and test as I used in R. I used XGboost (XGBClassifier ...
0
votes
1answer
51 views

250 Categorical values

I have a dataset which has only categorical values. As I came across a few articles people suggested that KNN / Random forest would work for dataset like this. Though in R it couldn't handle as if ...
0
votes
2answers
19 views

R - Order each matrix inside a list of matrices

I have a list where each element is a matrix, and I want to order each matrix individually Order a matrix is as easy as this: data <- data[order(data$value),] ...
0
votes
1answer
16 views

R error condition has length > 1 [closed]

Hi i am getting this error: Error in if (x < min) { : missing value where TRUE/FALSE needed In addition: Warning message: In if (x < min) { : the condition has length > 1 and only the ...
0
votes
0answers
15 views

Output Machine Learning Model

Fairly new to data science coming from traditional social science research If I use a machine learning algorithm like k-means or even a neural network, it eventually commits some kind of structured ...
0
votes
2answers
17 views

Interpreting Results of Multivariable Regression / how to transform variables to improve results

I am working on a project that predicts the Market Cap (value) of different crypto-currencies. My data is very small (51 observations) and I initially have 18 X-variables. I was hoping to get feedback ...
0
votes
1answer
36 views

Errors generated in Rstudio [closed]

I'am using Rstudio to create some codes. the cods works pretty well, without any error and gives the output desired. But when I turn on the PC after period and re-execute the same code, it generes ...
1
vote
0answers
61 views

could not balanced large dataset

i tried various techniques such as oversampling, undersampling, ROSE and both(oversampling and undersampling) on a imbalanced dataset to balance a dataset. when i applied all these techniques on a ...
0
votes
1answer
61 views

Do Data Scientists prefer MACS? [closed]

I see many Data Science (DS) tutorials done on MACS, and many DS blogs recommend MACS as the best developing platform, thus the quote "Data Science is statistics on a Mac" came more than once into my ...
-2
votes
1answer
68 views

train(): argument “x” is missing, with no default [closed]

when i am trying the the following code I am getting an error: argument "x" is missing, with no default. ...
3
votes
4answers
70 views

R: Checklist for data checking

I am new to data science and new to R. I see a lot of resources on data cleaning (i.e., dplyr, tidyr, tidyverse), but not so much on raw value verification. What are the "best practices" I should ...
0
votes
1answer
27 views

Extract datatable column by indexing a character vector [closed]

I am asking a similar question to this one except I am trying to index a vector of column names. If I have a data.table like a: ...
1
vote
1answer
31 views

Regression model for continuous dependent variable and count independent variables

I am currently learning R and I am relatively inexperienced in the field. Hope I can get some advice from you guys! I am working on a project where I have to estimate the average processing time of ...
0
votes
0answers
29 views

Regression algorithm for weak correlated target and features

I have a regression problem in hand. Dataset have 20 predictors and 1 target. Target is continuous and predictors are both categorical and continous. I performed a correlation test between continous ...
3
votes
2answers
110 views

Keras: matching logistic regression performance with sequential neural network?

Assume a binary classification problem and a relatively small dataset ($\sim \mathbb{R}^{5000 \times 39}$). By using common ML techniques, starting with logistic regression, I'm able to reach ~0.76-0....
0
votes
2answers
40 views

Lasso Regression Doubt

I was trying to solve one problem based on Linear Regression (Predicting the sales which is a continuous variable). I have used Linear Regression for the problem but there is one suggested solution ...
0
votes
2answers
73 views

R langauge how to create xgb.DMatrix object from data frame (newbe)

In R, how does one create an xgb.DMatrix object from an R data frame?
1
vote
0answers
13 views

How to implement Access control for Headers in r? [closed]

When i call service from client side then give that error. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access. The response had ...
0
votes
0answers
14 views

Decision tree and complexity parameter: balanced vs unbalanced data

I'm building a decision tree model with R, for a binary classification task, with two dataset. They are actually the same dataset, but one is extremely unbalanced whereas the other has been balanced. ...
1
vote
1answer
25 views

R problem with fraction numerals

Why do I have a non-zero result in the following calculation: 0.11-0.1-0.01 [1] -5.20417e-18 Seems to be an easy and akward question, but I will be very greatful for any help!)
0
votes
1answer
58 views

How to plot using facet_wrap, over multiple pages as a .pdf files in r cran

I am using ggplot, to compare 114 unique studies for a particular variable I'm interested in. This is what I have used. ggplot(steps, aes(x=factor(edu))) + geom_bar(aes(y = (..count..), group = ...
-1
votes
1answer
23 views

Unintuitive results when Expanding Binary Classification to Multiclass

I have aproblem where I need to predict when a Truck arrives to pickup something. Say we have formulated that a binary classification model, where 0: The truck coming for pickup today 1:The ...
1
vote
1answer
619 views