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

Cluster analysis for categorical data with multiple values per category

I did a cluster analysis for my dataset which is categorical with multiple values coded for each category. Basically, I encoded my data with one-hot encoding method and run a k-mode analysis. However, ...
0
votes
0answers
4 views

Error in py_call_impl(callable, dots\$args, dots\$keywords) - case similar to Leprechault but [migrated]

I am facing an issue that I am not able to solve for hours... and I think I need some help. I am starting from an example Keras in R example that is working fine in my environment Then I am using ...
0
votes
3answers
38 views

I come across with this code. I would like to know what it means in R Programming

A training dataset, which contains 150 columns, then I found the following code somewhere, training <- training[, 6:dim(training)[2]] what I understood is it is ...
2
votes
1answer
14 views

What are the main differences between uwot and umap packages in R?

There are two packages in R that implement the UMAP algorithm for low-dimensional embedding ('uwot' and 'umap'). I've found they can give vastly different results for some datasets. For example, the ...
3
votes
1answer
35 views

Calculate the standard error of the difference between two independent proportions

Edit: This may be better for stats stack exchange but I'm in a data mining class and we use R so I'll ask it here as well just in case anyone knows how to do this with R instead of manually. Here's ...
1
vote
0answers
11 views

Methods for comparing datasets for abnormalities

My team at work receives datasets from various companies each quarter, and we're wanting to build some sort of machine learning model that compares the new dataset to our existing data for any ...
1
vote
0answers
6 views

Legality/common practice when calling APIs in an R package?

Without getting into too much detail, for a personal project, I have built a model in R that will call Google Maps Platform API see here to pull driving times for a user’s given input and perform a ...
0
votes
2answers
13 views

Recieving all N/A when filtering with R

When I am trying to filter my dataset to include rows only where dayname=Monday, I receive feedback but it is all N/A. My dataset has no N/A included. Could someone please help? below is my code. <...
1
vote
1answer
25 views

Diachronic topic modeling with chaning set of topics

In short, the question is: how can I build a regularly updated chain of topics which would also show how topics emerge and disappear over time? To be more precise: I have a data with timestamps ...
0
votes
0answers
23 views

Hierarchical and fuzzy C-means clustering

I computed hierarchical clustering and the best classification requires k=8 clusters. I wanted to find the probability of belonging to a cluster for each unit so I used fuzzy C-means clustering with k=...
1
vote
0answers
16 views

Different data dimension when indexing with R

I am facing on something that I cannot explain, so may be someone could explain me. I have a dataset which contain 102011 data. I want to take 70% for the train and 30% remaining for the validation. I ...
1
vote
1answer
42 views

How do I know if this model is overfitting?

This is my example R script for a decision tree: ...
2
votes
1answer
33 views

Multiple AUCs in R [closed]

I've been using an interpretable machine learning package for binary decision trees known as IAI. Long story short: the core method here is known as an 'optimal classifier' (it does not use greedy ...
3
votes
1answer
54 views

New classification in Machine Learning KNN model

This is my example of KNN model (I write it using R): ...
3
votes
0answers
21 views

What are descriptors

I am very new to data science, and r programming specifically. Could some explain what a descriptor in data science is? In particular, what are the differences between a 2d and 3d descriptor? Thank ...
1
vote
0answers
7 views

R Phi Coefficient Calculation [closed]

I have a dataframe in R and am trying to determine the Phi correlation coefficient between 2 binary (aka dichotomous: 0 or 1) variables, each one in a column (column1 and column2). I have installed ...
2
votes
0answers
39 views

sugestion on workflow manager for R

I have several people at work using Apache Airflow to manage their python models in production. However, I have some projects on R that I don't have the budget to change to Python - what would be a ...
1
vote
1answer
26 views

Using glue to include information regarding selected observation

I would like my ggplot to display the state I had selected for better clarity but it seems like glue is only seeking for the first observation rather than my desired output. ...
1
vote
0answers
14 views

Hidden integers being attached to my data in Azure ML

I've been trying to solve an issue with a piece of time data for a while now. I cannot convert it to DateTime using the Edit Metadata module, or turn it into a numeric value, or bin it. However, every ...
0
votes
0answers
12 views

unnest: "Object not found"

I am trying to run an unnest function on a data frame containing the column 'models': ...
0
votes
1answer
26 views

Why is there no R `formula` parameter in Scikit-learn models?

I was comparing both R and Python implementations of various models, such as Generalized Boosted Regression and Generalized Linear Models, and I was wondering why in R it is usual to see the ...
1
vote
0answers
19 views

Linear regression of times series data with heteroskedasticity

I am trying to find out if stock market movements, on average and in extreme conditions, affect gold prices. I am following the regression model proposed by Baur and McDermott (2010) which is given as:...
0
votes
1answer
41 views

Plot two categorical variables against two numeric variable in ggplot

In my dataset, I have two numeric revenue features, one for each month, and two categorical features one for region and other for value segment. what I want to do is compare these two revenues col by ...
2
votes
1answer
49 views

Logistic Regression to model a rare event

I have a data set which has data on consumers and a flag for whether they have expressed interest in a product or not. I am looking to build a model using R which will be able to predict whether or ...
1
vote
0answers
17 views

Sudden jumps in accuracy with logistic regression and bag of words : "glm.fit: algorithm did not converge"

I work on a bag of words, on the Toxic Comments Classifications challenge. The challenge is closed but the dataset is very nice to learn. I use R, tf-idf, tm, and logistic regression. I have a strange ...
0
votes
1answer
20 views

How to choose the right predictors for a classfication model?

I am working on a classification problem. I have two models: Logistic regression model Random Forest model For the first model, if I choose the only predictors with p-values<0.05 I will reduce ...
0
votes
0answers
15 views

Is it worth switching from dplyr code to data.table in r shiny that have various reactive data?

I am sort of new in R & recently came across data.table package that is probably ~ 10 times faster than dplyr in various operations. I have a shiny app based on Covid data that is getting heavier ...
0
votes
1answer
20 views

Filter for top 10 highest values of group in dataset (in R)

Context: I am trying to find the top 10 highest values of count in my data frame conditional on them falling within the years 1970-1979. My data frame looks as below: ...
0
votes
0answers
14 views

Error in hclustfun(distMatrixR, method = method) when I am making a heat map

I am trying to create a heat map with this data in pastebin. However I am getting the error: ...
0
votes
0answers
10 views

Clustering Mixed Data Types

I have a dateset with 67 variables consists of 9 numeric and 58 factor variables. which clustering method do you think I can use?
0
votes
1answer
14 views

Time Series with Exogenous Variables

What are the times series methods can I use to incorporate exogenous variables in the series other than ARIMAX and LSTM?
1
vote
1answer
71 views

Calculate importance of input data bands for CNN image classification?

I constructed and trained a convolutional neural network using Keras in R with the TensorFlow backend. I feed the network with multispectral images for a simple image classification. Is there some way ...
0
votes
0answers
19 views

LSTM Autoencoder for variable length data

I have a dataset composed of data about client interactions. For each client I have a variable number of interactions ( client A has 2 interactions, client B has 1 interaction, etc...) This ...
0
votes
1answer
16 views

How to program conditional statements for this problem in r

Situation: I'm trying to program the following in r. Task: I am trying to select for words that appear as nouns in my dataset more than they do as adjectives, verbs, or adverbs etc. I have all these ...
0
votes
0answers
8 views

Rstudio Keras Attention manual calculation disagrees with the layer output

I am trying to reproduce the math inside the Keras Attention (dot-product), based on Rstudio Keras wrapper. In R I use the ouput of an LSTM layer: sequence representation (query) and last hidden state ...
0
votes
0answers
22 views

Building a Model for Time Series Data in R (no forecasting)

Problem: I had planned to use a linear regression model to model time series data in retrospect (i.e., no forecasting). However, I am wondering if this is the best option having come across a few ...
0
votes
1answer
19 views

what is the formula used in the scale_quantile function in R? [closed]

I want to know what formula is being is in the package scale_quantile by the dynutils package. I want to check if I can achieve the same results as with manual calculations like this ...
0
votes
0answers
18 views

Parsed source code classification - a text classification problem?

I'm new to machine learning, so excuse me if this is a foolish question. I'm working on a data science project in R, where I try to predict whether a Swift code ...
1
vote
0answers
15 views

Prediction method when the time series is not sequential?

I have multivariate time series data consisting of monthly sales of contraceptives at various delivery sites in a certain country, between January 2016 and June 2019. The data looks as follows: The ...
0
votes
1answer
29 views

Replace NAs with random string from a list [closed]

I have a df with a variable (fruit) that has some NANs. I would like to replace the NANs only in this variable with a random string from a list (eg; apple, banana, peach, pear, strawberry). Any ideas?
0
votes
0answers
109 views

Var_Imp Algorithms in Pred/Class Problems: Can I use it in TS Problems?

OBJECTIVE OF THIS POST: Solve a query about the possibility of use prediction/classification variable importance tools in a time series type dataframe. Collect the largest number of variable ...
0
votes
0answers
14 views

identifying time series with threshold breach potential

(moved from stackoverflow.com) Hi all, I'm trying to solve a following problem. I have a set of various devices feeding their readings into a system where they are stored as time series: timestamp, ...
0
votes
0answers
12 views

Dataset that's already encoded, mixed types, methods for EDA and clustering?

I have a dataset that is already encoded (so it looks like table 2) with numbers (ie. each state & flavor have an assigned number, likeliness to try new flavor is on a scale 1-5, etc.) I would ...
0
votes
0answers
14 views

How to find mixing ratios in a mixture model with known parameters?

This question does not ask for a formal solution or rephrasing, but for a practical implementation. That is why I am asking here and not on [cross-validate](https://clustering stats.stackexchange.com) ...
2
votes
0answers
28 views

A simple logistic regression using keras and R

I am new in ML. I try to run a simple logistic regression using Keras in R. I have 0 or 1 in a train$y data set. It corresponds to ...
2
votes
1answer
25 views

Removing Outliers within R Works on One Attribute But Not on Second

(Note: this is part of a homework assignment. I am not asking for a solution to the assigned problem, I am just confused by some behavior in R.) I have a dataset loaded into an R script as a dataframe....
2
votes
1answer
23 views

Use dummy variables to create a rank variable. R

I have a series of multiple response (dummy) variables describing causes for a canceled visits. A visit can have multiple reasons for the cancelation. My goal is to create a single mutually exclusive ...
0
votes
0answers
28 views

What do you suggest to increase the sensitivity rates in conventional ML model?

I have an imbalanced data problem (prop. rate: 0.8571429 0.1428571) and for this reason, our sensitivity and PPV rates are very low. What do you recommend to fix this problem in R or in general? See ...
0
votes
1answer
80 views

How to plot a table with multiple columns as a box plot

I am trying to plot a box plot with the Trinucleotide as the x axis (so 64 trinucleotides on the x axis) and the frequency of each trinucleotide in each of 6 samples then color code the plot according ...
1
vote
1answer
25 views

Why checking the distribution of data is needed before calculating Gower distance?

I read this article(Clustering datasets having both numerical and categorical variables) to learn how to perform clustering on datasets with not just numerical variables. Before calculating the Gower ...

1
2 3 4 5
28