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
votes
0answers
6 views

Random forest - Function components [closed]

I'm using the R randomForest function to create prediction model. In this function, there are 2 components that I need help with: ntree - number of trees grown. mtry - number of predictors sampled for ...
0
votes
0answers
5 views

Adaptive Resampling in Caret with Pre-specified Validation Set

I was wondering if this is the correct way to get adaptive sampling in caret working with a pre-specified validation set using index. I can get this to work using the 'cv' method in caret like so <...
0
votes
0answers
13 views

How to auto-generate 'anchor links' and directory path to text search function? [closed]

I have a tokenized txt document with 'div' tags and 'id' to it : ...
0
votes
0answers
7 views

Similarity matching between two distinct datasets (marketing case study)

I am working for a company that sells different products to customers. My objective is to find customers that are likely to purchase product X based on the profiles of customers that already purchased ...
0
votes
0answers
9 views

Cannot use functions from the R packages, fda & pCODE, together given the error: “argument ”times“ is missing, with no default” [migrated]

I am currently investigating the Tank Reactor Equations from Ramsay et al and wish to find the variance matrix he used. I am using the R package, fda, specifically the function ...
1
vote
0answers
16 views

Why is the behaviour of groupby command different in R and in python with pandas? [closed]

if I execute the following lines of codes in R as well as python for groupby command, the order of the resulting ...
0
votes
1answer
27 views

Bad results for training set and good results for test set

When training an algorithm, I have ROC = 0.5896, Sensitivity = 0.3333, and Specificity = 0.8375. When considering the test set, Sensitivity = 1 and Specificity = 1. This could happen or is a problem? ...
0
votes
1answer
18 views

How to output my uploaded text in Shiny in R at the position of the screenshot?

I would like to position a long text on the right side of this Shiny app, as shown on the screenshot below. ...
0
votes
1answer
30 views

Creating dummy variables [closed]

I have a Eurobarometer dataset and want to eventually create a logistic regression model and a linear probability model using a set of dates as the dependent variable. However, the dates in the ...
0
votes
1answer
20 views

Randomforest parameter tuning R(caret) and Python(scikit learn)?

Question: is it possible, or even necessary, to perform a cross-validation check to tune the parameters of a Python randomforest implementation (eg scikit learn) when training a new model, as can be ...
0
votes
0answers
18 views

Unable to install R package (“tm”) [closed]

I have R version 4.0.2 and I am getting the following error when I try to install a text mining package ...
0
votes
0answers
16 views

Using Variable Names in Functions [R] [migrated]

Working in R I would like to make a function that calculates a weighted percentage for a dummy variable. I can't figure out how to use variables (field) names in a function. Am I stumbling on the ...
0
votes
0answers
39 views

Do I need to use learning algorithms for this type of data?

I'm studying the behavior of machine failures in a production scenario. For this, I generated random data to form my imbalanced training set, consisting of categorical data, which indicate whether or ...
2
votes
2answers
34 views

Measure correlation for categorical vs continous variable

Given a variable which is categorical that depends on continuous variables, I would like to know how to check wether these continous variable explain the categorical one. So: ...
1
vote
0answers
35 views

cor() function giving unexpected result for numeric data frame(Updated) [closed]

I have a file named "specdata" which has a lot of CSV that each have the columns: ("Date", "sulfate", "nitrate", "ID"). I want to calculate the ...
0
votes
1answer
19 views

Unsupervised Sentimental Analysis in R

How would you evaluate unsupervised sentimental analysis? I am reading on evaluating sentimental analysis and learning that much of the classification models that are being used, the data has target/...
0
votes
0answers
14 views

How to solve a simple recurrence relation in R? [migrated]

I want to work out a simple recurrence relation in R but I cant find resources anywhere online that allows me to do this. something simple like for $n=1,2,3$ $X_0=3$ $X_n=X_{n-1}+5$ then print all $...
0
votes
1answer
27 views

How do i iterate functions until convergence in R?

I am looking to iterate until convergence but I am not sure how i should code it. A simple similar example is something like $X_0=5 , Y_0=3$ for $n=1,2..$ $P_n=X_{n-1}-Y_{n-1}$ $Y_n=3P_n$ $X_n=P_n+...
2
votes
2answers
26 views

Resources for text classification algorithms

I'm mining raw Facebook comments (irrelevant) and i am looking for an algorithm that can classify their context as negative/positive/neutral. So you can think of the output in the form of two columns. ...
0
votes
0answers
16 views

Using deep learning or statistical tools to complete physical equation

I need to predict a continuous variable Y in a regression setting. Theory in the field tells me it should follow an equation of the form: $$Y=g_0(X)-f_1(X)g_1(X)-f_2(X)g_2(X)$$ Where X is a vector of ...
2
votes
1answer
47 views

Computing adjusted p-values in batches

Data For simplicity I propose the following scheme: I have two DataFrames, one with genes, the other with miRNA (it is a simple example, it is not the case what the DF are), the data are continuous: ...
1
vote
1answer
11 views
1
vote
1answer
14 views

Covert R dataframe column to Date

I have a R dataframe having a column with dates in multiple formats. I want to convert this column to date format. While some formats are converted others are not. Why is the second date not converted?...
3
votes
1answer
31 views
0
votes
0answers
16 views

Supervised Text Classification

I need to create a summarized report showing how many containers are being imported by each company. This report needs to be generated on monthly basis. The company names are entered in a way that ...
1
vote
2answers
26 views

R : Counting the number of observations per category

I'm currently starting out in R and wondering how to count the number of observations per day, per node, per replicate from the below dataset, and store in a different data set. The original dataset ...
3
votes
2answers
41 views

How to give breakdown of text prediction sentences in Shiny

I have created a text prediction app that displays 10 sentences based on the word searched in the toolbar. However, all the sentences are being displayed in a single toolbar horizontally. I would like ...
2
votes
2answers
36 views

Resampling train and test data in R

I need to try out few different machine learning methods (SVM, Logistic regression etc.), predict a value either true or false, and write down their AUC and Accuracy of these predictions. I have ...
1
vote
0answers
14 views

Factor Analysis with Mixed Data Concurrent Approach with PCAmixdata in R

I am trying to perform Factor Analysis over Mixed Data using R with PCAmixdata package. My dataset is huge with almost 115000 records and almost 40 features of both categorical and continuous. When I ...
5
votes
2answers
101 views

Data visualization with extreme far away points

I want to show points across two groups. However, for both groups, there are some points which are far away from most of the other points within each group, shown below. Any suggestions for this ...
25
votes
7answers
6k views

Is Python a viable language to do statistical analysis in?

I originally came from R, but Python seems to be the more common language these days. Ideally, I would do all my coding in Python as the syntax is easier and I've had more real life experience using ...
3
votes
0answers
30 views

Bag of words: Prediction on new (out-of-sample) data

I'm working with a bag of words in R: library(tm) corpus = VCorpus(textsource) dtm = DocumentTermMatrix(corpus) dtm = as.matrix(dtm) I use the matrix ...
0
votes
0answers
32 views

KNN regression in R

I'm studying a non-linear regression problem and I have read that K-nearest neighbors regression performs well in this case, is there an R implementation of this regression algorithm?
2
votes
1answer
34 views

Association rules in R / Subset rules based on feature

I tried using the apriori algorithm in the arules library for association rules mining in R. There's two thing I'd like to ask: Why are the lhs and rhs of the rules in intervals? For example U get ...
2
votes
0answers
17 views

User defined aggregations on data of around 200GB where row order matters

I am working with "medium large" data of around 200GB. The data are long form log files, where there are several thousand logs for each "entity". The entities are actually flights ...
2
votes
1answer
26 views

Linear discriminant analysis in R: how to choose the most suitable model?

The data set vaso in the robustbase library summarizes the vasoconstriction (or not) of subjects’ fingers along with their breathing volumes and rates. ...
0
votes
1answer
46 views

Units of mean decrease accuracy on a variable importance plot obtained from a Random Forests classifier?

To know the importance variable in a Random Forest I used The mean decrease accuracy and mean decrease Gini. I would like to understand what are the x-axis units of the mean decrease accuracy and mean ...
2
votes
1answer
26 views

How to split data in R using dplyr if we want to have rows of the same group to belong to the same split?

In my current pipeline, I have sensed that there is data leakage. This is because the same person, though with slightly different values, is in both training and testing set. As a result, my model is ...
1
vote
1answer
26 views

Random Forest command in R for selected variables

All I can find online is how a random forest is run on all variables in a dataset using the period: ...
0
votes
2answers
39 views

Linear Regression Model

I'm taking a course on Supervised Learning in R: Regression. There is a section where I'm supposed to predict blood pressure given age and weight. This is was MY approach ...
0
votes
0answers
24 views

E-step for EM algorithm for document clustering

I have a code for the E-step in the EM algorithm for Document Clustering in the version of hard-EM algorithm. I'm trying to implement the E-step for soft-EM algorithm. Here is my code for Hard-EM: <...
1
vote
1answer
44 views

Classification model to classify large number of classifiers?

Hello I am very new into the field of machine learning/deep learning , and I am finding it hard to select the right model for my research. What I am trying to build is a model to classify which ...
1
vote
0answers
28 views

Fastest way to parse regex in R

I need to parse around 1.6k REGEX expressions such as the pair I am writing below. I have also around 7k documents (1/2 page long each in average) that need to be parsed according to the REGEX ...
1
vote
1answer
13 views

Differerent ways to detect the appropriate number of topics

I implemet the LDA topic modeling in R. One essential parameter is the selection of the number of topics Which of the following ways could it be the most suitable: ...
0
votes
2answers
23 views

Calculating Median and Mode of numerical variables for different subgroups in R

I have customer call data and I want to get the median and mode for the call success rate for different subgroups. My variables are: Customer ID, Employment Status (Retired, Employed, Unemployed), ...
0
votes
0answers
13 views

Importing A Neural Network From Mathematica For Use In R

I am experimenting with platform interoperability between Mathematica and R. My aim is to create an untrained Neural Network using Mathematica, export this network in MXNet format as a .json file, ...
0
votes
1answer
19 views

Output model from GLM in R

I had generate in Ra logistic model using glm using binomial as family, but each session that I started in R the variable that I used to store the glm output gives me another output. Why this happen? ...
0
votes
1answer
26 views

How to create a barplot using multiple column [closed]

My data is about boardgames which contain 1 to many catgeories each like this : ...
1
vote
2answers
33 views

Calculate regression coefficients for individuals (low sample size regression)?

Is there a way to calculate the regression coefficients for individuals instead of just a group resp. calculating regression coefficients for a very small sample size? Background My goal is to test ...
1
vote
1answer
22 views

Random Forest in R with only character variables

I am new to using random forest in R an my goal is to identify the independent variables which have the highest impact on the dependent variables. I am looking at sales data, and sales is my dependent ...

1
2 3 4 5
25