A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Hot answers tagged

3

This thread may be useful to statisticians and data scientists because it shows how to construct arbitrarily "nasty" functions (that nevertheless are easy to handle mathematically and computationally) for testing algorithms that rely on optimization. One way to construct functions with specified local properties (like local minima) is to assemble them from ...


3

That test is to see if the means of two samples are different from each other. So what you really tested is if the average wind speed is different from the average number of passing yards. If you want to see the effect of windspeed on passing yards, what I would suggest is building a linear regression model, where wind speed is the independent variable, ...


2

While it cannot create the table in exactly how you specified, you can calculate risk ratios (and other measures) using the zEpid library. This library supports both calculating from summary counts (details here) and directly from pandas DataFrame objects (details here). The library does not directly calculate p-values, but you can easily do this by a ...


2

A zip code would usually be treated as categorical, since there is (presumably) no meaning to the actual value and difference between the numbers, or ordering. The year of building would usually be numeric, since there is a meaning to the numbers themselves - 1990 is earlier than 1999, and (as I write this in 2020) a house built in 2010 is twice as old as ...


2

Documentation is fine. The function will return an ndarray when you pass an nd array and an axis argument. Numpy's mean shows the same thing.


2

You made a slight parentheses error, your pdf should look like this, with the variance in the denominator of the exponential: pdf = np.exp(-np.square(valores-mean)/(2*variance))/(np.sqrt(2*np.pi*variance))


2

1.Book ISLR - tuning parameter C is defined as the upper bound of the sum of all slack variables. The larger the C, the larger the slack variables. Higher C means wider margin, also, more tolerance of misclassification. 2.The other source (including Python and other online tutorials) is looking at another forms of optimization. The tuning parameter C is ...


2

Just to state this up-front: most machine learning models just try to predict. They do not find/show causal effects, understand what is going on, model disease mechanisms or medical relationships. I.e. model explanations may not point to what happens in terms of causality/disease mechansim, but only highlight what appears to predict best. Something may be ...


1

If you already have a valid* logistic multiple regression model that includes confounders, there might not be much sense in trying to evaluate a numeric value of confounding magnitude. As the source you cite states under the heading "Summary of Control of Confounding," multiple regression analysis itself "provide[s] a way of adjusting for confounding in the ...


1

SOLVED: Issue was the dummy variable trap. Removing one of the seasonal binaries when feeding data fixed the issue


1

Forget about it, checking the scipy code I realized that the formula in my textbook is just false. Correct formula starts with $\frac{12}{N(N+1)}$ not with $\frac{12}{N(N-1)}$


1

What you called Self Mutual Information is actually Entropy. Indeed entropy can be also called Self Information (wouldn't use "mutual" anymore): https://en.wikipedia.org/wiki/Information_content $$ \mbox{MI}(X,X) = H(X) - H(X|X) = H(X) - \sum_x \sum_x p(x,x) \log{p(x|x)} = H(X) - \sum_x \sum_x p(x,x) \log{1} = H(X) $$ Thus, on the diagonal of that table ...


1

What about predicting the "corrections" for the default time? If $y$ is your time to predict, and $\tilde y$ the "default" time you know, so instead of predicting $y$, you would predict $y - \tilde{y}$ (i.e. $\tilde{y}$ would be an offset variable in regression). If this doesn't work, you can use logistic regression, as you mentioned, or use a single model ...


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