Hot answers tagged

7 votes

Using KPSS test in Python with statsmodels

Have you plotted your data? I did. Does it look stationary or “almost stationary” to you?
  • 5,652
4 votes

Consistency of values generated with a Poisson inverse function and random numbers in Python

If you are surprised that a large proportion of your simulation runs have an absolute difference between wins and losses of more than $50$ games i.e. more than $\pm 0.5\%$ of the $10000$ games ...
  • 32.3k
2 votes

Using KPSS test in Python with statsmodels

I didn’t count how many points you have, but it looks like “a lot” is a good description. When you have “a lot” of points, hypothesis tests have the power to reject small deviations from the null ...
  • 35.4k
2 votes
Accepted

Is this simple, univariate logistic regression valid?

Firstly, a key question is how the 4 groups were created. If it's treatments assigned by randomization that you want to compare, then proceed as you did (unless there's important intercurrent events) ...
  • 24k
2 votes
Accepted

Plotting ideas for large number of unique catagories

If I understand it well, your data is low dimensional, only one column of categories and another column of prices I would order the categories for cost in the abscissa axis and its cost on the ...
2 votes
Accepted

Is there an R or python package to calculate wasserstein metric between negative binomial distributions?

In R, you can use emd() in the emdist package. In Python, there is ...
2 votes
Accepted

How to split data as train and test set in a fixed manner?

LOOCV does not count more than one row of data as a holdout set, that is what most ready-to-use implementations do by default. However, you could do leave-one-sample-out-CV. one half (450x1015) ...
1 vote

How to motivate the definition of $R^2$ in `sklearn.metrics.r2_score`?

Squared correlation between the feature and the outcome That would be the case if you have a single feature and the model is linear regression. Squared correlation between the outcome and the ...
  • 120k
1 vote

Oversampling for Continuous Values

Oversampling will mainly bias your predictions. This thread looks at oversampling in the context of "unbalanced" classification, but it applies to your situation, too. Your problem appears ...
1 vote
Accepted

Anomaly detection, LOF vs IsolationForest

First note, that both methods create outlier scores, and such an ordering of the data is often more useful than a simple assignment of a binary value. You should rather assign a threshold for the ...
  • 7,566

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