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

Questions tagged [r]

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

1
vote
0answers
15 views

python calculating degree days

I am trying to write a program in python to calculate growing degree-day for a specific insect out of average hourly temperature. The way you calculate growing degree day from hourly temperature is by ...
0
votes
1answer
14 views

How to migrate R decision tree to Java

I have trained a conditional inference decision tree in R using library party with function ctree and saved the model in an <...
0
votes
0answers
6 views

problem in shaping unbalance panel data to run mixed multinomial regression?

I have followed 'mlogit' paper to prepare my unbalance panel data for multinomial (panel) regresssion, but I failed to run the panel regression. After reading some posts, I beleive I have a data ...
0
votes
2answers
20 views

Delete rows of a column using another column statistics in R [closed]

I have a dataframe with the following columns: If a year (see "year" column) has less than 10 weeks reported, I would like to delete it from the dataframe. The column "weeks_reporting" gives the ...
0
votes
1answer
14 views

generate a report in R where the value in each Column is to be derived from different tables in sybase databasea

I work in a stress testing team. my boss has asked me to generate an interactive report every day using different tables in a Sybase database. I know the table structure and sql queries, but can't get ...
2
votes
2answers
49 views

How can I detect significant changes in my data?

I have a dataset like this: ...
1
vote
0answers
18 views

Do C 4.5 or C 5.0 perform multi way split or binary split?

Suppose that I am using a continuous variable as an independent variable (although a bad choice) for C 4.5 or C 5.0 (tree based classifier). I am having a hard time figuring out does C 4.5 or C 5.0 ...
0
votes
1answer
30 views

Keras Fit Function (R): Train Regression Model with multiple Labels

I am trying to implement a deep learning model in R using Keras. Let's say I had a dataset of people's faces and a CSV with information about the person's age, gender, and ethnicity. I want to train ...
1
vote
1answer
32 views

Tuning svm and cart hyperparameters

I am trying to optimize the hyperparameters of SVM and CART with tune() function of e1071 R package, but I have a doubt. Should I tune the parameters on the training data, fit the model on the ...
0
votes
2answers
21 views

Replace Values in Vector on Specific Place in R

I want to make $5^{th}$,$10^{th}$,$15^{th}$,$20^{th}$ and $25^{th}$ values of vector an outlier in all xs by using x1 [5]+OT1,...
1
vote
1answer
10 views

I want to be able to collapse and sum values dependent on the gene name!

I have a table that looks like this: I want add together all the values for each gene for each column. For example, for LINC01128, it should read: ConN1 ConN2 ConN3 StN1 StN2 ...
1
vote
0answers
19 views

Multiple grouping in R

I would like to group the parts of pipeline by the name (OZNAKA_ODS) and lenghth(Dolzina) of the pipeline. Further i would like to write a new atribute table with only identical names of pipelineand ...
1
vote
0answers
25 views

Is this random forest logical correct and correct implemented with R and gbm?

For professional reasons I want to learn and understand random forests. I feel unsafe if my understanding is the correct or if I am doing logical errors. I got a data set with 15 million entries and ...
2
votes
0answers
14 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 ...
0
votes
0answers
19 views

What would be the equivalent of R's mboost in Python?

I am looking for the Python equivalent of R's mboost package ( mboost ). Would that be xgboost?
1
vote
1answer
15 views

How can I sort a data frame by groups? [closed]

I am using R. I have a data frame with "year , price, mileage" columns. I want to group the df by year first and then sort each group by mileage. How can I do this?
0
votes
0answers
17 views

predict() xgboost model with weights

I am working on a xgboost model with a weight. ...
0
votes
0answers
25 views

Test and compare Model Performance

I have a 93 x 41 data frame in r, with three response variables, one numerical, one binomial and one multinomial. I'm employing various feature reduction methods (VIF, PCA, PCA+ICA, Relief) and ...
1
vote
2answers
34 views

Theoretical Question: Data.table vs Data.frame with Big Data

I know that I can read in a very large csv file much faster with fread using the data.table ...
0
votes
1answer
26 views

Running multiple random forest and combining them

I am trying to build a random forest model in R (RStudio). My training dataset has around 2 million rows and 38 variables. When I tested 5000 rows from this dataset I was able to build the random ...
0
votes
0answers
34 views

Beautiful output for table function in R

I work with R in the Jupyter environment. I would like to see the table output on one line. What should I do? ...
0
votes
1answer
48 views

Linear Regression performance in R

I have a problem with R's performance: here is my Script. The problem is that I need to use it in a base with ~6m of clients (with one linear model per customer) and it's taking to long to process. ...
1
vote
3answers
67 views

R summarise with condition

I have customer data with the products they purchased and the purchase date. I want to extract a result that shows each customer and the first two fruits they purchased. My actual set has 90000 ...
0
votes
1answer
18 views

how to I replace numeric values with a string in an R dataframe?

I want to replace all numeric values in a column in my data frame with a string value. The following doesn't seem to work. ...
1
vote
0answers
14 views

k-means cluster analysis for pitch curves in r [closed]

so I have many pitch curves time normalized. I though of using k-means as tool for automatically cluster these. I have the hypothesis that they correlate to three patterns but I want to go for an ...
1
vote
0answers
20 views

How to make a hybrid ARIMA and SVMs model in R

I want to combine 2 awesome models for data prediction / forecast - an ARIMA and an SVMs model, and thus I want to reduce standard error for the hybrid model. Currently, here's a graph showing them in ...
3
votes
0answers
52 views

Julia programming language [closed]

I've heard a lot of buzz for Julia programming language and how it's the future of AI. Should I buy into the hype and start learning Julia? Or do you think its better to stick to a better established ...
0
votes
0answers
23 views

Can I make some nodes in keras immune to regularization?

I'm building an architecture to correspond with a partially linear model: $$ y = \alpha D + \mathbf{X}\beta + f(\mathbf{Z}) + \epsilon $$ where the $f$ is a neural net, and keras/tensorflow trains ...
3
votes
2answers
61 views

Which is better for a beginner: R or Python? [closed]

From what I can tell, R and Python are the two most popular languages for data science. My question is which one would you recommend for someone just starting out in data science? Does any one have ...
0
votes
1answer
22 views

What is the difference between Missing at Random and Missing not at Random data?

I have been working with a dataset where the missing data seem to following a few particular patterns. I have gone through a lot websites and articles related to missing data but I haven't been able ...
0
votes
1answer
20 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 ...
5
votes
1answer
62 views

How far can one go with excel? [closed]

in my business we handle all analytics through Excel. This includes mostly scheduling, production planning and accounting operations. We currently are looking into adding a bit of predictive modelling ...
2
votes
2answers
20 views

Misclassification Rate for Random Forest Plateauing too Early

Using R, I have created 5 different random forest models using 5 different numbers of trees (3,10,30,100,300). My intention was to compute the misclassification rates of each of these models and plot ...
0
votes
2answers
53 views

Visualizing a large graph (10'000 nodes)

I am currently trying to find a way to visualize a graph which has 10'000 nodes, and about 20'000 edges. I was trying this javascript library, but quickly realised that this is too computationally ...
1
vote
0answers
49 views
0
votes
0answers
12 views

Exponential smoothing trend curve frequency

I want to predict week by week the numbers of orders. Data : all the year for 2013 to 2017 (52 weeks) and 25 weeks in 2018 Time serie plot : ...
-1
votes
1answer
26 views

In reference to Gamma Gamma spend model, is this in any way related to Pareto/NBD, BG/NBD or BG/BB model?

The reason I ask this question is as follows: I am currently in a remote intern position. I've been asked to calculate the Customer lifetime value (past + future) for each customer based on monthly ...
0
votes
0answers
72 views

Error in summarise_impl(.data, dots) : Evaluation error: argument “yes” is missing, with no default

I have a data frame with 3 columns: session id, item id and class. In the class column, 0 represents 'not purchased' and 1 represents 'purchased'. ...
0
votes
1answer
82 views

Julia - To Learn or Not to Learn? [closed]

I'm relatively new to data science, having done some machine learning projects at work. My background is in R, although I have some experience in Python. I'm considering choosing one language and ...
1
vote
1answer
24 views

Combining outputs of ridge regression models?

I am facing an issue where I have 7 sets of different variables/columns/predictors. I am trying to predict same target variable and I want to observe the importance/effect of all the sets according ...
2
votes
1answer
34 views

Duration in seconds the session lasts

i have a dataframe contain session start and end time ...
0
votes
0answers
29 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
26 views

calculating average of each session by unique itemID

i have a data frame ...
0
votes
0answers
19 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 ...
1
vote
1answer
37 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
32 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
10 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 : ...
1
vote
0answers
39 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
15 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 ...