Hot answers tagged

5 votes
Accepted

Multinomial logistic regression R vs Python

In case you are not sure whether a variable is being treated as categorical, you can manually one-hot-encode (=dummy coding) the categories to make sure you are using the variable as categorical. Then,...
user avatar
  • 22.3k
4 votes

transformation of a kernel density estimate to uniform distribution

The multivariate $d$ dimensional extension of the inverse cdf generation is incorrect, both because $F^{−1}(\cdot)$ does not exist and because $F(X)$ is not Uniform (0,1). (For instance, in the ...
user avatar
  • 91.8k
3 votes

Finding the position of the global optimum with Pytorch

The description of the particular network is not specific enough to understand what the model is, or how it works. Additionally, the terminology seems confused because datasets don't have parameters, ...
user avatar
  • 78.2k
2 votes
Accepted

using logsumexp in softmax

The idea of working in log-space to avoid underflow requires that the intermediate objects you use to track progress are themselves on the log-scale --- you only convert back to regular scale at the ...
user avatar
  • 94.5k
2 votes
Accepted

Interpretation of the linear predictor of a OLS model on binomial data

The difference is that OLS is 1) not using a link function and 2) assumes a different distribution of the data. Fitting a straight line model OLS works well when you have a linear model for the mean ...
user avatar
2 votes

In elastic net regularisation, will dividing the OLS term the number of observations cause misleading results when cross-validating?

It's correct that when the sample size is fixed, there is not a difference between the two statements of the optimization problem. Your demonstration in the revised question makes it clear that the ...
user avatar
  • 78.2k
2 votes

transformation of a kernel density estimate to uniform distribution

Background As stated in this as well in his prior question the OP wants to perform Bayes quadrature of an expensive function against a density, which is a Gaussian mixture as the result of applying a ...
user avatar
  • 1,663
1 vote
Accepted

1D cluster - Jenks optimization - Finding optimal number

This seems to be a two stage problem: first, identify the number of clusters and then, secondly, optimally perform the clustering. For the first part, I'd suggest Cluster Validation by Prediction ...
user avatar
1 vote

Does using grid search for hyperparemeters make test set redundant?

A good model selection question. Because Grid Search would already return the optimum hyperparamaters without users having to adjust the hyperparameters again. A grid type search for finding out ...
user avatar
  • 1,838
1 vote

Getting different AIC / BIC values for AR(2) estimation via AutoReg(2) vs ARIMA(2,0,0) through python statsmodels

When AutoReg was first included in Statsmodels in e.g. v0.12, it used the AIC definition from Lutkepohl's book New Introduction to Time Series Analysis, which ...
user avatar
  • 1,203
1 vote
Accepted

Correcting repeated measures data to display error bars that show within-subjects differences

Although I did not check the program, your logic is indeed correct and probably the best approach. This is the approach used in superb (article found here) for the R implementation. The whole process ...
user avatar
1 vote
Accepted

How to simulate non-gaussian stochastic paths

Posting as an answer as too long for a comment: The reason you're seeing the central limit theorem crop up here is because your returns at each time point are independent. I think what you want to do ...
user avatar
  • 126
1 vote

using logsumexp in softmax

matrix is on the log scale. If matrix were not on the log scale, then you would only want to do ...
user avatar
  • 78.2k
1 vote
Accepted

Bayesian Regression Credible Intervals/Standard Deviation extremely large

The bug is not in your implementation of Bayesian linear regression but in how you sample the errors in Y. Aside: You don't cite Pattern Recognition and Machine Learning by Bishop properly. In ...
user avatar
  • 2,156
1 vote

Wilcoxon.test in R will not calculate exact distribution due to ties (scipy.stats.wilcoxon will)

I don't have enough reputation points to add this as a comment, so although not an answer, hope it does help. I've adjusted your code a bit for convenience: ...
user avatar
  • 11
1 vote

Mean Accuracy and Standard Error of the Accuracy for KNN Classification algorithm

For each K, they're not producing multiple models. They're producing a single model for each K and recording the accuracy and standard errors.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible