Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 22047

Python is a programming language commonly used for machine learning. Use this tag for any *on-topic* question that (a) involves `Python` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `Python`.

3 votes

How to shift my dataset to all positive values before applying BoxCox

Cube root, $x^{1/3}$, neglog, meaning sign($x$) * log($1 + |x|$), and asinh() are examples of transformations that apply regardless of the sign of $x$ and indeed preserve it. The big disadvantages of …
Nick Cox's user avatar
  • 59.5k
5 votes
Accepted

Pearson correlation to a uniformly distributed dataset

This isn't a quirk of Python numerics; it's a generic problem. …
Nick Cox's user avatar
  • 59.5k
4 votes
Accepted

Chart/visual for negative binomial regression

The heading "negative binomial regression" is a puzzle here as the distribution is defined only on the grades 0, ..., 6, so can't be negative binomial on that ground alone. However, your calculatio …
Nick Cox's user avatar
  • 59.5k
2 votes

Which model fit best for semi sinusoidal data?

The question seems confused. You ask about modelling, but your focus appears to be just replacing missing values. Replacing missing values does not absolutely require a model for the entire dataset. …
Nick Cox's user avatar
  • 59.5k
34 votes
Accepted

Use of circular predictors in linear regression

Wind direction (here measured in degrees, presumably as a compass direction clockwise from North) is a circular variable. The test is that the conventional beginning of the scale is the same as the en …
Nick Cox's user avatar
  • 59.5k
14 votes
Accepted

Retrieving minimum width that contains specified fraction of all values

Headlines: A keyword is shorth. For an R implementation and links to a current project with publications, see Günther Sawitzki's page at http://www.statlab.uni-heidelberg.de/people/gs/ There is a …
Nick Cox's user avatar
  • 59.5k
3 votes

Visualize a continuous variable against a binary variable

Variants on this question arise frequently: see for example Histogram or box plot, to compare two distributions of means?. I want to add to the fine answers to date, first by emphasising some small te …
Nick Cox's user avatar
  • 59.5k
24 votes

Why am I getting information entropy greater than 1?

The maximum value of entropy is $\log k$, where $k$ is the number of categories you are using. Its numeric value will naturally depend on the base of logarithms you are using. Using base 2 logarithm …
Nick Cox's user avatar
  • 59.5k
1 vote

How to clean data to produce a smooth histogram

The histogram arises, I guess, because what you are showing is the result of dividing integers that are mostly or at least often small, so some values are much more common than others. I don't think i …
Nick Cox's user avatar
  • 59.5k
5 votes

Dealing with categorical variables - Looking for recommendations

The premise is incorrect and the elaborate riff on how to tackle this in Python code is thus misdirected. … General purpose encoders, in Python or any other software, naturally will know nothing whatsoever about this circular scale. …
Nick Cox's user avatar
  • 59.5k
2 votes

find a general formula between two parameters using curve-fit

This is more by way of extra comments than a full answer, but I have a graph and summary statistics that can only be well shown in an answer. There are more decimal places here than may make sense, …
Nick Cox's user avatar
  • 59.5k
2 votes

How to Distinguish 22 Variables in a Stacked Bar Graph?

The questions to me include not only what to show but in what sense this could ever work. I am no biologist and at most recognise some of the names here (but couldn't explain them to pass a Biology …
Nick Cox's user avatar
  • 59.5k
1 vote

Normality test giving confusing results

Tha accepted answer from @Anthony makes the main point: your data have tickled a bug in the software you used. This is a bundle of extra comments using the sample given in Edit II as a sandbox. As …
Nick Cox's user avatar
  • 59.5k
2 votes

How to name and treat such a distribution of extreme values / outliers?

Detail: I don't use Python (hope to learn some one wet week with nothing else to do) so don't suggest code. Something like this graph shouldn't be difficult in any decent software. …
Nick Cox's user avatar
  • 59.5k
1 vote
Accepted

How to calculate percent similarity between two sets of compositional data

One measure is variously known; I think I first encountered it as dissimilarity index, but watch out as that name is certainly generic as well as specific. The recipe is for dissimilarity between $j$ …
Nick Cox's user avatar
  • 59.5k

15 30 50 per page