idx
int64
1
56k
question
stringlengths
15
155
answer
stringlengths
2
29.2k
question_cut
stringlengths
15
100
answer_cut
stringlengths
2
200
conversation
stringlengths
47
29.3k
conversation_cut
stringlengths
47
301
6,101
How trustworthy are the confidence intervals for lmer objects through effects package?
It looks like what you have done in the second method is to have computed confidence intervals for the regression coefficients, then transformed those to obtain CIs for the predictions. This ignores the covariances between the regression coefficients. Try fitting the model without an intercept, so that the batch effect...
How trustworthy are the confidence intervals for lmer objects through effects package?
It looks like what you have done in the second method is to have computed confidence intervals for the regression coefficients, then transformed those to obtain CIs for the predictions. This ignores t
How trustworthy are the confidence intervals for lmer objects through effects package? It looks like what you have done in the second method is to have computed confidence intervals for the regression coefficients, then transformed those to obtain CIs for the predictions. This ignores the covariances between the regres...
How trustworthy are the confidence intervals for lmer objects through effects package? It looks like what you have done in the second method is to have computed confidence intervals for the regression coefficients, then transformed those to obtain CIs for the predictions. This ignores t
6,102
Existence of the moment generating function and variance
This question provides a nice opportunity to collect some facts on moment-generating functions (mgf). In the answer below, we do the following: Show that if the mgf is finite for at least one (strictly) positive value and one negative value, then all positive moments of $X$ are finite (including nonintegral moments)....
Existence of the moment generating function and variance
This question provides a nice opportunity to collect some facts on moment-generating functions (mgf). In the answer below, we do the following: Show that if the mgf is finite for at least one (stric
Existence of the moment generating function and variance This question provides a nice opportunity to collect some facts on moment-generating functions (mgf). In the answer below, we do the following: Show that if the mgf is finite for at least one (strictly) positive value and one negative value, then all positive m...
Existence of the moment generating function and variance This question provides a nice opportunity to collect some facts on moment-generating functions (mgf). In the answer below, we do the following: Show that if the mgf is finite for at least one (stric
6,103
How can I efficiently model the sum of Bernoulli random variables?
If it often resembles a Poisson, have you tried approximating it by a Poisson with parameter $\lambda = \sum p_i$ ? EDIT: I've found a theoretical result to justify this, as well as a name for the distribution of $Y$: it's called the Poisson binomial distribution. Le Cam's inequality tells you how closely its distribut...
How can I efficiently model the sum of Bernoulli random variables?
If it often resembles a Poisson, have you tried approximating it by a Poisson with parameter $\lambda = \sum p_i$ ? EDIT: I've found a theoretical result to justify this, as well as a name for the dis
How can I efficiently model the sum of Bernoulli random variables? If it often resembles a Poisson, have you tried approximating it by a Poisson with parameter $\lambda = \sum p_i$ ? EDIT: I've found a theoretical result to justify this, as well as a name for the distribution of $Y$: it's called the Poisson binomial di...
How can I efficiently model the sum of Bernoulli random variables? If it often resembles a Poisson, have you tried approximating it by a Poisson with parameter $\lambda = \sum p_i$ ? EDIT: I've found a theoretical result to justify this, as well as a name for the dis
6,104
How can I efficiently model the sum of Bernoulli random variables?
I came across your question while searching for a solution to this very problem. I wasn't terrifically satisfied with the answers here, but I think there's a pretty simple solution that gives you the exact distribution, and is pretty tractable. The distribution of the sum of two discrete random variables is the convolu...
How can I efficiently model the sum of Bernoulli random variables?
I came across your question while searching for a solution to this very problem. I wasn't terrifically satisfied with the answers here, but I think there's a pretty simple solution that gives you the
How can I efficiently model the sum of Bernoulli random variables? I came across your question while searching for a solution to this very problem. I wasn't terrifically satisfied with the answers here, but I think there's a pretty simple solution that gives you the exact distribution, and is pretty tractable. The dist...
How can I efficiently model the sum of Bernoulli random variables? I came across your question while searching for a solution to this very problem. I wasn't terrifically satisfied with the answers here, but I think there's a pretty simple solution that gives you the
6,105
How can I efficiently model the sum of Bernoulli random variables?
(Because this is approach is independent of the other solutions posted, including one that I have posted, I'm offering it as a separate response). You can compute the exact distribution in seconds (or less) provided the sum of the p's is small. We have already seen suggestions that the distribution might approximately ...
How can I efficiently model the sum of Bernoulli random variables?
(Because this is approach is independent of the other solutions posted, including one that I have posted, I'm offering it as a separate response). You can compute the exact distribution in seconds (or
How can I efficiently model the sum of Bernoulli random variables? (Because this is approach is independent of the other solutions posted, including one that I have posted, I'm offering it as a separate response). You can compute the exact distribution in seconds (or less) provided the sum of the p's is small. We have ...
How can I efficiently model the sum of Bernoulli random variables? (Because this is approach is independent of the other solutions posted, including one that I have posted, I'm offering it as a separate response). You can compute the exact distribution in seconds (or
6,106
How can I efficiently model the sum of Bernoulli random variables?
@onestop provides good references. The Wikipedia article on the Poisson binomial distribution gives a recursive formula for computing the exact probability distribution; it requires $O(n^2)$ effort. Unfortunately, it's an alternating sum, so it will be numerically unstable: it's hopeless to do this computation with f...
How can I efficiently model the sum of Bernoulli random variables?
@onestop provides good references. The Wikipedia article on the Poisson binomial distribution gives a recursive formula for computing the exact probability distribution; it requires $O(n^2)$ effort.
How can I efficiently model the sum of Bernoulli random variables? @onestop provides good references. The Wikipedia article on the Poisson binomial distribution gives a recursive formula for computing the exact probability distribution; it requires $O(n^2)$ effort. Unfortunately, it's an alternating sum, so it will b...
How can I efficiently model the sum of Bernoulli random variables? @onestop provides good references. The Wikipedia article on the Poisson binomial distribution gives a recursive formula for computing the exact probability distribution; it requires $O(n^2)$ effort.
6,107
How can I efficiently model the sum of Bernoulli random variables?
With different $p_i$ your best bet I think is normal approximation. Let $B_n=\sum_{i=1}^np_i(1-p_i)$. Then \begin{align*} B_n^{-1/2}\left(\sum_{i=1}^nX_i-\sum_{i=1}^np_i\right)\to N(0,1), \end{align*} as $n\to\infty$, provided that for each $\varepsilon>0$ \begin{align*} B_n^{-1}\sum_{i=1}^nE\left((X_i-p_i)^2\mathbf{1}...
How can I efficiently model the sum of Bernoulli random variables?
With different $p_i$ your best bet I think is normal approximation. Let $B_n=\sum_{i=1}^np_i(1-p_i)$. Then \begin{align*} B_n^{-1/2}\left(\sum_{i=1}^nX_i-\sum_{i=1}^np_i\right)\to N(0,1), \end{align*}
How can I efficiently model the sum of Bernoulli random variables? With different $p_i$ your best bet I think is normal approximation. Let $B_n=\sum_{i=1}^np_i(1-p_i)$. Then \begin{align*} B_n^{-1/2}\left(\sum_{i=1}^nX_i-\sum_{i=1}^np_i\right)\to N(0,1), \end{align*} as $n\to\infty$, provided that for each $\varepsilon...
How can I efficiently model the sum of Bernoulli random variables? With different $p_i$ your best bet I think is normal approximation. Let $B_n=\sum_{i=1}^np_i(1-p_i)$. Then \begin{align*} B_n^{-1/2}\left(\sum_{i=1}^nX_i-\sum_{i=1}^np_i\right)\to N(0,1), \end{align*}
6,108
How can I efficiently model the sum of Bernoulli random variables?
Well, based on your description and the discussion in the comments it is clear that $Y$ has mean $\sum_i p_i$ and variance $\sum_i p_{i}(1-p_{i})$. The shape of $Y$'s distribution will ultimately depend on the behavior of $p_i$. For suitably "nice" $p_i$ (in the sense that not too many of them are really close to zer...
How can I efficiently model the sum of Bernoulli random variables?
Well, based on your description and the discussion in the comments it is clear that $Y$ has mean $\sum_i p_i$ and variance $\sum_i p_{i}(1-p_{i})$. The shape of $Y$'s distribution will ultimately dep
How can I efficiently model the sum of Bernoulli random variables? Well, based on your description and the discussion in the comments it is clear that $Y$ has mean $\sum_i p_i$ and variance $\sum_i p_{i}(1-p_{i})$. The shape of $Y$'s distribution will ultimately depend on the behavior of $p_i$. For suitably "nice" $p...
How can I efficiently model the sum of Bernoulli random variables? Well, based on your description and the discussion in the comments it is clear that $Y$ has mean $\sum_i p_i$ and variance $\sum_i p_{i}(1-p_{i})$. The shape of $Y$'s distribution will ultimately dep
6,109
How can I efficiently model the sum of Bernoulli random variables?
I think other answers are great, but I didn't see any Bayesian ways of estimating your probability. The answer doesn't have an explicit form, but the probability can be simulated using R. Here is the attempt: $$ X_i | p_i \sim Ber(p_i)$$ $$ p_i \sim Beta(\alpha, \beta) $$ Using wikipedia we can get estimates of $\hat...
How can I efficiently model the sum of Bernoulli random variables?
I think other answers are great, but I didn't see any Bayesian ways of estimating your probability. The answer doesn't have an explicit form, but the probability can be simulated using R. Here is the
How can I efficiently model the sum of Bernoulli random variables? I think other answers are great, but I didn't see any Bayesian ways of estimating your probability. The answer doesn't have an explicit form, but the probability can be simulated using R. Here is the attempt: $$ X_i | p_i \sim Ber(p_i)$$ $$ p_i \sim Be...
How can I efficiently model the sum of Bernoulli random variables? I think other answers are great, but I didn't see any Bayesian ways of estimating your probability. The answer doesn't have an explicit form, but the probability can be simulated using R. Here is the
6,110
How can I efficiently model the sum of Bernoulli random variables?
I would suggest applying Poisson approximation. It is well known (see A. D. Barbour, L. Holst and S. Janson: Poisson Approximation) that the total variation distance between $Y$ and a r.v. $Z$ having Poisson distribution with the parameter $\sum_i p_i$ is small: $$ \sup_A |{\bf P}(Y\in A) - {\bf P}(Z\in A)| \le \min ...
How can I efficiently model the sum of Bernoulli random variables?
I would suggest applying Poisson approximation. It is well known (see A. D. Barbour, L. Holst and S. Janson: Poisson Approximation) that the total variation distance between $Y$ and a r.v. $Z$ having
How can I efficiently model the sum of Bernoulli random variables? I would suggest applying Poisson approximation. It is well known (see A. D. Barbour, L. Holst and S. Janson: Poisson Approximation) that the total variation distance between $Y$ and a r.v. $Z$ having Poisson distribution with the parameter $\sum_i p_i$ ...
How can I efficiently model the sum of Bernoulli random variables? I would suggest applying Poisson approximation. It is well known (see A. D. Barbour, L. Holst and S. Janson: Poisson Approximation) that the total variation distance between $Y$ and a r.v. $Z$ having
6,111
How can I efficiently model the sum of Bernoulli random variables?
As has been mentioned in other answers, the probability distribution you describe is the Poisson Binomial distribution. An efficient method for computing the CDF is given in Hong, Yili. On computing the distribution function for the Poisson binomial distribution. The approach is to efficiently compute the DFT (discrete...
How can I efficiently model the sum of Bernoulli random variables?
As has been mentioned in other answers, the probability distribution you describe is the Poisson Binomial distribution. An efficient method for computing the CDF is given in Hong, Yili. On computing t
How can I efficiently model the sum of Bernoulli random variables? As has been mentioned in other answers, the probability distribution you describe is the Poisson Binomial distribution. An efficient method for computing the CDF is given in Hong, Yili. On computing the distribution function for the Poisson binomial dis...
How can I efficiently model the sum of Bernoulli random variables? As has been mentioned in other answers, the probability distribution you describe is the Poisson Binomial distribution. An efficient method for computing the CDF is given in Hong, Yili. On computing t
6,112
Quantile regression: Loss function
I understand this question as asking for insight into how one could come up with any loss function that produces a given quantile as a loss minimizer no matter what the underlying distribution might be. It would be unsatisfactory, then, just to repeat the analysis in Wikipedia or elsewhere that shows this particular l...
Quantile regression: Loss function
I understand this question as asking for insight into how one could come up with any loss function that produces a given quantile as a loss minimizer no matter what the underlying distribution might b
Quantile regression: Loss function I understand this question as asking for insight into how one could come up with any loss function that produces a given quantile as a loss minimizer no matter what the underlying distribution might be. It would be unsatisfactory, then, just to repeat the analysis in Wikipedia or els...
Quantile regression: Loss function I understand this question as asking for insight into how one could come up with any loss function that produces a given quantile as a loss minimizer no matter what the underlying distribution might b
6,113
Quantile regression: Loss function
The way this loss function is expressed is nice and compact but I think it's easier to understand by rewriting it as $$\rho_\tau(X-m) = (X-m)(\tau-1_{(X-m<0)}) = \begin{cases} \tau |X-m| & if \; X-m \ge 0 \\ (1 - \tau) |X-m| & if \; X-m < 0) \end{cases}$$ If you want to get an intuitive sense of why minimizing this l...
Quantile regression: Loss function
The way this loss function is expressed is nice and compact but I think it's easier to understand by rewriting it as $$\rho_\tau(X-m) = (X-m)(\tau-1_{(X-m<0)}) = \begin{cases} \tau |X-m| & if \; X-m \
Quantile regression: Loss function The way this loss function is expressed is nice and compact but I think it's easier to understand by rewriting it as $$\rho_\tau(X-m) = (X-m)(\tau-1_{(X-m<0)}) = \begin{cases} \tau |X-m| & if \; X-m \ge 0 \\ (1 - \tau) |X-m| & if \; X-m < 0) \end{cases}$$ If you want to get an intui...
Quantile regression: Loss function The way this loss function is expressed is nice and compact but I think it's easier to understand by rewriting it as $$\rho_\tau(X-m) = (X-m)(\tau-1_{(X-m<0)}) = \begin{cases} \tau |X-m| & if \; X-m \
6,114
Why does the variance of the Random walk increase?
In short because it keeps adding the variance of the next increments to the variability we have in getting to where we are now. $\text{Var}(Y_{t}) = \text{Var}(e_1+ e_2+ ... +e_t)$ $\qquad\quad\;\;= \text{Var}(e_1) + \text{Var}(e_2) +... +\text{Var}(e_t)$ (independence) $\qquad\quad\;\;= \sigma^2 + \sigma^2 + ... + \...
Why does the variance of the Random walk increase?
In short because it keeps adding the variance of the next increments to the variability we have in getting to where we are now. $\text{Var}(Y_{t}) = \text{Var}(e_1+ e_2+ ... +e_t)$ $\qquad\quad\;\;=
Why does the variance of the Random walk increase? In short because it keeps adding the variance of the next increments to the variability we have in getting to where we are now. $\text{Var}(Y_{t}) = \text{Var}(e_1+ e_2+ ... +e_t)$ $\qquad\quad\;\;= \text{Var}(e_1) + \text{Var}(e_2) +... +\text{Var}(e_t)$ (independen...
Why does the variance of the Random walk increase? In short because it keeps adding the variance of the next increments to the variability we have in getting to where we are now. $\text{Var}(Y_{t}) = \text{Var}(e_1+ e_2+ ... +e_t)$ $\qquad\quad\;\;=
6,115
Why does the variance of the Random walk increase?
Here's a way to imagine it. To simplify things, let's replace your white noise $e_i$ with a coin flip $e_i$ $$ e_i = \left\{ \begin{array}{c} 1 \ \text{with} \ Pr = .5 \\ -1 \ \text{with} \ Pr = .5 \end{array} \right. $$ this just simplifies the visualization, there's nothing really fundamental about the switch except...
Why does the variance of the Random walk increase?
Here's a way to imagine it. To simplify things, let's replace your white noise $e_i$ with a coin flip $e_i$ $$ e_i = \left\{ \begin{array}{c} 1 \ \text{with} \ Pr = .5 \\ -1 \ \text{with} \ Pr = .5 \
Why does the variance of the Random walk increase? Here's a way to imagine it. To simplify things, let's replace your white noise $e_i$ with a coin flip $e_i$ $$ e_i = \left\{ \begin{array}{c} 1 \ \text{with} \ Pr = .5 \\ -1 \ \text{with} \ Pr = .5 \end{array} \right. $$ this just simplifies the visualization, there's...
Why does the variance of the Random walk increase? Here's a way to imagine it. To simplify things, let's replace your white noise $e_i$ with a coin flip $e_i$ $$ e_i = \left\{ \begin{array}{c} 1 \ \text{with} \ Pr = .5 \\ -1 \ \text{with} \ Pr = .5 \
6,116
Why does the variance of the Random walk increase?
Does this have something to do with it's not "pure" random, since the new position is very correlated with the previous one? It appears that by "pure" you mean independent. In random walk only the steps are random and independent of each other. As you noted, the "positions" are random but correlated, i.e. not indepe...
Why does the variance of the Random walk increase?
Does this have something to do with it's not "pure" random, since the new position is very correlated with the previous one? It appears that by "pure" you mean independent. In random walk only the
Why does the variance of the Random walk increase? Does this have something to do with it's not "pure" random, since the new position is very correlated with the previous one? It appears that by "pure" you mean independent. In random walk only the steps are random and independent of each other. As you noted, the "po...
Why does the variance of the Random walk increase? Does this have something to do with it's not "pure" random, since the new position is very correlated with the previous one? It appears that by "pure" you mean independent. In random walk only the
6,117
Why does the variance of the Random walk increase?
Let's take a different example for an intuitive explanation: throwing darts at a dartboard. We have a player, who tries to aim for the bullseye, which we take to be a coordinate called 0. The player throws a few times, and indeed, the mean of his throws is 0, but he's not really good, so the variance is 20 cm. We ask t...
Why does the variance of the Random walk increase?
Let's take a different example for an intuitive explanation: throwing darts at a dartboard. We have a player, who tries to aim for the bullseye, which we take to be a coordinate called 0. The player t
Why does the variance of the Random walk increase? Let's take a different example for an intuitive explanation: throwing darts at a dartboard. We have a player, who tries to aim for the bullseye, which we take to be a coordinate called 0. The player throws a few times, and indeed, the mean of his throws is 0, but he's ...
Why does the variance of the Random walk increase? Let's take a different example for an intuitive explanation: throwing darts at a dartboard. We have a player, who tries to aim for the bullseye, which we take to be a coordinate called 0. The player t
6,118
Why does the variance of the Random walk increase?
Here's another way to get intuition that variance increases linearly with time. Returns increase linearly with time. $.1\%$ return per month translate into $1.2\%$ return per year - $X$ return per day generate $365X$ return per year (assuming independence). It makes sense that the range of returns also increases linear...
Why does the variance of the Random walk increase?
Here's another way to get intuition that variance increases linearly with time. Returns increase linearly with time. $.1\%$ return per month translate into $1.2\%$ return per year - $X$ return per day
Why does the variance of the Random walk increase? Here's another way to get intuition that variance increases linearly with time. Returns increase linearly with time. $.1\%$ return per month translate into $1.2\%$ return per year - $X$ return per day generate $365X$ return per year (assuming independence). It makes se...
Why does the variance of the Random walk increase? Here's another way to get intuition that variance increases linearly with time. Returns increase linearly with time. $.1\%$ return per month translate into $1.2\%$ return per year - $X$ return per day
6,119
Why does the variance of the Random walk increase?
The answer from Glen B already sufficiently and easily/briefly shows why the variance scales linearly with time. This answer will give an alternative viewpoint. Possibly one might find the equation for the addition of variance not so intuitive or different; and this answer might give an additional intuition from a diff...
Why does the variance of the Random walk increase?
The answer from Glen B already sufficiently and easily/briefly shows why the variance scales linearly with time. This answer will give an alternative viewpoint. Possibly one might find the equation fo
Why does the variance of the Random walk increase? The answer from Glen B already sufficiently and easily/briefly shows why the variance scales linearly with time. This answer will give an alternative viewpoint. Possibly one might find the equation for the addition of variance not so intuitive or different; and this an...
Why does the variance of the Random walk increase? The answer from Glen B already sufficiently and easily/briefly shows why the variance scales linearly with time. This answer will give an alternative viewpoint. Possibly one might find the equation fo
6,120
Estimate quantile of value in a vector
As whuber pointed out, you can use ecdf, which takes a vector and returns a function for getting the percentile of a value. > percentile <- ecdf(1:10) > percentile(8) [1] 0.8
Estimate quantile of value in a vector
As whuber pointed out, you can use ecdf, which takes a vector and returns a function for getting the percentile of a value. > percentile <- ecdf(1:10) > percentile(8) [1] 0.8
Estimate quantile of value in a vector As whuber pointed out, you can use ecdf, which takes a vector and returns a function for getting the percentile of a value. > percentile <- ecdf(1:10) > percentile(8) [1] 0.8
Estimate quantile of value in a vector As whuber pointed out, you can use ecdf, which takes a vector and returns a function for getting the percentile of a value. > percentile <- ecdf(1:10) > percentile(8) [1] 0.8
6,121
Estimate quantile of value in a vector
To expand on what whuber and cwarden stated, sometimes you want to use a function in a "classical" R way (for example, to use inside a magrittr pipe). Then you could write it yourself using ecdf(): ecdf_fun <- function(x,perc) ecdf(x)(perc) ecdf_fun(1:10,8) >[1] 0.8
Estimate quantile of value in a vector
To expand on what whuber and cwarden stated, sometimes you want to use a function in a "classical" R way (for example, to use inside a magrittr pipe). Then you could write it yourself using ecdf(): ec
Estimate quantile of value in a vector To expand on what whuber and cwarden stated, sometimes you want to use a function in a "classical" R way (for example, to use inside a magrittr pipe). Then you could write it yourself using ecdf(): ecdf_fun <- function(x,perc) ecdf(x)(perc) ecdf_fun(1:10,8) >[1] 0.8
Estimate quantile of value in a vector To expand on what whuber and cwarden stated, sometimes you want to use a function in a "classical" R way (for example, to use inside a magrittr pipe). Then you could write it yourself using ecdf(): ec
6,122
Estimate quantile of value in a vector
The other answers here do a great job of explaining computation of sample quantiles from an empirical CDF. Here I will show an alternative to using the sample quantiles, which is to use a kernel density estimator for the distribution and then compute the relevant quantile of a given probability value in the kernel den...
Estimate quantile of value in a vector
The other answers here do a great job of explaining computation of sample quantiles from an empirical CDF. Here I will show an alternative to using the sample quantiles, which is to use a kernel dens
Estimate quantile of value in a vector The other answers here do a great job of explaining computation of sample quantiles from an empirical CDF. Here I will show an alternative to using the sample quantiles, which is to use a kernel density estimator for the distribution and then compute the relevant quantile of a gi...
Estimate quantile of value in a vector The other answers here do a great job of explaining computation of sample quantiles from an empirical CDF. Here I will show an alternative to using the sample quantiles, which is to use a kernel dens
6,123
Estimate quantile of value in a vector
If using dplyr, cume_dist() returns the percentile of a value. https://dplyr.tidyverse.org/reference/ranking.html. A plus of cume_dist() is it can be naturally used in a pipe (%>%): library(tidyverse) df=1:10 %>% as_tibble() %>% mutate( x = rnorm(n=n(), mean=50, sd=10), x_percentile = cume_dist(x)) > df...
Estimate quantile of value in a vector
If using dplyr, cume_dist() returns the percentile of a value. https://dplyr.tidyverse.org/reference/ranking.html. A plus of cume_dist() is it can be naturally used in a pipe (%>%): library(tidyverse)
Estimate quantile of value in a vector If using dplyr, cume_dist() returns the percentile of a value. https://dplyr.tidyverse.org/reference/ranking.html. A plus of cume_dist() is it can be naturally used in a pipe (%>%): library(tidyverse) df=1:10 %>% as_tibble() %>% mutate( x = rnorm(n=n(), mean=50, sd=10),...
Estimate quantile of value in a vector If using dplyr, cume_dist() returns the percentile of a value. https://dplyr.tidyverse.org/reference/ranking.html. A plus of cume_dist() is it can be naturally used in a pipe (%>%): library(tidyverse)
6,124
How can SVM 'find' an infinite feature space where linear separation is always possible?
This answer explains the following: Why perfect separation is always possible with distinct points and a Gaussian kernel (of sufficiently small bandwidth) How this separation may be interpreted as linear, but only in an abstract feature space distinct from the space where the data lives How the mapping from data space...
How can SVM 'find' an infinite feature space where linear separation is always possible?
This answer explains the following: Why perfect separation is always possible with distinct points and a Gaussian kernel (of sufficiently small bandwidth) How this separation may be interpreted as li
How can SVM 'find' an infinite feature space where linear separation is always possible? This answer explains the following: Why perfect separation is always possible with distinct points and a Gaussian kernel (of sufficiently small bandwidth) How this separation may be interpreted as linear, but only in an abstract f...
How can SVM 'find' an infinite feature space where linear separation is always possible? This answer explains the following: Why perfect separation is always possible with distinct points and a Gaussian kernel (of sufficiently small bandwidth) How this separation may be interpreted as li
6,125
How can SVM 'find' an infinite feature space where linear separation is always possible?
The kernel matrix of the Gaussian kernel has always full rank for distinct $\mathbf x_1,...,\mathbf x_m$. This means that each time you add a new example, the rank increases by $1$. The easiest way to see this if you set $\sigma$ very small. Then the kernel matrix is almost diagonal. The fact that the rank always incr...
How can SVM 'find' an infinite feature space where linear separation is always possible?
The kernel matrix of the Gaussian kernel has always full rank for distinct $\mathbf x_1,...,\mathbf x_m$. This means that each time you add a new example, the rank increases by $1$. The easiest way to
How can SVM 'find' an infinite feature space where linear separation is always possible? The kernel matrix of the Gaussian kernel has always full rank for distinct $\mathbf x_1,...,\mathbf x_m$. This means that each time you add a new example, the rank increases by $1$. The easiest way to see this if you set $\sigma$ v...
How can SVM 'find' an infinite feature space where linear separation is always possible? The kernel matrix of the Gaussian kernel has always full rank for distinct $\mathbf x_1,...,\mathbf x_m$. This means that each time you add a new example, the rank increases by $1$. The easiest way to
6,126
How can SVM 'find' an infinite feature space where linear separation is always possible?
For the background and the notations I refer to the answer How to calculate decision boundary from support vectors?. So the features in the 'original' space are the vectors $x_i$, the binary outcome $y_i \in \{-1, +1\}$ and the Lagrange multipliers are $\alpha_i$. It is known that the Kernel can be written as $K(x,y)...
How can SVM 'find' an infinite feature space where linear separation is always possible?
For the background and the notations I refer to the answer How to calculate decision boundary from support vectors?. So the features in the 'original' space are the vectors $x_i$, the binary outcome
How can SVM 'find' an infinite feature space where linear separation is always possible? For the background and the notations I refer to the answer How to calculate decision boundary from support vectors?. So the features in the 'original' space are the vectors $x_i$, the binary outcome $y_i \in \{-1, +1\}$ and the La...
How can SVM 'find' an infinite feature space where linear separation is always possible? For the background and the notations I refer to the answer How to calculate decision boundary from support vectors?. So the features in the 'original' space are the vectors $x_i$, the binary outcome
6,127
How can SVM 'find' an infinite feature space where linear separation is always possible?
Unfortunately, fcop's explanation is quite incorrect. First of all he says "It is known that the Kernel can be written as... where ... is an (implicit and unknown) transformation to a new feature space." It's NOT unknown. This is in fact the space the features are mapped to and this is the space that could be infinite ...
How can SVM 'find' an infinite feature space where linear separation is always possible?
Unfortunately, fcop's explanation is quite incorrect. First of all he says "It is known that the Kernel can be written as... where ... is an (implicit and unknown) transformation to a new feature spac
How can SVM 'find' an infinite feature space where linear separation is always possible? Unfortunately, fcop's explanation is quite incorrect. First of all he says "It is known that the Kernel can be written as... where ... is an (implicit and unknown) transformation to a new feature space." It's NOT unknown. This is i...
How can SVM 'find' an infinite feature space where linear separation is always possible? Unfortunately, fcop's explanation is quite incorrect. First of all he says "It is known that the Kernel can be written as... where ... is an (implicit and unknown) transformation to a new feature spac
6,128
Why should we use t errors instead of normal errors?
Because, assuming normal errors is effectively the same as assuming that large errors do not occur! The normal distribution has so light tails, that errors outside $\pm 3$ standard deviations have very low probability, errors outside of $\pm 6$ standard deviations are effectively impossible. In practice, that assumpt...
Why should we use t errors instead of normal errors?
Because, assuming normal errors is effectively the same as assuming that large errors do not occur! The normal distribution has so light tails, that errors outside $\pm 3$ standard deviations have ve
Why should we use t errors instead of normal errors? Because, assuming normal errors is effectively the same as assuming that large errors do not occur! The normal distribution has so light tails, that errors outside $\pm 3$ standard deviations have very low probability, errors outside of $\pm 6$ standard deviations a...
Why should we use t errors instead of normal errors? Because, assuming normal errors is effectively the same as assuming that large errors do not occur! The normal distribution has so light tails, that errors outside $\pm 3$ standard deviations have ve
6,129
Why should we use t errors instead of normal errors?
It is not just a matter of "heavier tails" — there are plenty of distributions that are bell shaped and have heavy tails. The T distribution is the posterior predictive of the Gaussian model. If you make a Gaussian assumption, but have finite evidence, then the resulting model is necessarily making non-central scaled ...
Why should we use t errors instead of normal errors?
It is not just a matter of "heavier tails" — there are plenty of distributions that are bell shaped and have heavy tails. The T distribution is the posterior predictive of the Gaussian model. If you
Why should we use t errors instead of normal errors? It is not just a matter of "heavier tails" — there are plenty of distributions that are bell shaped and have heavy tails. The T distribution is the posterior predictive of the Gaussian model. If you make a Gaussian assumption, but have finite evidence, then the resu...
Why should we use t errors instead of normal errors? It is not just a matter of "heavier tails" — there are plenty of distributions that are bell shaped and have heavy tails. The T distribution is the posterior predictive of the Gaussian model. If you
6,130
Why KL divergence is non-negative?
Proof 1: First note that $\ln a \leq a-1$ for all $a \gt 0$. We will now show that $-D_{KL}(p||q) \leq 0$ which means that $D_{KL}(p||q) \geq 0$ \begin{align} -D(p||q)&=-\sum_x p(x)\ln \frac{p(x)}{q(x)}\\ &= \sum_x p(x)\ln \frac{q(x)}{p(x)}\\ &\stackrel{\text{(a)}}{\leq} \sum_x p(x)\left(\frac{q(x)}{p(x)}-1\right)\\ &=...
Why KL divergence is non-negative?
Proof 1: First note that $\ln a \leq a-1$ for all $a \gt 0$. We will now show that $-D_{KL}(p||q) \leq 0$ which means that $D_{KL}(p||q) \geq 0$ \begin{align} -D(p||q)&=-\sum_x p(x)\ln \frac{p(x)}{q(x
Why KL divergence is non-negative? Proof 1: First note that $\ln a \leq a-1$ for all $a \gt 0$. We will now show that $-D_{KL}(p||q) \leq 0$ which means that $D_{KL}(p||q) \geq 0$ \begin{align} -D(p||q)&=-\sum_x p(x)\ln \frac{p(x)}{q(x)}\\ &= \sum_x p(x)\ln \frac{q(x)}{p(x)}\\ &\stackrel{\text{(a)}}{\leq} \sum_x p(x)\l...
Why KL divergence is non-negative? Proof 1: First note that $\ln a \leq a-1$ for all $a \gt 0$. We will now show that $-D_{KL}(p||q) \leq 0$ which means that $D_{KL}(p||q) \geq 0$ \begin{align} -D(p||q)&=-\sum_x p(x)\ln \frac{p(x)}{q(x
6,131
When to use a GAM vs GLM
The main difference imho is that while "classical" forms of linear, or generalized linear, models assume a fixed linear or some other parametric form of the relationship between the dependent variable and the covariates, GAM do not assume a priori any specific form of this relationship, and can be used to reveal and es...
When to use a GAM vs GLM
The main difference imho is that while "classical" forms of linear, or generalized linear, models assume a fixed linear or some other parametric form of the relationship between the dependent variable
When to use a GAM vs GLM The main difference imho is that while "classical" forms of linear, or generalized linear, models assume a fixed linear or some other parametric form of the relationship between the dependent variable and the covariates, GAM do not assume a priori any specific form of this relationship, and can...
When to use a GAM vs GLM The main difference imho is that while "classical" forms of linear, or generalized linear, models assume a fixed linear or some other parametric form of the relationship between the dependent variable
6,132
When to use a GAM vs GLM
I'd emphasize that GAMs are much more flexible than GLMs, and hence need more care in their use. With greater power comes greater responsibility. You mention their use in ecology, which I have also noticed. I was in Costa Rica and saw some kind of study in a rainforest where some grad students had thrown some data into...
When to use a GAM vs GLM
I'd emphasize that GAMs are much more flexible than GLMs, and hence need more care in their use. With greater power comes greater responsibility. You mention their use in ecology, which I have also no
When to use a GAM vs GLM I'd emphasize that GAMs are much more flexible than GLMs, and hence need more care in their use. With greater power comes greater responsibility. You mention their use in ecology, which I have also noticed. I was in Costa Rica and saw some kind of study in a rainforest where some grad students ...
When to use a GAM vs GLM I'd emphasize that GAMs are much more flexible than GLMs, and hence need more care in their use. With greater power comes greater responsibility. You mention their use in ecology, which I have also no
6,133
When to use a GAM vs GLM
I have no reputation to simply add a comment. I do totally agree with Wayne’s comment: With greater power comes greater responsibility. GAMs can be very flexible and often we get/see crazy-complex smoothers. Then, I strongly recommend researchers to restrict degrees of freedom (number of knots) of the smooth functions ...
When to use a GAM vs GLM
I have no reputation to simply add a comment. I do totally agree with Wayne’s comment: With greater power comes greater responsibility. GAMs can be very flexible and often we get/see crazy-complex smo
When to use a GAM vs GLM I have no reputation to simply add a comment. I do totally agree with Wayne’s comment: With greater power comes greater responsibility. GAMs can be very flexible and often we get/see crazy-complex smoothers. Then, I strongly recommend researchers to restrict degrees of freedom (number of knots)...
When to use a GAM vs GLM I have no reputation to simply add a comment. I do totally agree with Wayne’s comment: With greater power comes greater responsibility. GAMs can be very flexible and often we get/see crazy-complex smo
6,134
Relative variable importance for Boosting
I'll use the sklearn code, as it is generally much cleaner than the R code. Here's the implementation of the feature_importances property of the GradientBoostingClassifier (I removed some lines of code that get in the way of the conceptual stuff) def feature_importances_(self): total_sum = np.zeros((self.n_features...
Relative variable importance for Boosting
I'll use the sklearn code, as it is generally much cleaner than the R code. Here's the implementation of the feature_importances property of the GradientBoostingClassifier (I removed some lines of cod
Relative variable importance for Boosting I'll use the sklearn code, as it is generally much cleaner than the R code. Here's the implementation of the feature_importances property of the GradientBoostingClassifier (I removed some lines of code that get in the way of the conceptual stuff) def feature_importances_(self):...
Relative variable importance for Boosting I'll use the sklearn code, as it is generally much cleaner than the R code. Here's the implementation of the feature_importances property of the GradientBoostingClassifier (I removed some lines of cod
6,135
Simulation of logistic regression power analysis - designed experiments
Preliminaries: As discussed in the G*Power manual, there are several different types of power analyses, depending on what you want to solve for. (That is, $N$, the effect size $ES$, $\alpha$, and power exist in relation to each other; specifying any three of them will let you solve for the fourth.) in your descrip...
Simulation of logistic regression power analysis - designed experiments
Preliminaries: As discussed in the G*Power manual, there are several different types of power analyses, depending on what you want to solve for. (That is, $N$, the effect size $ES$, $\alpha$, and po
Simulation of logistic regression power analysis - designed experiments Preliminaries: As discussed in the G*Power manual, there are several different types of power analyses, depending on what you want to solve for. (That is, $N$, the effect size $ES$, $\alpha$, and power exist in relation to each other; specifying ...
Simulation of logistic regression power analysis - designed experiments Preliminaries: As discussed in the G*Power manual, there are several different types of power analyses, depending on what you want to solve for. (That is, $N$, the effect size $ES$, $\alpha$, and po
6,136
Simulation of logistic regression power analysis - designed experiments
@Gung's answer is great for understanding. Here is the approach that I would use: mydat <- data.frame( v1 = rep( c(3,6,9), each=2 ), v2 = rep( 0:1, 3 ), resp=c(0.0025, 0.00395, 0.003, 0.0042, 0.0035, 0.002) ) fit0 <- glm( resp ~ poly(v1, 2, raw=TRUE)*v2, data=mydat, weight=rep(100000,6), family=binomial)...
Simulation of logistic regression power analysis - designed experiments
@Gung's answer is great for understanding. Here is the approach that I would use: mydat <- data.frame( v1 = rep( c(3,6,9), each=2 ), v2 = rep( 0:1, 3 ), resp=c(0.0025, 0.00395, 0.003, 0.0042
Simulation of logistic regression power analysis - designed experiments @Gung's answer is great for understanding. Here is the approach that I would use: mydat <- data.frame( v1 = rep( c(3,6,9), each=2 ), v2 = rep( 0:1, 3 ), resp=c(0.0025, 0.00395, 0.003, 0.0042, 0.0035, 0.002) ) fit0 <- glm( resp ~ poly(v1,...
Simulation of logistic regression power analysis - designed experiments @Gung's answer is great for understanding. Here is the approach that I would use: mydat <- data.frame( v1 = rep( c(3,6,9), each=2 ), v2 = rep( 0:1, 3 ), resp=c(0.0025, 0.00395, 0.003, 0.0042
6,137
Relation between confidence interval and testing statistical hypothesis for t-test
Yes, there are some simple relationships between confidence interval comparisons and hypothesis tests in a wide range of practical settings. However, in addition to verifying the CI procedures and t-test are appropriate for our data, we must check that the sample sizes are not too different and that the two sets have ...
Relation between confidence interval and testing statistical hypothesis for t-test
Yes, there are some simple relationships between confidence interval comparisons and hypothesis tests in a wide range of practical settings. However, in addition to verifying the CI procedures and t-
Relation between confidence interval and testing statistical hypothesis for t-test Yes, there are some simple relationships between confidence interval comparisons and hypothesis tests in a wide range of practical settings. However, in addition to verifying the CI procedures and t-test are appropriate for our data, we...
Relation between confidence interval and testing statistical hypothesis for t-test Yes, there are some simple relationships between confidence interval comparisons and hypothesis tests in a wide range of practical settings. However, in addition to verifying the CI procedures and t-
6,138
Relation between confidence interval and testing statistical hypothesis for t-test
Under typical assumptions of equal variance, yes, there is a relationship. If the bars overlap by less than the length of one bar * sqrt(2) then a t-test would find them to be significantly different at alpha = 0.05. If the ends of the bars just barely touch then a difference would be found at 0.01. If the confidenc...
Relation between confidence interval and testing statistical hypothesis for t-test
Under typical assumptions of equal variance, yes, there is a relationship. If the bars overlap by less than the length of one bar * sqrt(2) then a t-test would find them to be significantly different
Relation between confidence interval and testing statistical hypothesis for t-test Under typical assumptions of equal variance, yes, there is a relationship. If the bars overlap by less than the length of one bar * sqrt(2) then a t-test would find them to be significantly different at alpha = 0.05. If the ends of the...
Relation between confidence interval and testing statistical hypothesis for t-test Under typical assumptions of equal variance, yes, there is a relationship. If the bars overlap by less than the length of one bar * sqrt(2) then a t-test would find them to be significantly different
6,139
Relation between confidence interval and testing statistical hypothesis for t-test
No, not a simple one at least. There is, however, an exact correspondence between the t-test of difference between two means and the confidence interval for the difference between the two means. If the confidence interval for the difference between two means contains zero, a t-test for that difference would fail to rej...
Relation between confidence interval and testing statistical hypothesis for t-test
No, not a simple one at least. There is, however, an exact correspondence between the t-test of difference between two means and the confidence interval for the difference between the two means. If th
Relation between confidence interval and testing statistical hypothesis for t-test No, not a simple one at least. There is, however, an exact correspondence between the t-test of difference between two means and the confidence interval for the difference between the two means. If the confidence interval for the differe...
Relation between confidence interval and testing statistical hypothesis for t-test No, not a simple one at least. There is, however, an exact correspondence between the t-test of difference between two means and the confidence interval for the difference between the two means. If th
6,140
Neural network references (textbooks, online courses) for beginners
You're in luck! There are an amazing number of resources available at the moment. In particular, you could look at: a Coursera course starting soon a recently published online textbook by some of the leaders in the field (Goodfellow, Bengio and Courville) these lecture notes, and this overview, which are more oriented...
Neural network references (textbooks, online courses) for beginners
You're in luck! There are an amazing number of resources available at the moment. In particular, you could look at: a Coursera course starting soon a recently published online textbook by some of the
Neural network references (textbooks, online courses) for beginners You're in luck! There are an amazing number of resources available at the moment. In particular, you could look at: a Coursera course starting soon a recently published online textbook by some of the leaders in the field (Goodfellow, Bengio and Courvi...
Neural network references (textbooks, online courses) for beginners You're in luck! There are an amazing number of resources available at the moment. In particular, you could look at: a Coursera course starting soon a recently published online textbook by some of the
6,141
Neural network references (textbooks, online courses) for beginners
Main references: Courses on deep learning: Andrew Ng's course on machine learning has a nice introductory section on neural networks. Geoffrey Hinton's course: Coursera Neural Networks for Machine Learning (fall 2012) Michael Nielsen's free book Neural Networks and Deep Learning Yoshua Bengio, Ian Goodfellow and Aaron...
Neural network references (textbooks, online courses) for beginners
Main references: Courses on deep learning: Andrew Ng's course on machine learning has a nice introductory section on neural networks. Geoffrey Hinton's course: Coursera Neural Networks for Machine Le
Neural network references (textbooks, online courses) for beginners Main references: Courses on deep learning: Andrew Ng's course on machine learning has a nice introductory section on neural networks. Geoffrey Hinton's course: Coursera Neural Networks for Machine Learning (fall 2012) Michael Nielsen's free book Neura...
Neural network references (textbooks, online courses) for beginners Main references: Courses on deep learning: Andrew Ng's course on machine learning has a nice introductory section on neural networks. Geoffrey Hinton's course: Coursera Neural Networks for Machine Le
6,142
Neural network references (textbooks, online courses) for beginners
http://www.kdnuggets.com/2015/11/seven-steps-machine-learning-python.html http://neuralnetworksanddeeplearning.com/ This has been my favorite resources. Started with the Stanford machine learning course, but prefer reading over lectures. Especially because the readings are example-based.
Neural network references (textbooks, online courses) for beginners
http://www.kdnuggets.com/2015/11/seven-steps-machine-learning-python.html http://neuralnetworksanddeeplearning.com/ This has been my favorite resources. Started with the Stanford machine learning cour
Neural network references (textbooks, online courses) for beginners http://www.kdnuggets.com/2015/11/seven-steps-machine-learning-python.html http://neuralnetworksanddeeplearning.com/ This has been my favorite resources. Started with the Stanford machine learning course, but prefer reading over lectures. Especially bec...
Neural network references (textbooks, online courses) for beginners http://www.kdnuggets.com/2015/11/seven-steps-machine-learning-python.html http://neuralnetworksanddeeplearning.com/ This has been my favorite resources. Started with the Stanford machine learning cour
6,143
Neural network references (textbooks, online courses) for beginners
Neural Networks and Deep Learning is an approachable starting-point. Neural Networks and Deep Learning is a free online book. The book will teach you about: Neural networks, a beautiful biologically-inspired programming paradigm which enables a computer to learn from observational data Deep learning, a powerful set of...
Neural network references (textbooks, online courses) for beginners
Neural Networks and Deep Learning is an approachable starting-point. Neural Networks and Deep Learning is a free online book. The book will teach you about: Neural networks, a beautiful biologically-
Neural network references (textbooks, online courses) for beginners Neural Networks and Deep Learning is an approachable starting-point. Neural Networks and Deep Learning is a free online book. The book will teach you about: Neural networks, a beautiful biologically-inspired programming paradigm which enables a comput...
Neural network references (textbooks, online courses) for beginners Neural Networks and Deep Learning is an approachable starting-point. Neural Networks and Deep Learning is a free online book. The book will teach you about: Neural networks, a beautiful biologically-
6,144
Neural network references (textbooks, online courses) for beginners
For fast learning I would choose: This Deep Learning lecture from the great teacher-researcher Nando de Freitas: https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/ For practical programming theory understanding in Python this material from Andrej Karpathy: http://cs231n.github.io/ And for NLP: https://arxi...
Neural network references (textbooks, online courses) for beginners
For fast learning I would choose: This Deep Learning lecture from the great teacher-researcher Nando de Freitas: https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/ For practical programmi
Neural network references (textbooks, online courses) for beginners For fast learning I would choose: This Deep Learning lecture from the great teacher-researcher Nando de Freitas: https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/ For practical programming theory understanding in Python this material from...
Neural network references (textbooks, online courses) for beginners For fast learning I would choose: This Deep Learning lecture from the great teacher-researcher Nando de Freitas: https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/ For practical programmi
6,145
Understanding the parameters inside the Negative Binomial Distribution
You should look further down the Wikipedia article on the NB, where it says "gamma-Poisson mixture". While the definition you cite (which I call the "coin-flipping" definition since I usually define it for classes as "suppose you want to flip a coin until you get $k$ heads") is easier to derive and makes more sense in ...
Understanding the parameters inside the Negative Binomial Distribution
You should look further down the Wikipedia article on the NB, where it says "gamma-Poisson mixture". While the definition you cite (which I call the "coin-flipping" definition since I usually define i
Understanding the parameters inside the Negative Binomial Distribution You should look further down the Wikipedia article on the NB, where it says "gamma-Poisson mixture". While the definition you cite (which I call the "coin-flipping" definition since I usually define it for classes as "suppose you want to flip a coin...
Understanding the parameters inside the Negative Binomial Distribution You should look further down the Wikipedia article on the NB, where it says "gamma-Poisson mixture". While the definition you cite (which I call the "coin-flipping" definition since I usually define i
6,146
Understanding the parameters inside the Negative Binomial Distribution
As I mentioned in my earlier post to you, I'm working on getting my head around fitting a distribution to count data also. Here's among what I've learned: When the variance is greater than the mean, overdispersion is evident and thus the negative binomial distribution is likely appropriate. If the variance and mean are...
Understanding the parameters inside the Negative Binomial Distribution
As I mentioned in my earlier post to you, I'm working on getting my head around fitting a distribution to count data also. Here's among what I've learned: When the variance is greater than the mean, o
Understanding the parameters inside the Negative Binomial Distribution As I mentioned in my earlier post to you, I'm working on getting my head around fitting a distribution to count data also. Here's among what I've learned: When the variance is greater than the mean, overdispersion is evident and thus the negative bi...
Understanding the parameters inside the Negative Binomial Distribution As I mentioned in my earlier post to you, I'm working on getting my head around fitting a distribution to count data also. Here's among what I've learned: When the variance is greater than the mean, o
6,147
Understanding input_shape parameter in LSTM with Keras
LSTM shapes are tough so don't feel bad, I had to spend a couple days battling them myself: If you will be feeding data 1 character at a time your input shape should be (31,1) since your input has 31 timesteps, 1 character each. You will need to reshape your x_train from (1085420, 31) to (1085420, 31,1) which is easily...
Understanding input_shape parameter in LSTM with Keras
LSTM shapes are tough so don't feel bad, I had to spend a couple days battling them myself: If you will be feeding data 1 character at a time your input shape should be (31,1) since your input has 31
Understanding input_shape parameter in LSTM with Keras LSTM shapes are tough so don't feel bad, I had to spend a couple days battling them myself: If you will be feeding data 1 character at a time your input shape should be (31,1) since your input has 31 timesteps, 1 character each. You will need to reshape your x_trai...
Understanding input_shape parameter in LSTM with Keras LSTM shapes are tough so don't feel bad, I had to spend a couple days battling them myself: If you will be feeding data 1 character at a time your input shape should be (31,1) since your input has 31
6,148
Understanding input_shape parameter in LSTM with Keras
Check this git repository LSTM Keras summary diagram and i believe you should get everything crystal clear. This git repo includes a Keras LSTM summary diagram that shows: the use of parameters like return_sequences, batch_size, time_step... the real structure of lstm layers the concept of these layers in keras how...
Understanding input_shape parameter in LSTM with Keras
Check this git repository LSTM Keras summary diagram and i believe you should get everything crystal clear. This git repo includes a Keras LSTM summary diagram that shows: the use of parameters like
Understanding input_shape parameter in LSTM with Keras Check this git repository LSTM Keras summary diagram and i believe you should get everything crystal clear. This git repo includes a Keras LSTM summary diagram that shows: the use of parameters like return_sequences, batch_size, time_step... the real structure o...
Understanding input_shape parameter in LSTM with Keras Check this git repository LSTM Keras summary diagram and i believe you should get everything crystal clear. This git repo includes a Keras LSTM summary diagram that shows: the use of parameters like
6,149
Understanding input_shape parameter in LSTM with Keras
I know it is not direct answer to your question. This is a simplified example with just one LSTM cell, helping me understand the reshape operation for the input data. from keras.models import Model from keras.layers import Input from keras.layers import LSTM import numpy as np # define model inputs1 = Input(shape=(2, ...
Understanding input_shape parameter in LSTM with Keras
I know it is not direct answer to your question. This is a simplified example with just one LSTM cell, helping me understand the reshape operation for the input data. from keras.models import Model fr
Understanding input_shape parameter in LSTM with Keras I know it is not direct answer to your question. This is a simplified example with just one LSTM cell, helping me understand the reshape operation for the input data. from keras.models import Model from keras.layers import Input from keras.layers import LSTM import...
Understanding input_shape parameter in LSTM with Keras I know it is not direct answer to your question. This is a simplified example with just one LSTM cell, helping me understand the reshape operation for the input data. from keras.models import Model fr
6,150
Finding Quartiles in R
Your textbook is confused. Very few people or software define quartiles this way. (It tends to make the first quartile too small and the third quartile too large.) The quantile function in R implements nine different ways to compute quantiles! To see which of them, if any, correspond to this method, let's start by i...
Finding Quartiles in R
Your textbook is confused. Very few people or software define quartiles this way. (It tends to make the first quartile too small and the third quartile too large.) The quantile function in R impleme
Finding Quartiles in R Your textbook is confused. Very few people or software define quartiles this way. (It tends to make the first quartile too small and the third quartile too large.) The quantile function in R implements nine different ways to compute quantiles! To see which of them, if any, correspond to this m...
Finding Quartiles in R Your textbook is confused. Very few people or software define quartiles this way. (It tends to make the first quartile too small and the third quartile too large.) The quantile function in R impleme
6,151
Finding Quartiles in R
Within the field of statistics (which I teach, but in which I am not a researcher), quartile calculations are particularly ambiguous (in a way that is not necessarily true of quantiles, more generally). This has a lot of history behind it, in part because of the use (and perhaps abuse) of inter-quartile range (IQR), wh...
Finding Quartiles in R
Within the field of statistics (which I teach, but in which I am not a researcher), quartile calculations are particularly ambiguous (in a way that is not necessarily true of quantiles, more generally
Finding Quartiles in R Within the field of statistics (which I teach, but in which I am not a researcher), quartile calculations are particularly ambiguous (in a way that is not necessarily true of quantiles, more generally). This has a lot of history behind it, in part because of the use (and perhaps abuse) of inter-q...
Finding Quartiles in R Within the field of statistics (which I teach, but in which I am not a researcher), quartile calculations are particularly ambiguous (in a way that is not necessarily true of quantiles, more generally
6,152
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification?
The main reason that $t$-SNE is not used in classification models is that it does not learn a function from the original space to the new (lower) dimensional one. As such, when we would try to use our classifier on new / unseen data we will not be able to map / pre-process these new data according to the previous $t$-S...
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification?
The main reason that $t$-SNE is not used in classification models is that it does not learn a function from the original space to the new (lower) dimensional one. As such, when we would try to use our
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification? The main reason that $t$-SNE is not used in classification models is that it does not learn a function from the original space to the new (lower) dimensional one. As such, when we would try to use our classifier on new / uns...
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification? The main reason that $t$-SNE is not used in classification models is that it does not learn a function from the original space to the new (lower) dimensional one. As such, when we would try to use our
6,153
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification?
t-SNE does not preserve distances, but it basically estimates probability distributions. In theory, the t-SNE algorithms maps the input to a map space of 2 or 3 dimensions. The input space is assumed to be a Gaussian distribution and the map space a t-distribution. The loss function used is the KL Divergence between th...
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification?
t-SNE does not preserve distances, but it basically estimates probability distributions. In theory, the t-SNE algorithms maps the input to a map space of 2 or 3 dimensions. The input space is assumed
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification? t-SNE does not preserve distances, but it basically estimates probability distributions. In theory, the t-SNE algorithms maps the input to a map space of 2 or 3 dimensions. The input space is assumed to be a Gaussian distrib...
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification? t-SNE does not preserve distances, but it basically estimates probability distributions. In theory, the t-SNE algorithms maps the input to a map space of 2 or 3 dimensions. The input space is assumed
6,154
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification?
As a general statement: given a sufficiently powerful (/suitable) classifier, or cluster-er, one would never apply any dimensionality reduction. Dimensionality reduction loses information. Since such a cluster-er or classifier (esp classifiers, less so clusterers), internally incorperates some form of projection to a m...
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification?
As a general statement: given a sufficiently powerful (/suitable) classifier, or cluster-er, one would never apply any dimensionality reduction. Dimensionality reduction loses information. Since such
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification? As a general statement: given a sufficiently powerful (/suitable) classifier, or cluster-er, one would never apply any dimensionality reduction. Dimensionality reduction loses information. Since such a cluster-er or classifi...
Why is t-SNE not used as a dimensionality reduction technique for clustering or classification? As a general statement: given a sufficiently powerful (/suitable) classifier, or cluster-er, one would never apply any dimensionality reduction. Dimensionality reduction loses information. Since such
6,155
What are the measure for accuracy of multilabel data?
(1) gives a nice overview: The Wikipedia page n multi-label classification contains a section on the evaluation metrics as well. I would add a warning that in the multilabel setting, accuracy is ambiguous: it might either refer to the exact match ratio or the Hamming score (see this post). Unfortunately, many papers ...
What are the measure for accuracy of multilabel data?
(1) gives a nice overview: The Wikipedia page n multi-label classification contains a section on the evaluation metrics as well. I would add a warning that in the multilabel setting, accuracy is amb
What are the measure for accuracy of multilabel data? (1) gives a nice overview: The Wikipedia page n multi-label classification contains a section on the evaluation metrics as well. I would add a warning that in the multilabel setting, accuracy is ambiguous: it might either refer to the exact match ratio or the Hamm...
What are the measure for accuracy of multilabel data? (1) gives a nice overview: The Wikipedia page n multi-label classification contains a section on the evaluation metrics as well. I would add a warning that in the multilabel setting, accuracy is amb
6,156
What are the measure for accuracy of multilabel data?
The Hamming Loss is probably the most widely used loss function in multi-label classification. Have a look at Empirical Studies on Multi-label Classification and Multi-Label Classification: An Overview, both of which discuss this.
What are the measure for accuracy of multilabel data?
The Hamming Loss is probably the most widely used loss function in multi-label classification. Have a look at Empirical Studies on Multi-label Classification and Multi-Label Classification: An Overvi
What are the measure for accuracy of multilabel data? The Hamming Loss is probably the most widely used loss function in multi-label classification. Have a look at Empirical Studies on Multi-label Classification and Multi-Label Classification: An Overview, both of which discuss this.
What are the measure for accuracy of multilabel data? The Hamming Loss is probably the most widely used loss function in multi-label classification. Have a look at Empirical Studies on Multi-label Classification and Multi-Label Classification: An Overvi
6,157
What are the measure for accuracy of multilabel data?
Correctly Predicted is the intersection between the set of suggested labels and the set expected one. Total Instances is the union of the sets above (no duplicate count). So given a single example where you predict classes A, G, E and the test case has E, A, H, P as the correct ones you end up with Accuracy = Intersect...
What are the measure for accuracy of multilabel data?
Correctly Predicted is the intersection between the set of suggested labels and the set expected one. Total Instances is the union of the sets above (no duplicate count). So given a single example whe
What are the measure for accuracy of multilabel data? Correctly Predicted is the intersection between the set of suggested labels and the set expected one. Total Instances is the union of the sets above (no duplicate count). So given a single example where you predict classes A, G, E and the test case has E, A, H, P as...
What are the measure for accuracy of multilabel data? Correctly Predicted is the intersection between the set of suggested labels and the set expected one. Total Instances is the union of the sets above (no duplicate count). So given a single example whe
6,158
Guideline to select the hyperparameters in Deep Learning
There are basically four methods: Manual Search: Using knowledge you have about the problem guess parameters and observe the result. Based on that result tweak the parameters. Repeat this process until you find parameters that work well or you run out of time. Grid Search: Using knowledge you have about the problem id...
Guideline to select the hyperparameters in Deep Learning
There are basically four methods: Manual Search: Using knowledge you have about the problem guess parameters and observe the result. Based on that result tweak the parameters. Repeat this process unt
Guideline to select the hyperparameters in Deep Learning There are basically four methods: Manual Search: Using knowledge you have about the problem guess parameters and observe the result. Based on that result tweak the parameters. Repeat this process until you find parameters that work well or you run out of time. G...
Guideline to select the hyperparameters in Deep Learning There are basically four methods: Manual Search: Using knowledge you have about the problem guess parameters and observe the result. Based on that result tweak the parameters. Repeat this process unt
6,159
Guideline to select the hyperparameters in Deep Learning
A wide variety of methods exist. They can be largely partitioned in random/undirected search methods (like grid search or random search) and direct methods. Be aware, though, that they all require testing a considerable amount of hyperparameter settings unless you get lucky (hundreds at least, depends on the number of ...
Guideline to select the hyperparameters in Deep Learning
A wide variety of methods exist. They can be largely partitioned in random/undirected search methods (like grid search or random search) and direct methods. Be aware, though, that they all require tes
Guideline to select the hyperparameters in Deep Learning A wide variety of methods exist. They can be largely partitioned in random/undirected search methods (like grid search or random search) and direct methods. Be aware, though, that they all require testing a considerable amount of hyperparameter settings unless yo...
Guideline to select the hyperparameters in Deep Learning A wide variety of methods exist. They can be largely partitioned in random/undirected search methods (like grid search or random search) and direct methods. Be aware, though, that they all require tes
6,160
Guideline to select the hyperparameters in Deep Learning
Look no further! Yoshua Bengio published one of my favorite applied papers, one that I recommend to all new machine learning engineers when they start training neural nets: Practical recommendations for gradient-based training of deep architectures. To get his perspective on hyperparameter turning: including learning r...
Guideline to select the hyperparameters in Deep Learning
Look no further! Yoshua Bengio published one of my favorite applied papers, one that I recommend to all new machine learning engineers when they start training neural nets: Practical recommendations f
Guideline to select the hyperparameters in Deep Learning Look no further! Yoshua Bengio published one of my favorite applied papers, one that I recommend to all new machine learning engineers when they start training neural nets: Practical recommendations for gradient-based training of deep architectures. To get his pe...
Guideline to select the hyperparameters in Deep Learning Look no further! Yoshua Bengio published one of my favorite applied papers, one that I recommend to all new machine learning engineers when they start training neural nets: Practical recommendations f
6,161
Who invented stochastic gradient descent?
Stochastic Gradient Descent is preceded by Stochastic Approximation as first described by Robbins and Monro in their paper, A Stochastic Approximation Method. Kiefer and Wolfowitz subsequently published their paper, *Stochastic Estimation of the Maximum of a Regression Function* which is more recognizable to people fam...
Who invented stochastic gradient descent?
Stochastic Gradient Descent is preceded by Stochastic Approximation as first described by Robbins and Monro in their paper, A Stochastic Approximation Method. Kiefer and Wolfowitz subsequently publish
Who invented stochastic gradient descent? Stochastic Gradient Descent is preceded by Stochastic Approximation as first described by Robbins and Monro in their paper, A Stochastic Approximation Method. Kiefer and Wolfowitz subsequently published their paper, *Stochastic Estimation of the Maximum of a Regression Function...
Who invented stochastic gradient descent? Stochastic Gradient Descent is preceded by Stochastic Approximation as first described by Robbins and Monro in their paper, A Stochastic Approximation Method. Kiefer and Wolfowitz subsequently publish
6,162
Who invented stochastic gradient descent?
See Rosenblatt F. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological review. 1958 Nov;65(6):386. I am not sure if SGD was invented before this in optimization literature—probably was—but here I believe he describes an application of SGD to train a perceptro...
Who invented stochastic gradient descent?
See Rosenblatt F. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological review. 1958 Nov;65(6):386. I am not sure if SGD was invented before
Who invented stochastic gradient descent? See Rosenblatt F. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological review. 1958 Nov;65(6):386. I am not sure if SGD was invented before this in optimization literature—probably was—but here I believe he describes ...
Who invented stochastic gradient descent? See Rosenblatt F. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological review. 1958 Nov;65(6):386. I am not sure if SGD was invented before
6,163
How often do you have to roll a 6-sided die to obtain every number at least once?
Because a "completely analytical approach" has been requested, here is an exact solution. It also provides an alternative approach to solving the question at Probability to draw a black ball in a set of black and white balls with mixed replacement conditions. The number of moves in the game, $X$, can be modeled as th...
How often do you have to roll a 6-sided die to obtain every number at least once?
Because a "completely analytical approach" has been requested, here is an exact solution. It also provides an alternative approach to solving the question at Probability to draw a black ball in a set
How often do you have to roll a 6-sided die to obtain every number at least once? Because a "completely analytical approach" has been requested, here is an exact solution. It also provides an alternative approach to solving the question at Probability to draw a black ball in a set of black and white balls with mixed r...
How often do you have to roll a 6-sided die to obtain every number at least once? Because a "completely analytical approach" has been requested, here is an exact solution. It also provides an alternative approach to solving the question at Probability to draw a black ball in a set
6,164
How often do you have to roll a 6-sided die to obtain every number at least once?
ThePawn has the right idea to attack the problem with a recurrence relationship. Consider a Markov chain with states $\{0, \dotsc, 6\}$ corresponding to the count of the number of distinct dice rolls that have happened. State 0 is the start state, and state 6 is the finish state. Then, the probability of transition f...
How often do you have to roll a 6-sided die to obtain every number at least once?
ThePawn has the right idea to attack the problem with a recurrence relationship. Consider a Markov chain with states $\{0, \dotsc, 6\}$ corresponding to the count of the number of distinct dice rolls
How often do you have to roll a 6-sided die to obtain every number at least once? ThePawn has the right idea to attack the problem with a recurrence relationship. Consider a Markov chain with states $\{0, \dotsc, 6\}$ corresponding to the count of the number of distinct dice rolls that have happened. State 0 is the s...
How often do you have to roll a 6-sided die to obtain every number at least once? ThePawn has the right idea to attack the problem with a recurrence relationship. Consider a Markov chain with states $\{0, \dotsc, 6\}$ corresponding to the count of the number of distinct dice rolls
6,165
How often do you have to roll a 6-sided die to obtain every number at least once?
Quick and dirty Monte Carlo estimate in R of the length of a game for 1 player: N = 1e5 sample_length = function(n) { # random game length x = numeric(0) while(length(unique(x)) < n) x[length(x)+1] = sample(1:n,1) return(length(x)) } game_lengths = replicate(N, sample_length(6)) Results: $\hat{\mu}=14.684$...
How often do you have to roll a 6-sided die to obtain every number at least once?
Quick and dirty Monte Carlo estimate in R of the length of a game for 1 player: N = 1e5 sample_length = function(n) { # random game length x = numeric(0) while(length(unique(x)) < n) x[length(
How often do you have to roll a 6-sided die to obtain every number at least once? Quick and dirty Monte Carlo estimate in R of the length of a game for 1 player: N = 1e5 sample_length = function(n) { # random game length x = numeric(0) while(length(unique(x)) < n) x[length(x)+1] = sample(1:n,1) return(lengt...
How often do you have to roll a 6-sided die to obtain every number at least once? Quick and dirty Monte Carlo estimate in R of the length of a game for 1 player: N = 1e5 sample_length = function(n) { # random game length x = numeric(0) while(length(unique(x)) < n) x[length(
6,166
How often do you have to roll a 6-sided die to obtain every number at least once?
How about a recursive relation with respect to the remaining number $m$ of sides you have to obtain in order to win. $$T_{1} = 6$$ $$T_{m} = 1 + \frac{6 - m}{6}T_{m} + \frac{m}{6}T_{m-1}$$ Basically, the last relation is saying that the number of time to roll the $m$ remaining different numbers is equal to $1$ plus: ...
How often do you have to roll a 6-sided die to obtain every number at least once?
How about a recursive relation with respect to the remaining number $m$ of sides you have to obtain in order to win. $$T_{1} = 6$$ $$T_{m} = 1 + \frac{6 - m}{6}T_{m} + \frac{m}{6}T_{m-1}$$ Basically,
How often do you have to roll a 6-sided die to obtain every number at least once? How about a recursive relation with respect to the remaining number $m$ of sides you have to obtain in order to win. $$T_{1} = 6$$ $$T_{m} = 1 + \frac{6 - m}{6}T_{m} + \frac{m}{6}T_{m-1}$$ Basically, the last relation is saying that the ...
How often do you have to roll a 6-sided die to obtain every number at least once? How about a recursive relation with respect to the remaining number $m$ of sides you have to obtain in order to win. $$T_{1} = 6$$ $$T_{m} = 1 + \frac{6 - m}{6}T_{m} + \frac{m}{6}T_{m-1}$$ Basically,
6,167
How often do you have to roll a 6-sided die to obtain every number at least once?
A simple and intuitive explanation to the first question: You first need to roll any number. This is easy, it'll always take exactly 1 roll. You then need to roll any number other than the first one. The chance of this happening is $\frac{5}{6}$, so it'll take $\frac{6}{5}$ (1.2) rolls on average. You then need to roll...
How often do you have to roll a 6-sided die to obtain every number at least once?
A simple and intuitive explanation to the first question: You first need to roll any number. This is easy, it'll always take exactly 1 roll. You then need to roll any number other than the first one.
How often do you have to roll a 6-sided die to obtain every number at least once? A simple and intuitive explanation to the first question: You first need to roll any number. This is easy, it'll always take exactly 1 roll. You then need to roll any number other than the first one. The chance of this happening is $\frac...
How often do you have to roll a 6-sided die to obtain every number at least once? A simple and intuitive explanation to the first question: You first need to roll any number. This is easy, it'll always take exactly 1 roll. You then need to roll any number other than the first one.
6,168
How often do you have to roll a 6-sided die to obtain every number at least once?
the probability density function (or discrete equivalent) for getting the next new number is: f = sum( p * ( 1 - p )^( i - 1 ) , i = 1 .. inf ) where p is the probability per roll, 1 when no numbers have been rolled, 5/6 after 1, 4/6 .. down to 1/6 for the last number the expected value, mu = sum( i * p * ( 1 - p )^( i...
How often do you have to roll a 6-sided die to obtain every number at least once?
the probability density function (or discrete equivalent) for getting the next new number is: f = sum( p * ( 1 - p )^( i - 1 ) , i = 1 .. inf ) where p is the probability per roll, 1 when no numbers h
How often do you have to roll a 6-sided die to obtain every number at least once? the probability density function (or discrete equivalent) for getting the next new number is: f = sum( p * ( 1 - p )^( i - 1 ) , i = 1 .. inf ) where p is the probability per roll, 1 when no numbers have been rolled, 5/6 after 1, 4/6 .. d...
How often do you have to roll a 6-sided die to obtain every number at least once? the probability density function (or discrete equivalent) for getting the next new number is: f = sum( p * ( 1 - p )^( i - 1 ) , i = 1 .. inf ) where p is the probability per roll, 1 when no numbers h
6,169
How often do you have to roll a 6-sided die to obtain every number at least once?
Question 1 was: How many times do you have to roll a six-sided dice until you get every number at least once? Obviously, the correct answer must be 'infinite'.
How often do you have to roll a 6-sided die to obtain every number at least once?
Question 1 was: How many times do you have to roll a six-sided dice until you get every number at least once? Obviously, the correct answer must be 'infinite'.
How often do you have to roll a 6-sided die to obtain every number at least once? Question 1 was: How many times do you have to roll a six-sided dice until you get every number at least once? Obviously, the correct answer must be 'infinite'.
How often do you have to roll a 6-sided die to obtain every number at least once? Question 1 was: How many times do you have to roll a six-sided dice until you get every number at least once? Obviously, the correct answer must be 'infinite'.
6,170
What is the difference between "coefficient of determination" and "mean squared error"?
$R^2=1-\frac{SSE}{SST}$, where $SSE$ is the sum of squared error (residuals or deviations from the regression line) and $SST$ is the sum of squared deviations from the dependent's $Y$ mean. $MSE=\frac{SSE}{n-m}$, where $n$ is the sample size and $m$ is the number of parameters in the model (including intercept, if any)...
What is the difference between "coefficient of determination" and "mean squared error"?
$R^2=1-\frac{SSE}{SST}$, where $SSE$ is the sum of squared error (residuals or deviations from the regression line) and $SST$ is the sum of squared deviations from the dependent's $Y$ mean. $MSE=\frac
What is the difference between "coefficient of determination" and "mean squared error"? $R^2=1-\frac{SSE}{SST}$, where $SSE$ is the sum of squared error (residuals or deviations from the regression line) and $SST$ is the sum of squared deviations from the dependent's $Y$ mean. $MSE=\frac{SSE}{n-m}$, where $n$ is the sa...
What is the difference between "coefficient of determination" and "mean squared error"? $R^2=1-\frac{SSE}{SST}$, where $SSE$ is the sum of squared error (residuals or deviations from the regression line) and $SST$ is the sum of squared deviations from the dependent's $Y$ mean. $MSE=\frac
6,171
Doing principal component analysis or factor analysis on binary data
The question of dichotomous or binary variables in PCA or Factor analysis is eternal. There are polar opinions from "it is illegal" to "it is alright", through something like "you may do it but you'll get too many factors". My own current opinion is as follows. First, I deem that binary observed variable is descrete an...
Doing principal component analysis or factor analysis on binary data
The question of dichotomous or binary variables in PCA or Factor analysis is eternal. There are polar opinions from "it is illegal" to "it is alright", through something like "you may do it but you'll
Doing principal component analysis or factor analysis on binary data The question of dichotomous or binary variables in PCA or Factor analysis is eternal. There are polar opinions from "it is illegal" to "it is alright", through something like "you may do it but you'll get too many factors". My own current opinion is a...
Doing principal component analysis or factor analysis on binary data The question of dichotomous or binary variables in PCA or Factor analysis is eternal. There are polar opinions from "it is illegal" to "it is alright", through something like "you may do it but you'll
6,172
Are mixed models useful as predictive models?
It depends on the nature of the data, but in general I would expect the mixed model to outperform the fixed-effects only models. Let's take an example: modelling the relationship between sunshine and the height of wheat stalks. We have a number of measurements of individual stalks, but many of the stalks are measured ...
Are mixed models useful as predictive models?
It depends on the nature of the data, but in general I would expect the mixed model to outperform the fixed-effects only models. Let's take an example: modelling the relationship between sunshine and
Are mixed models useful as predictive models? It depends on the nature of the data, but in general I would expect the mixed model to outperform the fixed-effects only models. Let's take an example: modelling the relationship between sunshine and the height of wheat stalks. We have a number of measurements of individua...
Are mixed models useful as predictive models? It depends on the nature of the data, but in general I would expect the mixed model to outperform the fixed-effects only models. Let's take an example: modelling the relationship between sunshine and
6,173
Are mixed models useful as predictive models?
Following up on mkt's excellent response: From my own personal experience developing predictive models in the health insurance field, incorporating random effects into predictive models (including machine learning models) has a number of advantages. I'm often asked to build models predicting future claims outcomes for ...
Are mixed models useful as predictive models?
Following up on mkt's excellent response: From my own personal experience developing predictive models in the health insurance field, incorporating random effects into predictive models (including mac
Are mixed models useful as predictive models? Following up on mkt's excellent response: From my own personal experience developing predictive models in the health insurance field, incorporating random effects into predictive models (including machine learning models) has a number of advantages. I'm often asked to build...
Are mixed models useful as predictive models? Following up on mkt's excellent response: From my own personal experience developing predictive models in the health insurance field, incorporating random effects into predictive models (including mac
6,174
What is the intuitive reason behind doing rotations in Factor Analysis/PCA & how to select appropriate rotation?
Reason for rotation. Rotations are done for the sake of interpretation of the extracted factors in factor analysis (or components in PCA, if you venture to use PCA as a factor analytic technique). You are right when you describe your understanding. Rotation is done in the pursuit of some structure of the loading matrix...
What is the intuitive reason behind doing rotations in Factor Analysis/PCA & how to select appropria
Reason for rotation. Rotations are done for the sake of interpretation of the extracted factors in factor analysis (or components in PCA, if you venture to use PCA as a factor analytic technique). You
What is the intuitive reason behind doing rotations in Factor Analysis/PCA & how to select appropriate rotation? Reason for rotation. Rotations are done for the sake of interpretation of the extracted factors in factor analysis (or components in PCA, if you venture to use PCA as a factor analytic technique). You are ri...
What is the intuitive reason behind doing rotations in Factor Analysis/PCA & how to select appropria Reason for rotation. Rotations are done for the sake of interpretation of the extracted factors in factor analysis (or components in PCA, if you venture to use PCA as a factor analytic technique). You
6,175
How do I get people to take better care of data?
It's worth considering ideas from the software world. In particular you might think of setting up: a version control repository and a central database server. Version control probably helps you out with otherwise free floating files, such as Excel and text files, etc. But this could also include files associated wi...
How do I get people to take better care of data?
It's worth considering ideas from the software world. In particular you might think of setting up: a version control repository and a central database server. Version control probably helps you out
How do I get people to take better care of data? It's worth considering ideas from the software world. In particular you might think of setting up: a version control repository and a central database server. Version control probably helps you out with otherwise free floating files, such as Excel and text files, etc....
How do I get people to take better care of data? It's worth considering ideas from the software world. In particular you might think of setting up: a version control repository and a central database server. Version control probably helps you out
6,176
How do I get people to take better care of data?
One free online resource is the set of Statistical Good Practice Guidelines from the Statistical Services Centre at the University of Reading. In particular: Data Management Guidelines for Experimental Projects The Role of a Database Package in Managing Research Data
How do I get people to take better care of data?
One free online resource is the set of Statistical Good Practice Guidelines from the Statistical Services Centre at the University of Reading. In particular: Data Management Guidelines for Experiment
How do I get people to take better care of data? One free online resource is the set of Statistical Good Practice Guidelines from the Statistical Services Centre at the University of Reading. In particular: Data Management Guidelines for Experimental Projects The Role of a Database Package in Managing Research Data
How do I get people to take better care of data? One free online resource is the set of Statistical Good Practice Guidelines from the Statistical Services Centre at the University of Reading. In particular: Data Management Guidelines for Experiment
6,177
How do I get people to take better care of data?
I think first of all you have to ask yourself: why do people use Excel to do tasks Excel was not made for? 1) They already know how to use it 2) It works. Maybe in a clumsy way but it works and that's what they want I copy a series of numbers in, press a button and I have a plot. As easy as that. So, make them understa...
How do I get people to take better care of data?
I think first of all you have to ask yourself: why do people use Excel to do tasks Excel was not made for? 1) They already know how to use it 2) It works. Maybe in a clumsy way but it works and that's
How do I get people to take better care of data? I think first of all you have to ask yourself: why do people use Excel to do tasks Excel was not made for? 1) They already know how to use it 2) It works. Maybe in a clumsy way but it works and that's what they want I copy a series of numbers in, press a button and I hav...
How do I get people to take better care of data? I think first of all you have to ask yourself: why do people use Excel to do tasks Excel was not made for? 1) They already know how to use it 2) It works. Maybe in a clumsy way but it works and that's
6,178
How do I get people to take better care of data?
I underline all answers given already, but let's call a cat a cat: in many workspaces it is hardly impossible to convince management that investment in "exotic" softwaretools (exotic to them, that is) is necessary, let alone hiring somebody that could set it up and maintain it. I have told quite some clients that they ...
How do I get people to take better care of data?
I underline all answers given already, but let's call a cat a cat: in many workspaces it is hardly impossible to convince management that investment in "exotic" softwaretools (exotic to them, that is)
How do I get people to take better care of data? I underline all answers given already, but let's call a cat a cat: in many workspaces it is hardly impossible to convince management that investment in "exotic" softwaretools (exotic to them, that is) is necessary, let alone hiring somebody that could set it up and maint...
How do I get people to take better care of data? I underline all answers given already, but let's call a cat a cat: in many workspaces it is hardly impossible to convince management that investment in "exotic" softwaretools (exotic to them, that is)
6,179
How do I get people to take better care of data?
VisTrails: A Python-Based Scientific Workflow and Provenance System. This talk given at PyCon 2010 has some good ideas. Worth listening to even if you are not interested in using VisTrails or python. In the end I think if you would be able to require that there be a clear document way to reproduce the data. And require...
How do I get people to take better care of data?
VisTrails: A Python-Based Scientific Workflow and Provenance System. This talk given at PyCon 2010 has some good ideas. Worth listening to even if you are not interested in using VisTrails or python.
How do I get people to take better care of data? VisTrails: A Python-Based Scientific Workflow and Provenance System. This talk given at PyCon 2010 has some good ideas. Worth listening to even if you are not interested in using VisTrails or python. In the end I think if you would be able to require that there be a clea...
How do I get people to take better care of data? VisTrails: A Python-Based Scientific Workflow and Provenance System. This talk given at PyCon 2010 has some good ideas. Worth listening to even if you are not interested in using VisTrails or python.
6,180
How do I get people to take better care of data?
I just came across this webpage hosted by ICPSR on data management plans. Although I think the goals of ICPSR will be somewhat different than your business (e.g. they are heavily interested in making the data readily able to be disseminated without violating confidentiality), I imagine they have useful information to b...
How do I get people to take better care of data?
I just came across this webpage hosted by ICPSR on data management plans. Although I think the goals of ICPSR will be somewhat different than your business (e.g. they are heavily interested in making
How do I get people to take better care of data? I just came across this webpage hosted by ICPSR on data management plans. Although I think the goals of ICPSR will be somewhat different than your business (e.g. they are heavily interested in making the data readily able to be disseminated without violating confidential...
How do I get people to take better care of data? I just came across this webpage hosted by ICPSR on data management plans. Although I think the goals of ICPSR will be somewhat different than your business (e.g. they are heavily interested in making
6,181
How do I get people to take better care of data?
In the case of a much smaller scales, I experienced using dropbox fora sharing/syncing a copy of the data files (and scripts and results) with other researchers/collaborators (I wrote about it here). The other tool I have used is google docs for collecting and sharing data (about which I wrote here)
How do I get people to take better care of data?
In the case of a much smaller scales, I experienced using dropbox fora sharing/syncing a copy of the data files (and scripts and results) with other researchers/collaborators (I wrote about it here).
How do I get people to take better care of data? In the case of a much smaller scales, I experienced using dropbox fora sharing/syncing a copy of the data files (and scripts and results) with other researchers/collaborators (I wrote about it here). The other tool I have used is google docs for collecting and sharing da...
How do I get people to take better care of data? In the case of a much smaller scales, I experienced using dropbox fora sharing/syncing a copy of the data files (and scripts and results) with other researchers/collaborators (I wrote about it here).
6,182
How do I get people to take better care of data?
Dropbox + packrat is nice for sharing files with backup/versioning. Then you load those files (after automated canonicalization/massage) into a database and do the analyses off of the cleaned-up data. Put the scripts to automate the Extract-Transform-Load cycle under version control (or at least a separate dropbox fol...
How do I get people to take better care of data?
Dropbox + packrat is nice for sharing files with backup/versioning. Then you load those files (after automated canonicalization/massage) into a database and do the analyses off of the cleaned-up data.
How do I get people to take better care of data? Dropbox + packrat is nice for sharing files with backup/versioning. Then you load those files (after automated canonicalization/massage) into a database and do the analyses off of the cleaned-up data. Put the scripts to automate the Extract-Transform-Load cycle under ve...
How do I get people to take better care of data? Dropbox + packrat is nice for sharing files with backup/versioning. Then you load those files (after automated canonicalization/massage) into a database and do the analyses off of the cleaned-up data.
6,183
How to determine the quality of a multiclass classifier
Like binary classification, you can use the empirical error rate for estimating the quality of your classifier. Let $g$ be a classifier, and $x_i$ and $y_i$ be respectively an example in your data base and its class. $$err(g) = \frac{1}{n} \sum_{i \leq n} \mathbb{1}_{g(x_i) \neq y_i}$$ As you said, when the classes are...
How to determine the quality of a multiclass classifier
Like binary classification, you can use the empirical error rate for estimating the quality of your classifier. Let $g$ be a classifier, and $x_i$ and $y_i$ be respectively an example in your data bas
How to determine the quality of a multiclass classifier Like binary classification, you can use the empirical error rate for estimating the quality of your classifier. Let $g$ be a classifier, and $x_i$ and $y_i$ be respectively an example in your data base and its class. $$err(g) = \frac{1}{n} \sum_{i \leq n} \mathbb{...
How to determine the quality of a multiclass classifier Like binary classification, you can use the empirical error rate for estimating the quality of your classifier. Let $g$ be a classifier, and $x_i$ and $y_i$ be respectively an example in your data bas
6,184
How to determine the quality of a multiclass classifier
To evaluate multi-way text classification systems, I use micro- and macro-averaged F1 (F-measure). The F-measure is essentially a weighted combination of precision and recall that. For binary classification, the micro and macro approaches are the same, but, for the multi-way case, I think they might help you out. You c...
How to determine the quality of a multiclass classifier
To evaluate multi-way text classification systems, I use micro- and macro-averaged F1 (F-measure). The F-measure is essentially a weighted combination of precision and recall that. For binary classifi
How to determine the quality of a multiclass classifier To evaluate multi-way text classification systems, I use micro- and macro-averaged F1 (F-measure). The F-measure is essentially a weighted combination of precision and recall that. For binary classification, the micro and macro approaches are the same, but, for th...
How to determine the quality of a multiclass classifier To evaluate multi-way text classification systems, I use micro- and macro-averaged F1 (F-measure). The F-measure is essentially a weighted combination of precision and recall that. For binary classifi
6,185
How to determine the quality of a multiclass classifier
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. # Function in R, using precision, recall and F statist...
How to determine the quality of a multiclass classifier
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
How to determine the quality of a multiclass classifier Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. ...
How to determine the quality of a multiclass classifier Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
6,186
LDA vs word2vec
An answer to Topic models and word co-occurrence methods covers the difference (skip-gram word2vec is compression of pointwise mutual information (PMI)). So: neither method is a generalization of another, word2vec allows us to use vector geometry (like word analogy, e.g. $v_{king} - v_{man} + v_{woman} \approx v_{quee...
LDA vs word2vec
An answer to Topic models and word co-occurrence methods covers the difference (skip-gram word2vec is compression of pointwise mutual information (PMI)). So: neither method is a generalization of ano
LDA vs word2vec An answer to Topic models and word co-occurrence methods covers the difference (skip-gram word2vec is compression of pointwise mutual information (PMI)). So: neither method is a generalization of another, word2vec allows us to use vector geometry (like word analogy, e.g. $v_{king} - v_{man} + v_{woman}...
LDA vs word2vec An answer to Topic models and word co-occurrence methods covers the difference (skip-gram word2vec is compression of pointwise mutual information (PMI)). So: neither method is a generalization of ano
6,187
LDA vs word2vec
The two algorithms differ quite a bit in their purpose. LDA is aimed mostly at describing documents and document collections by assigning topic distributions to them, which in turn have word distributions assigned, as you mention. word2vec looks to embed words in a latent factor vector space, an idea originating from t...
LDA vs word2vec
The two algorithms differ quite a bit in their purpose. LDA is aimed mostly at describing documents and document collections by assigning topic distributions to them, which in turn have word distribut
LDA vs word2vec The two algorithms differ quite a bit in their purpose. LDA is aimed mostly at describing documents and document collections by assigning topic distributions to them, which in turn have word distributions assigned, as you mention. word2vec looks to embed words in a latent factor vector space, an idea or...
LDA vs word2vec The two algorithms differ quite a bit in their purpose. LDA is aimed mostly at describing documents and document collections by assigning topic distributions to them, which in turn have word distribut
6,188
LDA vs word2vec
There is a relation between LDA and $\bf {Topic2Vec}$, a model used for learning Distributed Topic Representations $\bf together\ with$ Word Representations. LDA is used to construct a log-likelihood for CBOW and Skip-gram. The following explanation is inside the section 3 of the work Topic2Vec: Learning Distributed Re...
LDA vs word2vec
There is a relation between LDA and $\bf {Topic2Vec}$, a model used for learning Distributed Topic Representations $\bf together\ with$ Word Representations. LDA is used to construct a log-likelihood
LDA vs word2vec There is a relation between LDA and $\bf {Topic2Vec}$, a model used for learning Distributed Topic Representations $\bf together\ with$ Word Representations. LDA is used to construct a log-likelihood for CBOW and Skip-gram. The following explanation is inside the section 3 of the work Topic2Vec: Learnin...
LDA vs word2vec There is a relation between LDA and $\bf {Topic2Vec}$, a model used for learning Distributed Topic Representations $\bf together\ with$ Word Representations. LDA is used to construct a log-likelihood
6,189
LDA vs word2vec
Other answers here cover the technical differences between those two algorithms, however I think the core difference is their purpose: Those two algorithms were designed to do different things: word2vec ultimately yields a mapping between words and a fixed length vector. If we were to compare it with another well known...
LDA vs word2vec
Other answers here cover the technical differences between those two algorithms, however I think the core difference is their purpose: Those two algorithms were designed to do different things: word2v
LDA vs word2vec Other answers here cover the technical differences between those two algorithms, however I think the core difference is their purpose: Those two algorithms were designed to do different things: word2vec ultimately yields a mapping between words and a fixed length vector. If we were to compare it with an...
LDA vs word2vec Other answers here cover the technical differences between those two algorithms, however I think the core difference is their purpose: Those two algorithms were designed to do different things: word2v
6,190
LDA vs word2vec
From a practical standpoint... LDA starts with a bag-of-words input which considers what words co-occur in documents, but does not pay attention to the immediate context of words. This means the words can appear anywhere in the document and in any order, which strips out a certain level of information. By contrast word...
LDA vs word2vec
From a practical standpoint... LDA starts with a bag-of-words input which considers what words co-occur in documents, but does not pay attention to the immediate context of words. This means the words
LDA vs word2vec From a practical standpoint... LDA starts with a bag-of-words input which considers what words co-occur in documents, but does not pay attention to the immediate context of words. This means the words can appear anywhere in the document and in any order, which strips out a certain level of information. ...
LDA vs word2vec From a practical standpoint... LDA starts with a bag-of-words input which considers what words co-occur in documents, but does not pay attention to the immediate context of words. This means the words
6,191
How to deal with hierarchical / nested data in machine learning
I have been thinking about this problem for a while, with inspirations from the following questions on this site. How can I include random effects into a randomForest? Random forest on grouped data Random Forests / adaboost in panel regression setting Random forest for binary panel data Modelling clustered data using ...
How to deal with hierarchical / nested data in machine learning
I have been thinking about this problem for a while, with inspirations from the following questions on this site. How can I include random effects into a randomForest? Random forest on grouped data R
How to deal with hierarchical / nested data in machine learning I have been thinking about this problem for a while, with inspirations from the following questions on this site. How can I include random effects into a randomForest? Random forest on grouped data Random Forests / adaboost in panel regression setting Ran...
How to deal with hierarchical / nested data in machine learning I have been thinking about this problem for a while, with inspirations from the following questions on this site. How can I include random effects into a randomForest? Random forest on grouped data R
6,192
How to deal with hierarchical / nested data in machine learning
Given that you only have two variables and straightforward nesting, I would echo the comments of others mentioning a hierarchical Bayes model. You mention a preference for tree-based methods, but is there a particular reason for this? With a minimal number of predictors, I find that linearity is often a valid assumptio...
How to deal with hierarchical / nested data in machine learning
Given that you only have two variables and straightforward nesting, I would echo the comments of others mentioning a hierarchical Bayes model. You mention a preference for tree-based methods, but is t
How to deal with hierarchical / nested data in machine learning Given that you only have two variables and straightforward nesting, I would echo the comments of others mentioning a hierarchical Bayes model. You mention a preference for tree-based methods, but is there a particular reason for this? With a minimal number...
How to deal with hierarchical / nested data in machine learning Given that you only have two variables and straightforward nesting, I would echo the comments of others mentioning a hierarchical Bayes model. You mention a preference for tree-based methods, but is t
6,193
How to deal with hierarchical / nested data in machine learning
This is more of a comment or suggestion rather than an answer, but I think you ask an important question here. As someone who works exclusively with multilevel data, I can say that I have found very little about machine learning with multilevel data. However, Dan Martin, a recent PhD graduate in quantitative psychology...
How to deal with hierarchical / nested data in machine learning
This is more of a comment or suggestion rather than an answer, but I think you ask an important question here. As someone who works exclusively with multilevel data, I can say that I have found very l
How to deal with hierarchical / nested data in machine learning This is more of a comment or suggestion rather than an answer, but I think you ask an important question here. As someone who works exclusively with multilevel data, I can say that I have found very little about machine learning with multilevel data. Howev...
How to deal with hierarchical / nested data in machine learning This is more of a comment or suggestion rather than an answer, but I think you ask an important question here. As someone who works exclusively with multilevel data, I can say that I have found very l
6,194
How to deal with hierarchical / nested data in machine learning
You can use a mixed effect model that models the ID variables as random effects. By doing so, you allow for information pooling: you use both data from the global average and from the group averages, and the less data you have per group, the more weight is given to the global average. If you want to use a machine learn...
How to deal with hierarchical / nested data in machine learning
You can use a mixed effect model that models the ID variables as random effects. By doing so, you allow for information pooling: you use both data from the global average and from the group averages,
How to deal with hierarchical / nested data in machine learning You can use a mixed effect model that models the ID variables as random effects. By doing so, you allow for information pooling: you use both data from the global average and from the group averages, and the less data you have per group, the more weight is...
How to deal with hierarchical / nested data in machine learning You can use a mixed effect model that models the ID variables as random effects. By doing so, you allow for information pooling: you use both data from the global average and from the group averages,
6,195
How to deal with hierarchical / nested data in machine learning
The function RFcluster() from the gamclass package for R "adapts random forests to work (albeit clumsily and inefficiently) with clustered categorical outcome data". The following example is from the help page for RFcluster: library(randomForest) library(gamclass) data(mlbench::Vowel) RFcluster(formula=Class ~., i...
How to deal with hierarchical / nested data in machine learning
The function RFcluster() from the gamclass package for R "adapts random forests to work (albeit clumsily and inefficiently) with clustered categorical outcome data". The following example is from the
How to deal with hierarchical / nested data in machine learning The function RFcluster() from the gamclass package for R "adapts random forests to work (albeit clumsily and inefficiently) with clustered categorical outcome data". The following example is from the help page for RFcluster: library(randomForest) librar...
How to deal with hierarchical / nested data in machine learning The function RFcluster() from the gamclass package for R "adapts random forests to work (albeit clumsily and inefficiently) with clustered categorical outcome data". The following example is from the
6,196
How to deal with hierarchical / nested data in machine learning
R package glmertree allows for fitting decision trees to multilevel and longitudinal data (which would otherwise be modeled with a mixed-effects model). It allows for specifying a random effects structure, and partitions the dataset into subgroups using level-I, or higher-level predictors. For further reference, see th...
How to deal with hierarchical / nested data in machine learning
R package glmertree allows for fitting decision trees to multilevel and longitudinal data (which would otherwise be modeled with a mixed-effects model). It allows for specifying a random effects struc
How to deal with hierarchical / nested data in machine learning R package glmertree allows for fitting decision trees to multilevel and longitudinal data (which would otherwise be modeled with a mixed-effects model). It allows for specifying a random effects structure, and partitions the dataset into subgroups using le...
How to deal with hierarchical / nested data in machine learning R package glmertree allows for fitting decision trees to multilevel and longitudinal data (which would otherwise be modeled with a mixed-effects model). It allows for specifying a random effects struc
6,197
How to deal with hierarchical / nested data in machine learning
You may want to have a look at metboost: Miller PJ et al. metboost: Exploratory regression analysis with hierarchically clustered data.arXiv:1702.03994 Quote from the abstract: We propose an extension to boosted decision decision trees called metboost for hierarchically clustered data. It works by constraining the stru...
How to deal with hierarchical / nested data in machine learning
You may want to have a look at metboost: Miller PJ et al. metboost: Exploratory regression analysis with hierarchically clustered data.arXiv:1702.03994 Quote from the abstract: We propose an extension
How to deal with hierarchical / nested data in machine learning You may want to have a look at metboost: Miller PJ et al. metboost: Exploratory regression analysis with hierarchically clustered data.arXiv:1702.03994 Quote from the abstract: We propose an extension to boosted decision decision trees called metboost for ...
How to deal with hierarchical / nested data in machine learning You may want to have a look at metboost: Miller PJ et al. metboost: Exploratory regression analysis with hierarchically clustered data.arXiv:1702.03994 Quote from the abstract: We propose an extension
6,198
What is the meaning of a confidence interval taken from bootstrapped resamples?
If the bootstrapping procedure and the formation of the confidence interval were performed correctly, it means the same as any other confidence interval. From a frequentist perspective, a 95% CI implies that if the entire study were repeated identically ad infinitum, 95% of such confidence intervals formed in this man...
What is the meaning of a confidence interval taken from bootstrapped resamples?
If the bootstrapping procedure and the formation of the confidence interval were performed correctly, it means the same as any other confidence interval. From a frequentist perspective, a 95% CI impl
What is the meaning of a confidence interval taken from bootstrapped resamples? If the bootstrapping procedure and the formation of the confidence interval were performed correctly, it means the same as any other confidence interval. From a frequentist perspective, a 95% CI implies that if the entire study were repeat...
What is the meaning of a confidence interval taken from bootstrapped resamples? If the bootstrapping procedure and the formation of the confidence interval were performed correctly, it means the same as any other confidence interval. From a frequentist perspective, a 95% CI impl
6,199
What is the meaning of a confidence interval taken from bootstrapped resamples?
What you are saying is that there is no need to find confidence interval from bootstrapped resamples. If you are satisfied with the statistic (sample mean or sample proportion) obtained from bootstrapped resamples, do not find any confidence interval and so, no question of interpretation. But if you are not satisfied w...
What is the meaning of a confidence interval taken from bootstrapped resamples?
What you are saying is that there is no need to find confidence interval from bootstrapped resamples. If you are satisfied with the statistic (sample mean or sample proportion) obtained from bootstrap
What is the meaning of a confidence interval taken from bootstrapped resamples? What you are saying is that there is no need to find confidence interval from bootstrapped resamples. If you are satisfied with the statistic (sample mean or sample proportion) obtained from bootstrapped resamples, do not find any confidenc...
What is the meaning of a confidence interval taken from bootstrapped resamples? What you are saying is that there is no need to find confidence interval from bootstrapped resamples. If you are satisfied with the statistic (sample mean or sample proportion) obtained from bootstrap
6,200
What is the meaning of a confidence interval taken from bootstrapped resamples?
We are referring to the true parameter of the original population. It is possible to do this assuming that the data were drawn randomly from the original population -- in that case, there are mathematical arguments showing that the bootstrap procedures will give a valid confidence interval, at least as the size of the ...
What is the meaning of a confidence interval taken from bootstrapped resamples?
We are referring to the true parameter of the original population. It is possible to do this assuming that the data were drawn randomly from the original population -- in that case, there are mathemat
What is the meaning of a confidence interval taken from bootstrapped resamples? We are referring to the true parameter of the original population. It is possible to do this assuming that the data were drawn randomly from the original population -- in that case, there are mathematical arguments showing that the bootstra...
What is the meaning of a confidence interval taken from bootstrapped resamples? We are referring to the true parameter of the original population. It is possible to do this assuming that the data were drawn randomly from the original population -- in that case, there are mathemat