# Tag Info

### Significance test for comparing different 10-fold cross-validated Machine Learning Regressions

Here's my take on the situation:   won't running repeated cross-validations (and thus leading to an unlimited N mean that every comparison of models is infinitely good if you are as long as you run ...

### When should I balance my data using AUROC and AUPRC?

ROC curves are insensitive to class imbalance. This means that if you re-balance your data, you will obtain (statistically) the same ROC curve. PR curves are sensitive to class imbalance, specifically ...
• 2,899

### Given a specific value for a variable, how do you find the predicted value of a fixed effects multivariate regression?

You have to use I(N^2) instead of N^2, because otherwise lm() interprets ...
• 2,958

### When there are many more controls than cases, can I take only part of the controls?

Can I take a random sample (e.g., 10,000) of 60,000 observations with disease (-) to build the predictive model? Let's try it out. The code below simulates data and fits two times the data one time ...
• 46.5k

### How to predict multiple future values in a linear model in R?

To predict $credit_{t+1}$, you need $year_{t+1}$ (which you have) and $student_{t+1}$ (which you don't have). So first you need to create a model (or a formula) to predict that. Looking are your data, ...

### Applications of Dynamic Time Warping (Time Series)

DTW is an algorithm for measuring the distance between two time series. It's an alternative to the Euclidean distance (which is the mean squared distance between the time series at each time step), ...
• 476
1 vote

### How to label target dataset based on reduced dimensions of a source dataset?

You can apply the same principal component transformation from the source dataset to the target dataset. This will map your target dataset from the initial N dimensions to the same M dimensions, ...
• 5,743

### Intuition for confidence intervals vs prediction intervals for linear regression

You can understand the confidence interval as an interval for the mean, which gives information about the uncertainty/variance of the model itself. A prediction interval is an interval for a single ...
• 48
1 vote

### Intuition for confidence intervals vs prediction intervals for linear regression

A confidence interval is for the mean of a group of people who have the same input values for your X. If all assumptions are met, 95% of the confidence intervals you calculate will contain the true ...
1 vote

### Negative prediction values from linear regression in R

[UPDATED] A typical times series interpretation doesn't apply in this case. It's more like a panel data, just to point out. There are more than one value per year. I suspect there are many models of ...
Accepted

### Negative prediction values from linear regression in R

You have a linear fit that does not predict well for cars older than ten years. This is because most data points are for cars younger than 10 years old and these will dominate the fitting. If you ...
• 46.5k

### Negative prediction values from linear regression in R

You didn't constrain the output. Without such a constraint, you allow for any real number to be predicted, including numbers that are ridiculous. For instance, logistic regressions constrain the ...
• 31.1k
1 vote

### Forcing covariates to always be part of a Lasso model

Lasso by default adds a regularization penalty for all the parameters, but nothing prohibits you from penalizing only some of the parameters. Running lasso and "adding back" the zeroed-out ...
• 113k
1 vote

### Forecasting based on few samples

Your data can be plotted as follows: Note: Always plot your data! Especially if you want to forecast. In covid models, a V-shape recovery has been quite frequent. The blue line is your data. The red ...

### Choice Between Alternatives in Machine Learning

It's not a machine learning problem and it is a bad idea. First, it is ethically dubious to have black-box software to make career decisions that would potentially influence the future of those ...
• 113k

• 113k
Accepted

### Neural Nework and mathematical programming

We can use the ReLU activation function and derive a linear equation from a neural network. Further information is presented in this paper (doi: 10.1007/s10601-018-9285-6)
• 129
1 vote

### Is underdispersion problemetic for predictive poisson models?

If you are only interested in the predictions, then a Poisson regression model and a quasiPoisson regression model gives identical predictions, whether there are under- or over-dispersion. The ...
• 64.9k

Top 50 recent answers are included