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
|
|---|---|---|---|---|---|---|
9,301
|
Statistical methods for data where only a minimum/maximum value is known
|
This is a case of censoring/coarse data. Assume you think that your data arises from a distribution with nicely behaved continuous (etc.) pdf $f(x)$ and cdf $F(x)$. The standard solution for time to event data when the exact time $x_i$ of an event for subject $i$ is known is that the likelihood contribution is $f(x_i)$. If we only know that the time was greater than $y_i$ (right-censoring), then the likelihood contribution is $1-F(y_i)$ under the assumption of independent censoring. If we know that the time is less than $z_i$ (left-censoring), then the likelihood contribution is $F(z_i)$. Finally, if the time falls into some interval $(y_i, z_i]$, then the likelihood contribution would be $F(z_i)-F(y_i)$.
|
Statistical methods for data where only a minimum/maximum value is known
|
This is a case of censoring/coarse data. Assume you think that your data arises from a distribution with nicely behaved continuous (etc.) pdf $f(x)$ and cdf $F(x)$. The standard solution for time to e
|
Statistical methods for data where only a minimum/maximum value is known
This is a case of censoring/coarse data. Assume you think that your data arises from a distribution with nicely behaved continuous (etc.) pdf $f(x)$ and cdf $F(x)$. The standard solution for time to event data when the exact time $x_i$ of an event for subject $i$ is known is that the likelihood contribution is $f(x_i)$. If we only know that the time was greater than $y_i$ (right-censoring), then the likelihood contribution is $1-F(y_i)$ under the assumption of independent censoring. If we know that the time is less than $z_i$ (left-censoring), then the likelihood contribution is $F(z_i)$. Finally, if the time falls into some interval $(y_i, z_i]$, then the likelihood contribution would be $F(z_i)-F(y_i)$.
|
Statistical methods for data where only a minimum/maximum value is known
This is a case of censoring/coarse data. Assume you think that your data arises from a distribution with nicely behaved continuous (etc.) pdf $f(x)$ and cdf $F(x)$. The standard solution for time to e
|
9,302
|
Statistical methods for data where only a minimum/maximum value is known
|
This problem seems like it might be handled well by logistic regression.
You have two states, A and B, and want to examine the probability of whether a particular individual has switched irreversibly from state A to state B. One fundamental predictor variable would be age at the time of observation. The other factor or factors of interest would be additional predictor variables.
Your logistic model would then use the actual observations of A/B state, age, and other factors to estimate the probability of being in state B as a function of those predictors. The age at which that probability passes 0.5 could be used as the estimate of the transition time, and you would then examine the influences of the other factor(s) on that predicted transition time.
Added in response to discussion:
As with any linear model, you need to ensure that your predictors are transformed in a way that they bear a linear relation to the outcome variable, in this case the log-odds of the probability of having moved to state B. That is not necessarily a trivial problem. The answer by @CliffAB shows how a log transformation of the age variable might be used.
|
Statistical methods for data where only a minimum/maximum value is known
|
This problem seems like it might be handled well by logistic regression.
You have two states, A and B, and want to examine the probability of whether a particular individual has switched irreversibly
|
Statistical methods for data where only a minimum/maximum value is known
This problem seems like it might be handled well by logistic regression.
You have two states, A and B, and want to examine the probability of whether a particular individual has switched irreversibly from state A to state B. One fundamental predictor variable would be age at the time of observation. The other factor or factors of interest would be additional predictor variables.
Your logistic model would then use the actual observations of A/B state, age, and other factors to estimate the probability of being in state B as a function of those predictors. The age at which that probability passes 0.5 could be used as the estimate of the transition time, and you would then examine the influences of the other factor(s) on that predicted transition time.
Added in response to discussion:
As with any linear model, you need to ensure that your predictors are transformed in a way that they bear a linear relation to the outcome variable, in this case the log-odds of the probability of having moved to state B. That is not necessarily a trivial problem. The answer by @CliffAB shows how a log transformation of the age variable might be used.
|
Statistical methods for data where only a minimum/maximum value is known
This problem seems like it might be handled well by logistic regression.
You have two states, A and B, and want to examine the probability of whether a particular individual has switched irreversibly
|
9,303
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
|
The difference you are observing is due to the additional division by the number of observations, N, that GLMNET uses in their objective function and implicit standardization of Y by its sample standard deviation as shown below.
$$
\frac{1}{2N}\left\|\frac{y}{s_y}-X\beta\right\|^2_{2}+\lambda\|\beta\|^2_{2}/2
$$
where we use $1/n$ in place of $1/(n-1)$ for $s_y$,
$$
s_y=\frac{\sum_i(y_i-\bar{y})^2}{n}
$$
By differentiating with respect to beta, setting the equation to zero,
$$
X^TX\beta-\frac{X^Ty}{s_y}+N\lambda\beta =0
$$
And solving for beta, we obtain the estimate,
$$
\tilde{\beta}_{GLMNET}= (X^TX+N\lambda I_p)^{-1}\frac{X^Ty}{s_y}
$$
To recover the estimates (and their corresponding penalties) on the original metric of Y, GLMNET multiplies both the estimates and the lambdas by $s_y$ and returns these results to the user,
$$
\hat{\beta}_{GLMNET}=s_y\tilde{\beta}_{GLMNET}= (X^TX+N\lambda I_p)^{-1}X^Ty
$$
$$
\lambda_{unstd.}=s_y\lambda
$$
Compare this solution with the standard derivation of ridge regression.
$$
\hat{\beta}= (X^TX+\lambda I_p)^{-1}X^Ty
$$
Notice that $\lambda$ is scaled by an extra factor of N. Additionally, when we use the predict() or coef() function, the penalty is going to be implicitly scaled by $1/s_y$. That is to say, when we use these functions to obtain the coefficient estimates for some $\lambda^*$, we are effectively obtaining estimates for$\lambda=\lambda^*/s_y$.
Based on these observations, the penalty used in GLMNET needs to be scaled by a factor of $s_y/N$.
set.seed(123)
n <- 1000
p <- 100
X <- matrix(rnorm(n*p,0,1),n,p)
beta <- rnorm(p,0,1)
Y <- X%*%beta+rnorm(n,0,0.5)
sd_y <- sqrt(var(Y)*(n-1)/n)[1,1]
beta1 <- solve(t(X)%*%X+10*diag(p),t(X)%*%(Y))[,1]
fit_glmnet <- glmnet(X,Y, alpha=0, standardize = F, intercept = FALSE, thresh = 1e-20)
beta2 <- as.vector(coef(fit_glmnet, s = sd_y*10/n, exact = TRUE))[-1]
cbind(beta1[1:10], beta2[1:10])
[,1] [,2]
[1,] 0.23793862 0.23793862
[2,] 1.81859695 1.81859695
[3,] -0.06000195 -0.06000195
[4,] -0.04958695 -0.04958695
[5,] 0.41870613 0.41870613
[6,] 1.30244151 1.30244151
[7,] 0.06566168 0.06566168
[8,] 0.44634038 0.44634038
[9,] 0.86477108 0.86477108
[10,] -2.47535340 -2.47535340
The results generalize to the inclusion of an intercept and standardized X variables. We modify a standardized X matrix to include a column of ones and the diagonal matrix to have an additional zero entry in the [1,1] position (i.e. do not penalize the intercept). You can then unstandardize the estimates by their respective sample standard deviations (again ensure you are using 1/n when computing standard deviation).
$$
\hat\beta_{j}=\frac{\tilde{\beta_j}}{s_{x_j}}
$$
$$
\hat\beta_{0}=\tilde{\beta_0}-\bar{x}^T\hat{\beta}
$$
mean_x <- colMeans(X)
sd_x <- sqrt(apply(X,2,var)*(n-1)/n)
X_scaled <- matrix(NA, nrow = n, ncol = p)
for(i in 1:p){
X_scaled[,i] <- (X[,i] - mean_x[i])/sd_x[i]
}
X_scaled_ones <- cbind(rep(1,n), X_scaled)
beta3 <- solve(t(X_scaled_ones)%*%X_scaled_ones+1000*diag(x = c(0, rep(1,p))),t(X_scaled_ones)%*%(Y))[,1]
beta3 <- c(beta3[1] - crossprod(mean_x,beta3[-1]/sd_x), beta3[-1]/sd_x)
fit_glmnet2 <- glmnet(X,Y, alpha=0, thresh = 1e-20)
beta4 <- as.vector(coef(fit_glmnet2, s = sd_y*1000/n, exact = TRUE))
cbind(beta3[1:10], beta4[1:10])
[,1] [,2]
[1,] 0.24534485 0.24534485
[2,] 0.17661130 0.17661130
[3,] 0.86993230 0.86993230
[4,] -0.12449217 -0.12449217
[5,] -0.06410361 -0.06410361
[6,] 0.17568987 0.17568987
[7,] 0.59773230 0.59773230
[8,] 0.06594704 0.06594704
[9,] 0.22860655 0.22860655
[10,] 0.33254206 0.33254206
Added code to show standardized X with no intercept:
set.seed(123)
n <- 1000
p <- 100
X <- matrix(rnorm(n*p,0,1),n,p)
beta <- rnorm(p,0,1)
Y <- X%*%beta+rnorm(n,0,0.5)
sd_y <- sqrt(var(Y)*(n-1)/n)[1,1]
mean_x <- colMeans(X)
sd_x <- sqrt(apply(X,2,var)*(n-1)/n)
X_scaled <- matrix(NA, nrow = n, ncol = p)
for(i in 1:p){
X_scaled[,i] <- (X[,i] - mean_x[i])/sd_x[i]
}
beta1 <- solve(t(X_scaled)%*%X_scaled+10*diag(p),t(X_scaled)%*%(Y))[,1]
fit_glmnet <- glmnet(X_scaled,Y, alpha=0, standardize = F, intercept =
FALSE, thresh = 1e-20)
beta2 <- as.vector(coef(fit_glmnet, s = sd_y*10/n, exact = TRUE))[-1]
cbind(beta1[1:10], beta2[1:10])
[,1] [,2]
[1,] 0.23560948 0.23560948
[2,] 1.83469846 1.83469846
[3,] -0.05827086 -0.05827086
[4,] -0.04927314 -0.04927314
[5,] 0.41871870 0.41871870
[6,] 1.28969361 1.28969361
[7,] 0.06552927 0.06552927
[8,] 0.44576008 0.44576008
[9,] 0.90156795 0.90156795
[10,] -2.43163420 -2.43163420
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
|
The difference you are observing is due to the additional division by the number of observations, N, that GLMNET uses in their objective function and implicit standardization of Y by its sample standa
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
The difference you are observing is due to the additional division by the number of observations, N, that GLMNET uses in their objective function and implicit standardization of Y by its sample standard deviation as shown below.
$$
\frac{1}{2N}\left\|\frac{y}{s_y}-X\beta\right\|^2_{2}+\lambda\|\beta\|^2_{2}/2
$$
where we use $1/n$ in place of $1/(n-1)$ for $s_y$,
$$
s_y=\frac{\sum_i(y_i-\bar{y})^2}{n}
$$
By differentiating with respect to beta, setting the equation to zero,
$$
X^TX\beta-\frac{X^Ty}{s_y}+N\lambda\beta =0
$$
And solving for beta, we obtain the estimate,
$$
\tilde{\beta}_{GLMNET}= (X^TX+N\lambda I_p)^{-1}\frac{X^Ty}{s_y}
$$
To recover the estimates (and their corresponding penalties) on the original metric of Y, GLMNET multiplies both the estimates and the lambdas by $s_y$ and returns these results to the user,
$$
\hat{\beta}_{GLMNET}=s_y\tilde{\beta}_{GLMNET}= (X^TX+N\lambda I_p)^{-1}X^Ty
$$
$$
\lambda_{unstd.}=s_y\lambda
$$
Compare this solution with the standard derivation of ridge regression.
$$
\hat{\beta}= (X^TX+\lambda I_p)^{-1}X^Ty
$$
Notice that $\lambda$ is scaled by an extra factor of N. Additionally, when we use the predict() or coef() function, the penalty is going to be implicitly scaled by $1/s_y$. That is to say, when we use these functions to obtain the coefficient estimates for some $\lambda^*$, we are effectively obtaining estimates for$\lambda=\lambda^*/s_y$.
Based on these observations, the penalty used in GLMNET needs to be scaled by a factor of $s_y/N$.
set.seed(123)
n <- 1000
p <- 100
X <- matrix(rnorm(n*p,0,1),n,p)
beta <- rnorm(p,0,1)
Y <- X%*%beta+rnorm(n,0,0.5)
sd_y <- sqrt(var(Y)*(n-1)/n)[1,1]
beta1 <- solve(t(X)%*%X+10*diag(p),t(X)%*%(Y))[,1]
fit_glmnet <- glmnet(X,Y, alpha=0, standardize = F, intercept = FALSE, thresh = 1e-20)
beta2 <- as.vector(coef(fit_glmnet, s = sd_y*10/n, exact = TRUE))[-1]
cbind(beta1[1:10], beta2[1:10])
[,1] [,2]
[1,] 0.23793862 0.23793862
[2,] 1.81859695 1.81859695
[3,] -0.06000195 -0.06000195
[4,] -0.04958695 -0.04958695
[5,] 0.41870613 0.41870613
[6,] 1.30244151 1.30244151
[7,] 0.06566168 0.06566168
[8,] 0.44634038 0.44634038
[9,] 0.86477108 0.86477108
[10,] -2.47535340 -2.47535340
The results generalize to the inclusion of an intercept and standardized X variables. We modify a standardized X matrix to include a column of ones and the diagonal matrix to have an additional zero entry in the [1,1] position (i.e. do not penalize the intercept). You can then unstandardize the estimates by their respective sample standard deviations (again ensure you are using 1/n when computing standard deviation).
$$
\hat\beta_{j}=\frac{\tilde{\beta_j}}{s_{x_j}}
$$
$$
\hat\beta_{0}=\tilde{\beta_0}-\bar{x}^T\hat{\beta}
$$
mean_x <- colMeans(X)
sd_x <- sqrt(apply(X,2,var)*(n-1)/n)
X_scaled <- matrix(NA, nrow = n, ncol = p)
for(i in 1:p){
X_scaled[,i] <- (X[,i] - mean_x[i])/sd_x[i]
}
X_scaled_ones <- cbind(rep(1,n), X_scaled)
beta3 <- solve(t(X_scaled_ones)%*%X_scaled_ones+1000*diag(x = c(0, rep(1,p))),t(X_scaled_ones)%*%(Y))[,1]
beta3 <- c(beta3[1] - crossprod(mean_x,beta3[-1]/sd_x), beta3[-1]/sd_x)
fit_glmnet2 <- glmnet(X,Y, alpha=0, thresh = 1e-20)
beta4 <- as.vector(coef(fit_glmnet2, s = sd_y*1000/n, exact = TRUE))
cbind(beta3[1:10], beta4[1:10])
[,1] [,2]
[1,] 0.24534485 0.24534485
[2,] 0.17661130 0.17661130
[3,] 0.86993230 0.86993230
[4,] -0.12449217 -0.12449217
[5,] -0.06410361 -0.06410361
[6,] 0.17568987 0.17568987
[7,] 0.59773230 0.59773230
[8,] 0.06594704 0.06594704
[9,] 0.22860655 0.22860655
[10,] 0.33254206 0.33254206
Added code to show standardized X with no intercept:
set.seed(123)
n <- 1000
p <- 100
X <- matrix(rnorm(n*p,0,1),n,p)
beta <- rnorm(p,0,1)
Y <- X%*%beta+rnorm(n,0,0.5)
sd_y <- sqrt(var(Y)*(n-1)/n)[1,1]
mean_x <- colMeans(X)
sd_x <- sqrt(apply(X,2,var)*(n-1)/n)
X_scaled <- matrix(NA, nrow = n, ncol = p)
for(i in 1:p){
X_scaled[,i] <- (X[,i] - mean_x[i])/sd_x[i]
}
beta1 <- solve(t(X_scaled)%*%X_scaled+10*diag(p),t(X_scaled)%*%(Y))[,1]
fit_glmnet <- glmnet(X_scaled,Y, alpha=0, standardize = F, intercept =
FALSE, thresh = 1e-20)
beta2 <- as.vector(coef(fit_glmnet, s = sd_y*10/n, exact = TRUE))[-1]
cbind(beta1[1:10], beta2[1:10])
[,1] [,2]
[1,] 0.23560948 0.23560948
[2,] 1.83469846 1.83469846
[3,] -0.05827086 -0.05827086
[4,] -0.04927314 -0.04927314
[5,] 0.41871870 0.41871870
[6,] 1.28969361 1.28969361
[7,] 0.06552927 0.06552927
[8,] 0.44576008 0.44576008
[9,] 0.90156795 0.90156795
[10,] -2.43163420 -2.43163420
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
The difference you are observing is due to the additional division by the number of observations, N, that GLMNET uses in their objective function and implicit standardization of Y by its sample standa
|
9,304
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
|
According to https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html, when the family is gaussian, glmnet() should minimize
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda\sum_{j=1}^p(\alpha|\beta_j|
+(1-\alpha)\beta_j^2/2). \tag{1}$$
When using glmnet(x, y, alpha=1) to fit the lasso with the columns in $x$ standardized, the solution for the reported penalty $\lambda$ is the solution for minimizing
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda \sum_{j=1}^p |\beta_j|.$$
However, at least in glmnet_2.0-13, when using glmnet(x, y, alpha=0) to fit ridge regression, the solution for a reported penalty $\lambda$ is the solution for minimizing
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda \frac{1}{2s_y} \sum_{j=1}^p \beta_j^2.$$
where $s_y$ is the standard deviation of $y$. Here, the penalty should have been reported as $\lambda/s_y$.
What might happen is that the function first standardizes $y$ to $y_0$ and then minimizes
$$\frac{1}{2n} \sum_{i=1}^n (y_{0i}-x_i^T\gamma)^2
+\eta \sum_{j=1}^p(\alpha|\gamma_j|
+(1-\alpha)\gamma_j^2/2), \tag{2}$$
which effectively is to minimize
$$\frac{1}{2n s_y^2} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\eta \frac{\alpha}{s_y} \sum_{j=1}^p |\beta_j|
+\eta \frac{1-\alpha}{2s_y^2} \sum_{j=1}^p \beta_j^2,$$
or equivalently, to minimize
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\eta s_y \alpha \sum_{j=1}^p |\beta_j|
+\eta (1-\alpha) \sum_{j=1}^p \beta_j^2/2.$$
For the lasso ($\alpha=1$), scaling $\eta$ back to report the penalty as $\eta s_y$ makes sense. Then for all $\alpha$, $\eta s_y$ has to be reported as the penalty to maintain continuity of the results across $\alpha$. This probably is the cause of the problem above. This is partly due to using (2) to solve (1). Only when $\alpha=0$ or $\alpha=1$ there is some equivalence between problems (1) and (2) (i.e., a correspondence between the $\lambda$ in (1) and the $\eta$ in (2)). For any other $\alpha\in(0,1)$, problems (1) and (2) are two different optimization problems, and there is no one-to-one correspondence between the $\lambda$ in (1) and the $\eta$ in (2).
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
|
According to https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html, when the family is gaussian, glmnet() should minimize
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda\sum_{j=1}
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
According to https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html, when the family is gaussian, glmnet() should minimize
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda\sum_{j=1}^p(\alpha|\beta_j|
+(1-\alpha)\beta_j^2/2). \tag{1}$$
When using glmnet(x, y, alpha=1) to fit the lasso with the columns in $x$ standardized, the solution for the reported penalty $\lambda$ is the solution for minimizing
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda \sum_{j=1}^p |\beta_j|.$$
However, at least in glmnet_2.0-13, when using glmnet(x, y, alpha=0) to fit ridge regression, the solution for a reported penalty $\lambda$ is the solution for minimizing
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda \frac{1}{2s_y} \sum_{j=1}^p \beta_j^2.$$
where $s_y$ is the standard deviation of $y$. Here, the penalty should have been reported as $\lambda/s_y$.
What might happen is that the function first standardizes $y$ to $y_0$ and then minimizes
$$\frac{1}{2n} \sum_{i=1}^n (y_{0i}-x_i^T\gamma)^2
+\eta \sum_{j=1}^p(\alpha|\gamma_j|
+(1-\alpha)\gamma_j^2/2), \tag{2}$$
which effectively is to minimize
$$\frac{1}{2n s_y^2} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\eta \frac{\alpha}{s_y} \sum_{j=1}^p |\beta_j|
+\eta \frac{1-\alpha}{2s_y^2} \sum_{j=1}^p \beta_j^2,$$
or equivalently, to minimize
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\eta s_y \alpha \sum_{j=1}^p |\beta_j|
+\eta (1-\alpha) \sum_{j=1}^p \beta_j^2/2.$$
For the lasso ($\alpha=1$), scaling $\eta$ back to report the penalty as $\eta s_y$ makes sense. Then for all $\alpha$, $\eta s_y$ has to be reported as the penalty to maintain continuity of the results across $\alpha$. This probably is the cause of the problem above. This is partly due to using (2) to solve (1). Only when $\alpha=0$ or $\alpha=1$ there is some equivalence between problems (1) and (2) (i.e., a correspondence between the $\lambda$ in (1) and the $\eta$ in (2)). For any other $\alpha\in(0,1)$, problems (1) and (2) are two different optimization problems, and there is no one-to-one correspondence between the $\lambda$ in (1) and the $\eta$ in (2).
|
Why is glmnet ridge regression giving me a different answer than manual calculation?
According to https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html, when the family is gaussian, glmnet() should minimize
$$\frac{1}{2n} \sum_{i=1}^n (y_i-\beta_0-x_i^T\beta)^2
+\lambda\sum_{j=1}
|
9,305
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
|
AIC and c-statistic are trying to answer different questions. (Also some issues with c-statistic have been raised in recent years, but I'll come onto that as an aside)
Roughly speaking:
AIC is telling you how good your model fits for a specific mis-classification cost.
AUC is telling you how good your model would work, on average, across all mis-classification costs.
When you calculate the AIC you treat your logistic giving a prediction of say 0.9 to be a prediction of 1 (i.e. more likely 1 than 0), however it need not be. You could take your logistic score and say "anything above 0.95 is 1, everything below is 0". Why would you do this? Well this would ensure that you only predict one when you are really really confident. Your false positive rate will be really really low, but your false negative will skyrocket. In some situations this isn't a bad thing - if you are going to accuse someone of fraud, you probably want to be really really sure first. Also, if it is very expensive to follow up the positive results, then you don't want too many of them.
This is why it relates to costs. There is a cost when you classify a 1 as a 0 and a cost when you classify a 0 as a 1. Typically (assuming you used a default setup) the AIC for logistic regression refers to the special case when both mis-classifications are equally costly. That is, logistic regression gives you the best overall number of correct predictions, without any preference for positive or negative.
The ROC curve is used because this plots the true positive against the false positive in order to show how the classifier would perform if you used it under different cost requirements. The c-statistic comes about because any ROC curve that lies strictly above another is clearly a dominating classifier. It is therefore intuitive to measure the area under the curve as a measure of how good the classifier overall.
So basically, if you know your costs when fitting the model, use AIC (or similar). If you are just constructing a score, but not specifying the diagnostic threshold, then AUC approaches are needed (with the following caveat about AUC itself).
So what is wrong with c-statistic/AUC/Gini?
For many years AUC was the standard approach, and is still widely used, however there are a number of problems with it. One thing that made it particularly appealing was that it corresponds to a Wilcox test on the ranks of the classifications. That is it measured the probability that the score of a randomly picked member of one class will be higher than a randomly picked member of the other class. The problem is, that is almost never a useful metric.
The most critical problems with AUC were publicized by David Hand a few years back. (See references below) The crux of the problem is that while AUC does average over all costs, because the x-axis of the ROC curve is False Positive Rate, the weight that it assigns to the different cost regimes varies between classifiers. So if you calculate the AUC on two different logitic regressions it won't be measuring "the same thing" in both cases. This means it makes little sense to compare models based on AUC.
Hand proposed an alternative calculation using a fixed cost weighting, and called this the H-measure - there is a package in R called hmeasure that will perform this calculation, and I believe AUC for comparison.
Some references on the problems with AUC:
When is the area under the receiver operating characteristic curve an appropriate measure of classifier performance? D.J. Hand, C.
Anagnostopoulos Pattern Recognition Letters 34 (2013) 492–495
(I found this to be a particularly accessible and useful explanation)
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
|
AIC and c-statistic are trying to answer different questions. (Also some issues with c-statistic have been raised in recent years, but I'll come onto that as an aside)
Roughly speaking:
AIC is telli
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
AIC and c-statistic are trying to answer different questions. (Also some issues with c-statistic have been raised in recent years, but I'll come onto that as an aside)
Roughly speaking:
AIC is telling you how good your model fits for a specific mis-classification cost.
AUC is telling you how good your model would work, on average, across all mis-classification costs.
When you calculate the AIC you treat your logistic giving a prediction of say 0.9 to be a prediction of 1 (i.e. more likely 1 than 0), however it need not be. You could take your logistic score and say "anything above 0.95 is 1, everything below is 0". Why would you do this? Well this would ensure that you only predict one when you are really really confident. Your false positive rate will be really really low, but your false negative will skyrocket. In some situations this isn't a bad thing - if you are going to accuse someone of fraud, you probably want to be really really sure first. Also, if it is very expensive to follow up the positive results, then you don't want too many of them.
This is why it relates to costs. There is a cost when you classify a 1 as a 0 and a cost when you classify a 0 as a 1. Typically (assuming you used a default setup) the AIC for logistic regression refers to the special case when both mis-classifications are equally costly. That is, logistic regression gives you the best overall number of correct predictions, without any preference for positive or negative.
The ROC curve is used because this plots the true positive against the false positive in order to show how the classifier would perform if you used it under different cost requirements. The c-statistic comes about because any ROC curve that lies strictly above another is clearly a dominating classifier. It is therefore intuitive to measure the area under the curve as a measure of how good the classifier overall.
So basically, if you know your costs when fitting the model, use AIC (or similar). If you are just constructing a score, but not specifying the diagnostic threshold, then AUC approaches are needed (with the following caveat about AUC itself).
So what is wrong with c-statistic/AUC/Gini?
For many years AUC was the standard approach, and is still widely used, however there are a number of problems with it. One thing that made it particularly appealing was that it corresponds to a Wilcox test on the ranks of the classifications. That is it measured the probability that the score of a randomly picked member of one class will be higher than a randomly picked member of the other class. The problem is, that is almost never a useful metric.
The most critical problems with AUC were publicized by David Hand a few years back. (See references below) The crux of the problem is that while AUC does average over all costs, because the x-axis of the ROC curve is False Positive Rate, the weight that it assigns to the different cost regimes varies between classifiers. So if you calculate the AUC on two different logitic regressions it won't be measuring "the same thing" in both cases. This means it makes little sense to compare models based on AUC.
Hand proposed an alternative calculation using a fixed cost weighting, and called this the H-measure - there is a package in R called hmeasure that will perform this calculation, and I believe AUC for comparison.
Some references on the problems with AUC:
When is the area under the receiver operating characteristic curve an appropriate measure of classifier performance? D.J. Hand, C.
Anagnostopoulos Pattern Recognition Letters 34 (2013) 492–495
(I found this to be a particularly accessible and useful explanation)
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
AIC and c-statistic are trying to answer different questions. (Also some issues with c-statistic have been raised in recent years, but I'll come onto that as an aside)
Roughly speaking:
AIC is telli
|
9,306
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
|
The Hand paper cited has no basis in real world use in clinical diagnostics. He has a theoretical curve with a 0.5 AUC, which is instead a perfect classifier. He uses a single set of real-world data, where the models would be thrown away out of hand, as they are so bad, and when accounting for the confidence intervals around the measurements (data not provided but inferred) are likely to be random. Given the lack of real-world (or even plausible simulation) data, this is a hollow paper. I personally have been involved in analysis of thousands of classifiers among thousand of patients (with sufficient degrees of freedom). In that context, his arguments are non-sensical.
He also is prone to superlatives (not a good sign in any context), and makes unsupported generalizations, e.g., the costs cannot be known. In medicine, there are costs that are accepted, such as 10% positive predictive value for screening tests, and $100,000 per quality adjusted life year for therapeutic interventions. I find it hard to believe that in credit scoring, costs are not well understood going in. If he is saying (unclearly) that different individual false positives and false negatives carry different costs, while that is a very interesting topic, it does not resemble binary classifiers.
If his point is that ROC shape matters, then for sophisticated users, that's obvious, and unsophisticated users have a whole lot more to worry about, e.g., incorporating prevalence into positive and negative predictive values.
Finally, I am at a loss to understand how different classifiers cannot be judged based on the various, real-world cut-offs determined by the clinical (or financial) use of the models. Obviously, different cut-offs would be chosen for each model. The models would not be compared based only on AUCs. The classifiers don't matter, but the shape of the curve does.
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
|
The Hand paper cited has no basis in real world use in clinical diagnostics. He has a theoretical curve with a 0.5 AUC, which is instead a perfect classifier. He uses a single set of real-world data,
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
The Hand paper cited has no basis in real world use in clinical diagnostics. He has a theoretical curve with a 0.5 AUC, which is instead a perfect classifier. He uses a single set of real-world data, where the models would be thrown away out of hand, as they are so bad, and when accounting for the confidence intervals around the measurements (data not provided but inferred) are likely to be random. Given the lack of real-world (or even plausible simulation) data, this is a hollow paper. I personally have been involved in analysis of thousands of classifiers among thousand of patients (with sufficient degrees of freedom). In that context, his arguments are non-sensical.
He also is prone to superlatives (not a good sign in any context), and makes unsupported generalizations, e.g., the costs cannot be known. In medicine, there are costs that are accepted, such as 10% positive predictive value for screening tests, and $100,000 per quality adjusted life year for therapeutic interventions. I find it hard to believe that in credit scoring, costs are not well understood going in. If he is saying (unclearly) that different individual false positives and false negatives carry different costs, while that is a very interesting topic, it does not resemble binary classifiers.
If his point is that ROC shape matters, then for sophisticated users, that's obvious, and unsophisticated users have a whole lot more to worry about, e.g., incorporating prevalence into positive and negative predictive values.
Finally, I am at a loss to understand how different classifiers cannot be judged based on the various, real-world cut-offs determined by the clinical (or financial) use of the models. Obviously, different cut-offs would be chosen for each model. The models would not be compared based only on AUCs. The classifiers don't matter, but the shape of the curve does.
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
The Hand paper cited has no basis in real world use in clinical diagnostics. He has a theoretical curve with a 0.5 AUC, which is instead a perfect classifier. He uses a single set of real-world data,
|
9,307
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
|
For me, the bottom line is that while the C-statistic (AUC) may be problematic when comparing models with different independent variables (analogous to what Hand refers to as "classifiers"), it is still useful in other applications. For instance, validation studies where the same model is compared across different study populations (data sets). If a model or risk index/score is shown to be highly discriminant in one population, but not in others, this could mean indicate that it is not a very good tool in general, but may be in specific instances.
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
|
For me, the bottom line is that while the C-statistic (AUC) may be problematic when comparing models with different independent variables (analogous to what Hand refers to as "classifiers"), it is sti
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
For me, the bottom line is that while the C-statistic (AUC) may be problematic when comparing models with different independent variables (analogous to what Hand refers to as "classifiers"), it is still useful in other applications. For instance, validation studies where the same model is compared across different study populations (data sets). If a model or risk index/score is shown to be highly discriminant in one population, but not in others, this could mean indicate that it is not a very good tool in general, but may be in specific instances.
|
What is the difference in what AIC and c-statistic (AUC) actually measure for model fit?
For me, the bottom line is that while the C-statistic (AUC) may be problematic when comparing models with different independent variables (analogous to what Hand refers to as "classifiers"), it is sti
|
9,308
|
Supervised clustering or classification?
|
My naive understanding is that classification is performed where you have a specified set of classes and you want to classify a new thing/dataset into one of those specified classes.
Alternatively, clustering has nothing to start with and you use all the data (including the new one) to separate into clusters.
Both use distance metrics to decide how to cluster/classify. The difference is that classification is based off a previously defined set of classes whereas clustering decides the clusters based on the entire data.
Again my naive understand is that supervised clustering still clusters based on the entire data and thus would be clustering rather than classification.
In reality i'm sure the theory behind both clustering and classification are inter-twinned.
|
Supervised clustering or classification?
|
My naive understanding is that classification is performed where you have a specified set of classes and you want to classify a new thing/dataset into one of those specified classes.
Alternatively, cl
|
Supervised clustering or classification?
My naive understanding is that classification is performed where you have a specified set of classes and you want to classify a new thing/dataset into one of those specified classes.
Alternatively, clustering has nothing to start with and you use all the data (including the new one) to separate into clusters.
Both use distance metrics to decide how to cluster/classify. The difference is that classification is based off a previously defined set of classes whereas clustering decides the clusters based on the entire data.
Again my naive understand is that supervised clustering still clusters based on the entire data and thus would be clustering rather than classification.
In reality i'm sure the theory behind both clustering and classification are inter-twinned.
|
Supervised clustering or classification?
My naive understanding is that classification is performed where you have a specified set of classes and you want to classify a new thing/dataset into one of those specified classes.
Alternatively, cl
|
9,309
|
Supervised clustering or classification?
|
I don't think I know more than you do, but the links you posted do suggest answers. I'll take http://www.cs.cornell.edu/~tomf/publications/supervised_kmeans-08.pdf as an example. Basically they state: 1) clustering depends on a distance. 2) successful use of k-means requires a carefully chosen distance. 3) Given training data in the form of sets of items with their desired partitioning, we provide a structural SVM method that learns a distance measure so that k-means produces the desired clusterings. In this case there is a supervised stage to the clustering, with both training data and learning. The purpose of this stage is to learn a distance function so that applying k-means clustering with this distance will be hopefully optimal, depending on how well the training data resembles the application domain. All the usual caveats appropriate to machine learning and clustering still apply.
Further quoting from the article: Supervised clustering is the task of automatically adapting a clustering algorithm with the aid of a training set consisting of item sets and complete partitionings of these item sets.. That seems a reasonable definition.
|
Supervised clustering or classification?
|
I don't think I know more than you do, but the links you posted do suggest answers. I'll take http://www.cs.cornell.edu/~tomf/publications/supervised_kmeans-08.pdf as an example. Basically they state:
|
Supervised clustering or classification?
I don't think I know more than you do, but the links you posted do suggest answers. I'll take http://www.cs.cornell.edu/~tomf/publications/supervised_kmeans-08.pdf as an example. Basically they state: 1) clustering depends on a distance. 2) successful use of k-means requires a carefully chosen distance. 3) Given training data in the form of sets of items with their desired partitioning, we provide a structural SVM method that learns a distance measure so that k-means produces the desired clusterings. In this case there is a supervised stage to the clustering, with both training data and learning. The purpose of this stage is to learn a distance function so that applying k-means clustering with this distance will be hopefully optimal, depending on how well the training data resembles the application domain. All the usual caveats appropriate to machine learning and clustering still apply.
Further quoting from the article: Supervised clustering is the task of automatically adapting a clustering algorithm with the aid of a training set consisting of item sets and complete partitionings of these item sets.. That seems a reasonable definition.
|
Supervised clustering or classification?
I don't think I know more than you do, but the links you posted do suggest answers. I'll take http://www.cs.cornell.edu/~tomf/publications/supervised_kmeans-08.pdf as an example. Basically they state:
|
9,310
|
Supervised clustering or classification?
|
Some definitions:
Supervised clustering is applied on classified examples with the objective of identifying clusters that have high probability density to a single class.
Unsupervised clustering is a learning framework using a specific object functions, for example a function that minimizes the distances inside a cluster to keep the cluster tight.
Semi-supervised clustering is to enhance a clustering algorithm by using side information in clustering process.
Advances in Neural Networks -- ISNN 2010
Without using too much jargon since I'm a novice in this area, the way I understand the supervised clustering is more the less like this:
In supervised clustering you start from the Top-Down with some predefined classes and then using a Bottom-Up approach you find which objects fit better into your classes.
For example, you performed an study regarding the favorite type of oranges in a population.
From the many types of oranges you found that a particular 'kind' of oranges is the preferred one.
However, that type of orange is very delicate and labile to infections, climate change and other environmental agents.
So you want to cross it over with other species that is very resistant to those insults.
Then you go to the lab and found some genes that are responsible for the juicy and sweet taste of one type, and for the resistant capabilities of the other type.
You perform several experiments and you end with let's say hundred different subtypes of oranges.
Now you are interested just in those subtypes that fit perfectly the properties described.
You don't want to perform the same study in your population again...
You know the properties you are looking for in your perfect orange.
So you run your cluster analysis and select the ones that fit best your expectations.
|
Supervised clustering or classification?
|
Some definitions:
Supervised clustering is applied on classified examples with the objective of identifying clusters that have high probability density to a single class.
Unsupervised clustering is a
|
Supervised clustering or classification?
Some definitions:
Supervised clustering is applied on classified examples with the objective of identifying clusters that have high probability density to a single class.
Unsupervised clustering is a learning framework using a specific object functions, for example a function that minimizes the distances inside a cluster to keep the cluster tight.
Semi-supervised clustering is to enhance a clustering algorithm by using side information in clustering process.
Advances in Neural Networks -- ISNN 2010
Without using too much jargon since I'm a novice in this area, the way I understand the supervised clustering is more the less like this:
In supervised clustering you start from the Top-Down with some predefined classes and then using a Bottom-Up approach you find which objects fit better into your classes.
For example, you performed an study regarding the favorite type of oranges in a population.
From the many types of oranges you found that a particular 'kind' of oranges is the preferred one.
However, that type of orange is very delicate and labile to infections, climate change and other environmental agents.
So you want to cross it over with other species that is very resistant to those insults.
Then you go to the lab and found some genes that are responsible for the juicy and sweet taste of one type, and for the resistant capabilities of the other type.
You perform several experiments and you end with let's say hundred different subtypes of oranges.
Now you are interested just in those subtypes that fit perfectly the properties described.
You don't want to perform the same study in your population again...
You know the properties you are looking for in your perfect orange.
So you run your cluster analysis and select the ones that fit best your expectations.
|
Supervised clustering or classification?
Some definitions:
Supervised clustering is applied on classified examples with the objective of identifying clusters that have high probability density to a single class.
Unsupervised clustering is a
|
9,311
|
Supervised clustering or classification?
|
My interpretation has to do with the number of training samples you have per class.
If you have a lot of training samples per class, then you can reasonably train a classifier and you have a classification use case.
If you only have training samples for a fraction of the classes then a classifier would have poor performance, but a clusterer could be useful. You can optimize this clusterer with the labels you have (optimize the distance, features etc...) and hopefully this optimization will be useful on unlabelled data. You have a (semi) supervised clustering use case.
|
Supervised clustering or classification?
|
My interpretation has to do with the number of training samples you have per class.
If you have a lot of training samples per class, then you can reasonably train a classifier and you have a classific
|
Supervised clustering or classification?
My interpretation has to do with the number of training samples you have per class.
If you have a lot of training samples per class, then you can reasonably train a classifier and you have a classification use case.
If you only have training samples for a fraction of the classes then a classifier would have poor performance, but a clusterer could be useful. You can optimize this clusterer with the labels you have (optimize the distance, features etc...) and hopefully this optimization will be useful on unlabelled data. You have a (semi) supervised clustering use case.
|
Supervised clustering or classification?
My interpretation has to do with the number of training samples you have per class.
If you have a lot of training samples per class, then you can reasonably train a classifier and you have a classific
|
9,312
|
Computation of the marginal likelihood from MCMC samples
|
The extension by Chib and Jeliazkov (2001) unfortunately gets quickly costly or highly variable, which is a reason why it is not much used outside Gibbs sampling cases.
While there are many ways and approaches to the normalisation constant $\mathfrak{Z}$ estimation problem (as illustrated by the quite diverse talks in the Estimating Constant workshop we ran last week at the University of Warwick, slides available there), some solutions do exploit directly the MCMC output.
As you mentioned, the harmonic mean estimator of Newton and Raftery (1994) is almost invariably poor for having an infinite variance. However, there are ways to avoid the infinite variance curse by using instead a finite support target in the harmonic mean identity
$$\int \dfrac{\alpha(\theta)}{\pi(\theta)f(x|\theta)}\text{d}\pi(\theta|x)=\frac{1}{\mathfrak{Z}}$$
by picking $\alpha$ as the indicator of an HPD region for the posterior. This ensures finite variance by removing the tails in the harmonic mean. (Details are to be found in a paper I wrote with Darren Wraith and in a chapter about normalising constants written with Jean-Michel Marin.) In short, the method recycles the MCMC output $\theta_1,\ldots,\theta_M$ by identifying the $\beta$ (20% say) largest values of the target $\pi(\theta)f(x|\theta)$ and creating $\alpha$ as a uniform over the union of the balls centred at those largest density (HPD) simulations $\theta^0_i$ and with radius $\rho$, meaning the estimate of the normalising constant $\mathfrak{Z}$ is given by
$$\hat{\mathfrak{Z}}^{-1}=\underbrace{\frac{1}{\beta M^2}\sum_{m=1}^M}_{\text{double sum over}\\\beta M\text{ ball centres }\theta_i^0\\\text{and $M$ simulations } \theta_m}
\underbrace{\mathbb{I}_{(0,\rho)}(\min_i||\theta_m-\theta^0_i||)\{\pi(\theta_m)f(x|\theta_m)\}^{-1}\big/\overbrace{\pi^{d/2}\rho^d\Gamma(d/2+1)^{-1}}^{\text{volume of ball with radius $\rho$}}}_{\dfrac{\beta M\alpha(\theta_m)}{\pi(\theta_m)f(x|\theta_m)}}$$
if $d$ is the dimension of $\theta$ (corrections apply for intersecting balls) and if $\rho$ is small enough for the balls to never intersect (meaning that at best only one indicator on the balls is different from zero). The explanation for the $\alpha M^2$ denominator is that this is a double sum of $\beta M^2$ terms:
$$
\frac{1}{\beta M}\sum_{i=1}^{\beta M} \underbrace{\frac{1}{M}\sum_{m=1}^M {\cal U}(\theta_i^0,\rho)(\theta_m)}_{\text{same as with $\min$}} \times \frac{1}{\pi(\theta_m)f(x|\theta_m)}
$$
with each term in $\theta_m$ integrating to ${\mathfrak{Z}}^{-1}$.
Another approach is to turn the normalising constant $\mathfrak{Z}$ into a parameter. This sounds like a statistical heresy but the paper by Guttmann and Hyvärinen (2012) convinced me of the opposite.
Without getting too much into details, the neat idea therein is to turn the observed log-likelihood
$$
\sum_{i=1}^n f(x_i|\theta) - n \log \int \exp f(x|\theta) \text{d}x
$$
into a joint log-likelihood
$$
\sum_{i=1}^n[f(x_i|\theta)+\nu]-n\int\exp[f(x|\theta)+\nu]\text{d}x
$$
which is the log-likelihood of a Poisson point process with intensity function
$$
\exp\{ f(x|\theta) + \nu +\log n\}
$$
This is an alternative model in that the original likelihood does not appear as a marginal of the above. Only the modes coincide, with the conditional mode in ν providing the normalising constant. In practice, the above Poisson process likelihood is unavailable and Guttmann and Hyvärinen (2012) offer an approximation by means of a logistic regression. To connect even better with your question, Geyer's estimate is a MLE, hence solution to a maximisation problem.
A connected approach is Charlie Geyer's logistic regression approach. The fundamental notion is to add to the MCMC sample from $\pi(\theta|x)$ another sample from a known target, e.g., your best guess at $\pi(\theta|x)$, $g(\theta)$, and to run logistic regression on the index of the distribution behind the data (1 for $\pi(\theta|x)$ and 0 for $g(\theta)$). With the regressors being the values of both densities, normalised or not. This happens to be directly linked with Gelman and Meng (1997) bridge sampling, which also recycles samples from different targets. And later versions, like Meng's MLE.
A different approach that forces one to run a specific MCMC sampler is Skilling's nested sampling. While I [and others] have some reservations on the efficiency of the method, it is quite popular in astrostatistics and cosmology, with software available like MultiNest, PolyChord and UltraNest.
A last [potential if not always possible] solution is to exploit the Savage-Dickey representation of the Bayes factor in the case of an embedded null hypothesis. If the null writes as $H_0: \theta=\theta_0$ about a parameter of interest and if $\xi$ is the remaining [nuisance] part of the parameter of the model, assuming a prior of the form $\pi_1(\theta)\pi_2(\xi)$, the Bayes factor of $H_0$ against the alternative writes as
$$\mathfrak{B}_{01}(x)=\dfrac{\pi^\theta(\theta_0|x)}{\pi_1(\theta_0)}$$
where $\pi^\theta(\theta_0|x)$ denotes the marginal posterior density of $\theta$ at the specific value $\theta_0$. In case the marginal density under the null $H_0: \theta=\theta_0$
$$m_0(x)=\int_\Xi f(x|\theta_0,\xi)\pi_2(\xi)\text{d}\xi$$
is available in closed form, one can derive the marginal density for the unconstrained model
$$m_a(x)=\int_{\Theta\times\Xi} f(x|\theta,\xi)\pi_1(\theta)\pi_2(\xi)\text{d}\theta\text{d}\xi$$
from the Bayes factor. (This Savage-Dickey representation relies on specific versions of three different densities and so is fraught with danger, not even mentioning the computational challenge of producing the marginal posterior.)
[Here is a set of slides I wrote about estimating normalising
constants for a NIPS workshop last December.]
|
Computation of the marginal likelihood from MCMC samples
|
The extension by Chib and Jeliazkov (2001) unfortunately gets quickly costly or highly variable, which is a reason why it is not much used outside Gibbs sampling cases.
While there are many ways and a
|
Computation of the marginal likelihood from MCMC samples
The extension by Chib and Jeliazkov (2001) unfortunately gets quickly costly or highly variable, which is a reason why it is not much used outside Gibbs sampling cases.
While there are many ways and approaches to the normalisation constant $\mathfrak{Z}$ estimation problem (as illustrated by the quite diverse talks in the Estimating Constant workshop we ran last week at the University of Warwick, slides available there), some solutions do exploit directly the MCMC output.
As you mentioned, the harmonic mean estimator of Newton and Raftery (1994) is almost invariably poor for having an infinite variance. However, there are ways to avoid the infinite variance curse by using instead a finite support target in the harmonic mean identity
$$\int \dfrac{\alpha(\theta)}{\pi(\theta)f(x|\theta)}\text{d}\pi(\theta|x)=\frac{1}{\mathfrak{Z}}$$
by picking $\alpha$ as the indicator of an HPD region for the posterior. This ensures finite variance by removing the tails in the harmonic mean. (Details are to be found in a paper I wrote with Darren Wraith and in a chapter about normalising constants written with Jean-Michel Marin.) In short, the method recycles the MCMC output $\theta_1,\ldots,\theta_M$ by identifying the $\beta$ (20% say) largest values of the target $\pi(\theta)f(x|\theta)$ and creating $\alpha$ as a uniform over the union of the balls centred at those largest density (HPD) simulations $\theta^0_i$ and with radius $\rho$, meaning the estimate of the normalising constant $\mathfrak{Z}$ is given by
$$\hat{\mathfrak{Z}}^{-1}=\underbrace{\frac{1}{\beta M^2}\sum_{m=1}^M}_{\text{double sum over}\\\beta M\text{ ball centres }\theta_i^0\\\text{and $M$ simulations } \theta_m}
\underbrace{\mathbb{I}_{(0,\rho)}(\min_i||\theta_m-\theta^0_i||)\{\pi(\theta_m)f(x|\theta_m)\}^{-1}\big/\overbrace{\pi^{d/2}\rho^d\Gamma(d/2+1)^{-1}}^{\text{volume of ball with radius $\rho$}}}_{\dfrac{\beta M\alpha(\theta_m)}{\pi(\theta_m)f(x|\theta_m)}}$$
if $d$ is the dimension of $\theta$ (corrections apply for intersecting balls) and if $\rho$ is small enough for the balls to never intersect (meaning that at best only one indicator on the balls is different from zero). The explanation for the $\alpha M^2$ denominator is that this is a double sum of $\beta M^2$ terms:
$$
\frac{1}{\beta M}\sum_{i=1}^{\beta M} \underbrace{\frac{1}{M}\sum_{m=1}^M {\cal U}(\theta_i^0,\rho)(\theta_m)}_{\text{same as with $\min$}} \times \frac{1}{\pi(\theta_m)f(x|\theta_m)}
$$
with each term in $\theta_m$ integrating to ${\mathfrak{Z}}^{-1}$.
Another approach is to turn the normalising constant $\mathfrak{Z}$ into a parameter. This sounds like a statistical heresy but the paper by Guttmann and Hyvärinen (2012) convinced me of the opposite.
Without getting too much into details, the neat idea therein is to turn the observed log-likelihood
$$
\sum_{i=1}^n f(x_i|\theta) - n \log \int \exp f(x|\theta) \text{d}x
$$
into a joint log-likelihood
$$
\sum_{i=1}^n[f(x_i|\theta)+\nu]-n\int\exp[f(x|\theta)+\nu]\text{d}x
$$
which is the log-likelihood of a Poisson point process with intensity function
$$
\exp\{ f(x|\theta) + \nu +\log n\}
$$
This is an alternative model in that the original likelihood does not appear as a marginal of the above. Only the modes coincide, with the conditional mode in ν providing the normalising constant. In practice, the above Poisson process likelihood is unavailable and Guttmann and Hyvärinen (2012) offer an approximation by means of a logistic regression. To connect even better with your question, Geyer's estimate is a MLE, hence solution to a maximisation problem.
A connected approach is Charlie Geyer's logistic regression approach. The fundamental notion is to add to the MCMC sample from $\pi(\theta|x)$ another sample from a known target, e.g., your best guess at $\pi(\theta|x)$, $g(\theta)$, and to run logistic regression on the index of the distribution behind the data (1 for $\pi(\theta|x)$ and 0 for $g(\theta)$). With the regressors being the values of both densities, normalised or not. This happens to be directly linked with Gelman and Meng (1997) bridge sampling, which also recycles samples from different targets. And later versions, like Meng's MLE.
A different approach that forces one to run a specific MCMC sampler is Skilling's nested sampling. While I [and others] have some reservations on the efficiency of the method, it is quite popular in astrostatistics and cosmology, with software available like MultiNest, PolyChord and UltraNest.
A last [potential if not always possible] solution is to exploit the Savage-Dickey representation of the Bayes factor in the case of an embedded null hypothesis. If the null writes as $H_0: \theta=\theta_0$ about a parameter of interest and if $\xi$ is the remaining [nuisance] part of the parameter of the model, assuming a prior of the form $\pi_1(\theta)\pi_2(\xi)$, the Bayes factor of $H_0$ against the alternative writes as
$$\mathfrak{B}_{01}(x)=\dfrac{\pi^\theta(\theta_0|x)}{\pi_1(\theta_0)}$$
where $\pi^\theta(\theta_0|x)$ denotes the marginal posterior density of $\theta$ at the specific value $\theta_0$. In case the marginal density under the null $H_0: \theta=\theta_0$
$$m_0(x)=\int_\Xi f(x|\theta_0,\xi)\pi_2(\xi)\text{d}\xi$$
is available in closed form, one can derive the marginal density for the unconstrained model
$$m_a(x)=\int_{\Theta\times\Xi} f(x|\theta,\xi)\pi_1(\theta)\pi_2(\xi)\text{d}\theta\text{d}\xi$$
from the Bayes factor. (This Savage-Dickey representation relies on specific versions of three different densities and so is fraught with danger, not even mentioning the computational challenge of producing the marginal posterior.)
[Here is a set of slides I wrote about estimating normalising
constants for a NIPS workshop last December.]
|
Computation of the marginal likelihood from MCMC samples
The extension by Chib and Jeliazkov (2001) unfortunately gets quickly costly or highly variable, which is a reason why it is not much used outside Gibbs sampling cases.
While there are many ways and a
|
9,313
|
Confidence interval of RMSE
|
I might be able to give an answer to your question under certain conditions.
Let $x_{i}$ be your true value for the $i^{th}$ data point and $\hat{x}_{i}$ the estimated value. If we assume that the differences between the estimated and true values have
mean zero (i.e. the $\hat{x}_{i}$ are distributed around $x_{i}$)
follow a Normal distribution
and all have the same standard deviation $\sigma$
in short:
$$\hat{x}_{i}-x_{i} \sim \mathcal{N}\left(0,\sigma^{2}\right),$$
then you really want a confidence interval for $\sigma$.
If the above assumptions hold true $$\frac{n\mbox{RMSE}^{2}}{\sigma^{2}} = \frac{n\frac{1}{n}\sum_{i}\left(\hat{x_{i}}-x_{i}\right)^{2}}{\sigma^{2}}$$
follows a $\chi_{n}^{2}$ distribution with $n$ (not $n-1$) degrees of freedom.
This means
\begin{align}
P\left(\chi_{\frac{\alpha}{2},n}^{2}\le\frac{n\mbox{RMSE}^{2}}{\sigma^{2}}\le\chi_{1-\frac{\alpha}{2},n}^{2}\right) = 1-\alpha\\
\Leftrightarrow P\left(\frac{n\mbox{RMSE}^{2}}{\chi_{1-\frac{\alpha}{2},n}^{2}}\le\sigma^{2}\le\frac{n\mbox{RMSE}^{2}}{\chi_{\frac{\alpha}{2},n}^{2}}\right) = 1-\alpha\\
\Leftrightarrow P\left(\sqrt{\frac{n}{\chi_{1-\frac{\alpha}{2},n}^{2}}}\mbox{RMSE}\le\sigma\le\sqrt{\frac{n}{\chi_{\frac{\alpha}{2},n}^{2}}}\mbox{RMSE}\right) = 1-\alpha.
\end{align}
Therefore, $$\left[\sqrt{\frac{n}{\chi_{1-\frac{\alpha}{2},n}^{2}}}\mbox{RMSE},\sqrt{\frac{n}{\chi_{\frac{\alpha}{2},n}^{2}}}\mbox{RMSE}\right]$$
is your confidence interval.
Here is a python program that simulates your situation
from scipy import stats
from numpy import *
s = 3
n=10
c1,c2 = stats.chi2.ppf([0.025,1-0.025],n)
y = zeros(50000)
for i in range(len(y)):
y[i] =sqrt( mean((random.randn(n)*s)**2))
print "1-alpha=%.2f" % (mean( (sqrt(n/c2)*y < s) & (sqrt(n/c1)*y > s)),)
Hope that helps.
If you are not sure whether the assumptions apply or if you want to compare what I wrote to a different method, you could always try bootstrapping.
|
Confidence interval of RMSE
|
I might be able to give an answer to your question under certain conditions.
Let $x_{i}$ be your true value for the $i^{th}$ data point and $\hat{x}_{i}$ the estimated value. If we assume that the dif
|
Confidence interval of RMSE
I might be able to give an answer to your question under certain conditions.
Let $x_{i}$ be your true value for the $i^{th}$ data point and $\hat{x}_{i}$ the estimated value. If we assume that the differences between the estimated and true values have
mean zero (i.e. the $\hat{x}_{i}$ are distributed around $x_{i}$)
follow a Normal distribution
and all have the same standard deviation $\sigma$
in short:
$$\hat{x}_{i}-x_{i} \sim \mathcal{N}\left(0,\sigma^{2}\right),$$
then you really want a confidence interval for $\sigma$.
If the above assumptions hold true $$\frac{n\mbox{RMSE}^{2}}{\sigma^{2}} = \frac{n\frac{1}{n}\sum_{i}\left(\hat{x_{i}}-x_{i}\right)^{2}}{\sigma^{2}}$$
follows a $\chi_{n}^{2}$ distribution with $n$ (not $n-1$) degrees of freedom.
This means
\begin{align}
P\left(\chi_{\frac{\alpha}{2},n}^{2}\le\frac{n\mbox{RMSE}^{2}}{\sigma^{2}}\le\chi_{1-\frac{\alpha}{2},n}^{2}\right) = 1-\alpha\\
\Leftrightarrow P\left(\frac{n\mbox{RMSE}^{2}}{\chi_{1-\frac{\alpha}{2},n}^{2}}\le\sigma^{2}\le\frac{n\mbox{RMSE}^{2}}{\chi_{\frac{\alpha}{2},n}^{2}}\right) = 1-\alpha\\
\Leftrightarrow P\left(\sqrt{\frac{n}{\chi_{1-\frac{\alpha}{2},n}^{2}}}\mbox{RMSE}\le\sigma\le\sqrt{\frac{n}{\chi_{\frac{\alpha}{2},n}^{2}}}\mbox{RMSE}\right) = 1-\alpha.
\end{align}
Therefore, $$\left[\sqrt{\frac{n}{\chi_{1-\frac{\alpha}{2},n}^{2}}}\mbox{RMSE},\sqrt{\frac{n}{\chi_{\frac{\alpha}{2},n}^{2}}}\mbox{RMSE}\right]$$
is your confidence interval.
Here is a python program that simulates your situation
from scipy import stats
from numpy import *
s = 3
n=10
c1,c2 = stats.chi2.ppf([0.025,1-0.025],n)
y = zeros(50000)
for i in range(len(y)):
y[i] =sqrt( mean((random.randn(n)*s)**2))
print "1-alpha=%.2f" % (mean( (sqrt(n/c2)*y < s) & (sqrt(n/c1)*y > s)),)
Hope that helps.
If you are not sure whether the assumptions apply or if you want to compare what I wrote to a different method, you could always try bootstrapping.
|
Confidence interval of RMSE
I might be able to give an answer to your question under certain conditions.
Let $x_{i}$ be your true value for the $i^{th}$ data point and $\hat{x}_{i}$ the estimated value. If we assume that the dif
|
9,314
|
Confidence interval of RMSE
|
The reasoning in the answer by fabee seems correct if applied to the STDE (standard deviation of the error), not the RMSE.
Using similar nomenclature, $i=1,\,\ldots,\,n$ is an index representing each record of data, $x_i$ is the true value and $\hat{x}_i$ is a measurement or prediction.
The error $\epsilon_i$, BIAS, MSE (mean squared error) and RMSE are given by:
$$
\epsilon_i = \hat{x}_i-x_i\,,\\
\text{BIAS} = \overline{\epsilon} = \frac{1}{n}\sum_{i=1}^{n}\epsilon_i\,,\\
\text{MSE} = \overline{\epsilon^2} = \frac{1}{n}\sum_{i=1}^{n}\epsilon_i^2\,,\\
\text{RMSE} = \sqrt{\text{MSE}}\,.
$$
Agreeing on these definitions, the BIAS corresponds to the sample mean of $\epsilon$, but MSE is not the biased sample variance. Instead:
$$
\text{STDE}^2 = \overline{(\epsilon-\overline{\epsilon})^2} = \frac{1}{n}\sum_{i=1}^{n}(\epsilon_i-\overline{\epsilon})^2\,,
$$
or, if both BIAS and RMSE were computed,
$$
\text{STDE}^2 = \overline{(\epsilon-\overline{\epsilon})^2}=\overline{\epsilon^2}-\overline{\epsilon}^2 = \text{RMSE}^2 - \text{BIAS}^2\,.
$$
Note that the biased sample variance is being used instead of the unbiased, to keep consistency with the previous definitions given for the MSE and RMSE.
Thus, in my opinion the confidence intervals established by fabee refer to the sample standard deviation of $\epsilon$, STDE. Similarly, confidence intervals may be established for the BIAS based on the z-score (or t-score if $n<30$) and $\left.\text{STDE}\middle/\sqrt{n}\right.$.
|
Confidence interval of RMSE
|
The reasoning in the answer by fabee seems correct if applied to the STDE (standard deviation of the error), not the RMSE.
Using similar nomenclature, $i=1,\,\ldots,\,n$ is an index representing each
|
Confidence interval of RMSE
The reasoning in the answer by fabee seems correct if applied to the STDE (standard deviation of the error), not the RMSE.
Using similar nomenclature, $i=1,\,\ldots,\,n$ is an index representing each record of data, $x_i$ is the true value and $\hat{x}_i$ is a measurement or prediction.
The error $\epsilon_i$, BIAS, MSE (mean squared error) and RMSE are given by:
$$
\epsilon_i = \hat{x}_i-x_i\,,\\
\text{BIAS} = \overline{\epsilon} = \frac{1}{n}\sum_{i=1}^{n}\epsilon_i\,,\\
\text{MSE} = \overline{\epsilon^2} = \frac{1}{n}\sum_{i=1}^{n}\epsilon_i^2\,,\\
\text{RMSE} = \sqrt{\text{MSE}}\,.
$$
Agreeing on these definitions, the BIAS corresponds to the sample mean of $\epsilon$, but MSE is not the biased sample variance. Instead:
$$
\text{STDE}^2 = \overline{(\epsilon-\overline{\epsilon})^2} = \frac{1}{n}\sum_{i=1}^{n}(\epsilon_i-\overline{\epsilon})^2\,,
$$
or, if both BIAS and RMSE were computed,
$$
\text{STDE}^2 = \overline{(\epsilon-\overline{\epsilon})^2}=\overline{\epsilon^2}-\overline{\epsilon}^2 = \text{RMSE}^2 - \text{BIAS}^2\,.
$$
Note that the biased sample variance is being used instead of the unbiased, to keep consistency with the previous definitions given for the MSE and RMSE.
Thus, in my opinion the confidence intervals established by fabee refer to the sample standard deviation of $\epsilon$, STDE. Similarly, confidence intervals may be established for the BIAS based on the z-score (or t-score if $n<30$) and $\left.\text{STDE}\middle/\sqrt{n}\right.$.
|
Confidence interval of RMSE
The reasoning in the answer by fabee seems correct if applied to the STDE (standard deviation of the error), not the RMSE.
Using similar nomenclature, $i=1,\,\ldots,\,n$ is an index representing each
|
9,315
|
Confidence interval of RMSE
|
Following Faaber 1999, the uncertainty of RMSE is given as
$$\sigma (\hat{RMSE})/RMSE = \sqrt{\frac{1}{2n}}$$
where $n$ is the number of datapoints.
|
Confidence interval of RMSE
|
Following Faaber 1999, the uncertainty of RMSE is given as
$$\sigma (\hat{RMSE})/RMSE = \sqrt{\frac{1}{2n}}$$
where $n$ is the number of datapoints.
|
Confidence interval of RMSE
Following Faaber 1999, the uncertainty of RMSE is given as
$$\sigma (\hat{RMSE})/RMSE = \sqrt{\frac{1}{2n}}$$
where $n$ is the number of datapoints.
|
Confidence interval of RMSE
Following Faaber 1999, the uncertainty of RMSE is given as
$$\sigma (\hat{RMSE})/RMSE = \sqrt{\frac{1}{2n}}$$
where $n$ is the number of datapoints.
|
9,316
|
Confidence interval of RMSE
|
Borrowing code from @Bryan Shalloway's link (https://gist.github.com/brshallo/7eed49c743ac165ced2294a70e73e65e, which is in the comment in the accepted answer), you can calculate this in R with the RMSE value and the degrees of freedom, which @fabee suggests is n (not n-1) in this case.
The R function:
rmse_interval <- function(rmse, deg_free, p_lower = 0.025, p_upper = 0.975){
tibble(.pred_lower = sqrt(deg_free / qchisq(p_upper, df = deg_free)) * rmse,
.pred_upper = sqrt(deg_free / qchisq(p_lower, df = deg_free)) * rmse)
}
A practical example:
If I had an RMSE value of 0.3 and 1000 samples were used to calculate that value, I can then do
rmse_interval(0.3, 1000)
which would return:
# A tibble: 1 x 2
.pred_lower .pred_upper
<dbl> <dbl>
1 0.287 0.314
|
Confidence interval of RMSE
|
Borrowing code from @Bryan Shalloway's link (https://gist.github.com/brshallo/7eed49c743ac165ced2294a70e73e65e, which is in the comment in the accepted answer), you can calculate this in R with the RM
|
Confidence interval of RMSE
Borrowing code from @Bryan Shalloway's link (https://gist.github.com/brshallo/7eed49c743ac165ced2294a70e73e65e, which is in the comment in the accepted answer), you can calculate this in R with the RMSE value and the degrees of freedom, which @fabee suggests is n (not n-1) in this case.
The R function:
rmse_interval <- function(rmse, deg_free, p_lower = 0.025, p_upper = 0.975){
tibble(.pred_lower = sqrt(deg_free / qchisq(p_upper, df = deg_free)) * rmse,
.pred_upper = sqrt(deg_free / qchisq(p_lower, df = deg_free)) * rmse)
}
A practical example:
If I had an RMSE value of 0.3 and 1000 samples were used to calculate that value, I can then do
rmse_interval(0.3, 1000)
which would return:
# A tibble: 1 x 2
.pred_lower .pred_upper
<dbl> <dbl>
1 0.287 0.314
|
Confidence interval of RMSE
Borrowing code from @Bryan Shalloway's link (https://gist.github.com/brshallo/7eed49c743ac165ced2294a70e73e65e, which is in the comment in the accepted answer), you can calculate this in R with the RM
|
9,317
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
|
The output from glm using a Poisson distribution gives a $z$-value because with a Poisson distribution, the mean and variance parameter are the same. In the Poisson model, you only have to estimate a single parameter ($\lambda$). In a glm where you have to estimate both a mean and dispersion parameter, you should see the $t$-distribution used.
For a standard linear regression, you assume the error term is normally distributed. Here, the variance parameter has to be estimated - hence the use of the $t$-distribution for the test statistic. If you somehow knew the population variance for the error term, you could use a $z$-test statistic instead.
As you mention in your post, the distribution of the test is asymptotically normal. The $t$-distribution is asymptotically normal, so in a large sample, the difference would be negligible.
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
|
The output from glm using a Poisson distribution gives a $z$-value because with a Poisson distribution, the mean and variance parameter are the same. In the Poisson model, you only have to estimate a
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
The output from glm using a Poisson distribution gives a $z$-value because with a Poisson distribution, the mean and variance parameter are the same. In the Poisson model, you only have to estimate a single parameter ($\lambda$). In a glm where you have to estimate both a mean and dispersion parameter, you should see the $t$-distribution used.
For a standard linear regression, you assume the error term is normally distributed. Here, the variance parameter has to be estimated - hence the use of the $t$-distribution for the test statistic. If you somehow knew the population variance for the error term, you could use a $z$-test statistic instead.
As you mention in your post, the distribution of the test is asymptotically normal. The $t$-distribution is asymptotically normal, so in a large sample, the difference would be negligible.
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
The output from glm using a Poisson distribution gives a $z$-value because with a Poisson distribution, the mean and variance parameter are the same. In the Poisson model, you only have to estimate a
|
9,318
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
|
In the GLM framework, in general, the W test statistic you mentioned is asymptotically Normal distributed, that's why you see in R the z values.
In addition to that, when dealing with a linear model, i.e a GLM with a Normal distributed response variable, the distribution of test statistic is a Student's t, so in R you have t values.
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
|
In the GLM framework, in general, the W test statistic you mentioned is asymptotically Normal distributed, that's why you see in R the z values.
In addition to that, when dealing with a linear model,
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
In the GLM framework, in general, the W test statistic you mentioned is asymptotically Normal distributed, that's why you see in R the z values.
In addition to that, when dealing with a linear model, i.e a GLM with a Normal distributed response variable, the distribution of test statistic is a Student's t, so in R you have t values.
|
Wald test in regression (OLS and GLMs): t- vs. z-distribution
In the GLM framework, in general, the W test statistic you mentioned is asymptotically Normal distributed, that's why you see in R the z values.
In addition to that, when dealing with a linear model,
|
9,319
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
|
Some of my thoughts, may not be correct though.
I understand the reason we have such design (for hinge and logistic loss) is we want the objective function to be convex.
Convexity is surely a nice property, but I think the most important reason is we want the objective function to have non-zero derivatives, so that we can make use of the derivatives to solve it. The objective function can be non-convex, in which case we often just stop at some local optima or saddle points.
and interestingly, it also penalize correctly classified instances if
they are weakly classified. It is a really strange design.
I think such design sort of advises the model to not only make the right predictions, but also be confident about the predictions. If we don't want correctly classified instances to get punished, we can for example, move the hinge loss (blue) to the left by 1, so that they no longer get any loss. But I believe this often leads to worse result in practice.
what are the prices we need to pay by using different "proxy loss
functions", such as hinge loss and logistic loss?
IMO by choosing different loss functions we are bringing different assumptions to the model. For example, the logistic regression loss (red) assumes a Bernoulli distribution, the MSE loss (green) assumes a Gaussian noise.
Following the least squares vs. logistic regression example in PRML, I added the hinge loss for comparison.
As shown in the figure, hinge loss and logistic regression / cross entropy / log-likelihood / softplus have very close results, because their objective functions are close (figure below), while MSE is generally more sensitive to outliers. Hinge loss does not always have a unique solution because it's not strictly convex.
However one important property of hinge loss is, data points far away from the decision boundary contribute nothing to the loss, the solution will be the same with those points removed.
The remaining points are called support vectors in the context of SVM. Whereas SVM uses a regularizer term to ensure the maximum margin property and a unique solution.
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
|
Some of my thoughts, may not be correct though.
I understand the reason we have such design (for hinge and logistic loss) is we want the objective function to be convex.
Convexity is surely a nice p
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
Some of my thoughts, may not be correct though.
I understand the reason we have such design (for hinge and logistic loss) is we want the objective function to be convex.
Convexity is surely a nice property, but I think the most important reason is we want the objective function to have non-zero derivatives, so that we can make use of the derivatives to solve it. The objective function can be non-convex, in which case we often just stop at some local optima or saddle points.
and interestingly, it also penalize correctly classified instances if
they are weakly classified. It is a really strange design.
I think such design sort of advises the model to not only make the right predictions, but also be confident about the predictions. If we don't want correctly classified instances to get punished, we can for example, move the hinge loss (blue) to the left by 1, so that they no longer get any loss. But I believe this often leads to worse result in practice.
what are the prices we need to pay by using different "proxy loss
functions", such as hinge loss and logistic loss?
IMO by choosing different loss functions we are bringing different assumptions to the model. For example, the logistic regression loss (red) assumes a Bernoulli distribution, the MSE loss (green) assumes a Gaussian noise.
Following the least squares vs. logistic regression example in PRML, I added the hinge loss for comparison.
As shown in the figure, hinge loss and logistic regression / cross entropy / log-likelihood / softplus have very close results, because their objective functions are close (figure below), while MSE is generally more sensitive to outliers. Hinge loss does not always have a unique solution because it's not strictly convex.
However one important property of hinge loss is, data points far away from the decision boundary contribute nothing to the loss, the solution will be the same with those points removed.
The remaining points are called support vectors in the context of SVM. Whereas SVM uses a regularizer term to ensure the maximum margin property and a unique solution.
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
Some of my thoughts, may not be correct though.
I understand the reason we have such design (for hinge and logistic loss) is we want the objective function to be convex.
Convexity is surely a nice p
|
9,320
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
|
Posting a late reply, since there is a very simple answer which has not been mentioned yet.
what are the prices we need to pay by using different "proxy loss functions", such as hinge loss and logistic loss?
When you replace the non-convex 0-1 loss function by a convex
surrogate (e.g hinge-loss), you are actually now solving a different problem than the one you intended to solve (which is to minimize the number of classification mistakes). So you gain computational tractability (the problem becomes convex, meaning you can solve it efficiently using tools of convex optimization), but in the general case there is actually no way to relate the error of the classifier that minimizes a "proxy" loss and the error of the classifier that minimizes the 0-1 loss. If what you truly cared about was minimizing the number of misclassifications, I argue that this really is a big price to pay.
I should mention that this statement is worst-case, in the sense that it holds for any distribution $\mathcal D$. For some "nice" distributions, there are exceptions to this rule. The key example is of data distributions that have large margins w.r.t the decision boundary - see Theorem 15.4 in Shalev-Shwartz, Shai, and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
|
Posting a late reply, since there is a very simple answer which has not been mentioned yet.
what are the prices we need to pay by using different "proxy loss functions", such as hinge loss and logis
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
Posting a late reply, since there is a very simple answer which has not been mentioned yet.
what are the prices we need to pay by using different "proxy loss functions", such as hinge loss and logistic loss?
When you replace the non-convex 0-1 loss function by a convex
surrogate (e.g hinge-loss), you are actually now solving a different problem than the one you intended to solve (which is to minimize the number of classification mistakes). So you gain computational tractability (the problem becomes convex, meaning you can solve it efficiently using tools of convex optimization), but in the general case there is actually no way to relate the error of the classifier that minimizes a "proxy" loss and the error of the classifier that minimizes the 0-1 loss. If what you truly cared about was minimizing the number of misclassifications, I argue that this really is a big price to pay.
I should mention that this statement is worst-case, in the sense that it holds for any distribution $\mathcal D$. For some "nice" distributions, there are exceptions to this rule. The key example is of data distributions that have large margins w.r.t the decision boundary - see Theorem 15.4 in Shalev-Shwartz, Shai, and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
Posting a late reply, since there is a very simple answer which has not been mentioned yet.
what are the prices we need to pay by using different "proxy loss functions", such as hinge loss and logis
|
9,321
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
|
Ideally your loss function should reflect actual loss incurred by business. For instance, if you're classifying damaged goods, then the loss of misclassification could be like this:
marking damaged goods that were not: lost profit on potential sale
not marking damaged goods that were damaged: cost of return processing
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
|
Ideally your loss function should reflect actual loss incurred by business. For instance, if you're classifying damaged goods, then the loss of misclassification could be like this:
marking damaged g
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
Ideally your loss function should reflect actual loss incurred by business. For instance, if you're classifying damaged goods, then the loss of misclassification could be like this:
marking damaged goods that were not: lost profit on potential sale
not marking damaged goods that were damaged: cost of return processing
|
What are the impacts of choosing different loss functions in classification to approximate 0-1 loss
Ideally your loss function should reflect actual loss incurred by business. For instance, if you're classifying damaged goods, then the loss of misclassification could be like this:
marking damaged g
|
9,322
|
How to initialize the elements of the filter matrix?
|
One typically initializes a network from a random distribution, typically mean zero and some care is taken with regards to choosing its variance. These days with advances in optimization techniques (SGD+Momentum among other methods) and activation nonlinearities (ReLUs and ReLU-like activations allow for better backproagation of gradient signals, even in deeper networks), one is able to actually train state of the art convolutional neural networks from a randomized initialization.
Key properties are the following:
Why random? Why not initialize them all to 0? An important concept here is called symmetry breaking. If all the neurons have the same weights, they will produce the same outputs and we won't be learning different features. We won't learn different features because during the backpropagation step, all the weight updates will be exactly the same. So starting with a randomized distribution allows us to initialize the neurons to be different (with very high probability) and allows us to learn a rich and diverse feature hierarchy.
Why mean zero? A common practice in machine learning is to zero-center or normalize the input data, such that the raw input features (for image data these would be pixels) average to zero.
We zero-centered our data, and we will randomly initialize our network's weights (matrices as you referred to them). What sort of distribution should we choose? The distribution of the input data to our network has mean zero since we zero-centered. Say we also initialize our bias terms to be zero. When we initialize the training of our network, we have no reason to favor one neuron over the other as they are all random. One practice is to randomly initialize our weights in a way where they all have zero activation output in expectation. This way no one neuron is favored to "activate" (have positive output value) than any other neuron while simultaneously breaking symmetry due to the random initialization. Well a simple way to accomplish this is to choose a mean zero distribution.
How do we choose the variances? You don't want to choose the variance to be too large, even if it is mean zero. Extreme values in a deep nets weights can result in activation outputs that are exponentially increasing in magnitude, and this issue can compound with the depth of the network. This can wreak havoc on the training of our network. You also don't want to choose it to be too small as this may slow down learning since we are computing very small gradient values. So there's a balance here, especially when it comes to deeper networks as we do not want our forward or backward propagations to exponentially increase or decrease in depth.
There are two very popular weight initialization schemes: Glorot Uniform (Understanding the difficulty of training deep feedforward neural networks) and the He Normal initializer (Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification).
They are both constructed with the intent of training deep networks with the following core principle in mind (quote is from the Delving Deeper into Rectifiers article):
"A proper initialization method should avoid reducing or magnifying the magnitudes of input signals exponentially."
Roughly speaking, these two initialization schemes initialize the variance of each layer so that the output distribution of each neuron is the same. Section 2.2 of the Delving Deep into Rectifiers provides an in-depth analysis.
A final note: sometimes you will also see people use Gaussian with standard deviation equal to .005 or .01, or some other "small" standard deviation, across all the layers. Other times you will see people fiddle with the variances by hand, basically performing cross validation to find a best performing configuration.
|
How to initialize the elements of the filter matrix?
|
One typically initializes a network from a random distribution, typically mean zero and some care is taken with regards to choosing its variance. These days with advances in optimization techniques (S
|
How to initialize the elements of the filter matrix?
One typically initializes a network from a random distribution, typically mean zero and some care is taken with regards to choosing its variance. These days with advances in optimization techniques (SGD+Momentum among other methods) and activation nonlinearities (ReLUs and ReLU-like activations allow for better backproagation of gradient signals, even in deeper networks), one is able to actually train state of the art convolutional neural networks from a randomized initialization.
Key properties are the following:
Why random? Why not initialize them all to 0? An important concept here is called symmetry breaking. If all the neurons have the same weights, they will produce the same outputs and we won't be learning different features. We won't learn different features because during the backpropagation step, all the weight updates will be exactly the same. So starting with a randomized distribution allows us to initialize the neurons to be different (with very high probability) and allows us to learn a rich and diverse feature hierarchy.
Why mean zero? A common practice in machine learning is to zero-center or normalize the input data, such that the raw input features (for image data these would be pixels) average to zero.
We zero-centered our data, and we will randomly initialize our network's weights (matrices as you referred to them). What sort of distribution should we choose? The distribution of the input data to our network has mean zero since we zero-centered. Say we also initialize our bias terms to be zero. When we initialize the training of our network, we have no reason to favor one neuron over the other as they are all random. One practice is to randomly initialize our weights in a way where they all have zero activation output in expectation. This way no one neuron is favored to "activate" (have positive output value) than any other neuron while simultaneously breaking symmetry due to the random initialization. Well a simple way to accomplish this is to choose a mean zero distribution.
How do we choose the variances? You don't want to choose the variance to be too large, even if it is mean zero. Extreme values in a deep nets weights can result in activation outputs that are exponentially increasing in magnitude, and this issue can compound with the depth of the network. This can wreak havoc on the training of our network. You also don't want to choose it to be too small as this may slow down learning since we are computing very small gradient values. So there's a balance here, especially when it comes to deeper networks as we do not want our forward or backward propagations to exponentially increase or decrease in depth.
There are two very popular weight initialization schemes: Glorot Uniform (Understanding the difficulty of training deep feedforward neural networks) and the He Normal initializer (Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification).
They are both constructed with the intent of training deep networks with the following core principle in mind (quote is from the Delving Deeper into Rectifiers article):
"A proper initialization method should avoid reducing or magnifying the magnitudes of input signals exponentially."
Roughly speaking, these two initialization schemes initialize the variance of each layer so that the output distribution of each neuron is the same. Section 2.2 of the Delving Deep into Rectifiers provides an in-depth analysis.
A final note: sometimes you will also see people use Gaussian with standard deviation equal to .005 or .01, or some other "small" standard deviation, across all the layers. Other times you will see people fiddle with the variances by hand, basically performing cross validation to find a best performing configuration.
|
How to initialize the elements of the filter matrix?
One typically initializes a network from a random distribution, typically mean zero and some care is taken with regards to choosing its variance. These days with advances in optimization techniques (S
|
9,323
|
How to initialize the elements of the filter matrix?
|
I can't comment because of low reputation and so I am writing this in response to Felipe Almeida's question. After Indie AI's perfect answer, there is nothing much to add. If you want to detect specific shapes (like an X), you can pre define a specific filter, as is the case with edge detection. But this is the beauty of deep learning, there are so many layers, so many filters and so many iterations that the filters learn almost every object shape necessary on it's own. So theoretically, if there is an X to be detected, one of the filters will learn to detect an X (as the yellow filter)
|
How to initialize the elements of the filter matrix?
|
I can't comment because of low reputation and so I am writing this in response to Felipe Almeida's question. After Indie AI's perfect answer, there is nothing much to add. If you want to detect specif
|
How to initialize the elements of the filter matrix?
I can't comment because of low reputation and so I am writing this in response to Felipe Almeida's question. After Indie AI's perfect answer, there is nothing much to add. If you want to detect specific shapes (like an X), you can pre define a specific filter, as is the case with edge detection. But this is the beauty of deep learning, there are so many layers, so many filters and so many iterations that the filters learn almost every object shape necessary on it's own. So theoretically, if there is an X to be detected, one of the filters will learn to detect an X (as the yellow filter)
|
How to initialize the elements of the filter matrix?
I can't comment because of low reputation and so I am writing this in response to Felipe Almeida's question. After Indie AI's perfect answer, there is nothing much to add. If you want to detect specif
|
9,324
|
Python module for change point analysis
|
You can try out the changefinder library on PyPI. The description says that it's an online Change Detection Library based on the ChangeFinder algorithm
There are also some Python implementations of Michele Basseville's Statistical Change Point Detection techniques available in tutorial format on this Github repo.
|
Python module for change point analysis
|
You can try out the changefinder library on PyPI. The description says that it's an online Change Detection Library based on the ChangeFinder algorithm
There are also some Python implementations of Mi
|
Python module for change point analysis
You can try out the changefinder library on PyPI. The description says that it's an online Change Detection Library based on the ChangeFinder algorithm
There are also some Python implementations of Michele Basseville's Statistical Change Point Detection techniques available in tutorial format on this Github repo.
|
Python module for change point analysis
You can try out the changefinder library on PyPI. The description says that it's an online Change Detection Library based on the ChangeFinder algorithm
There are also some Python implementations of Mi
|
9,325
|
Python module for change point analysis
|
There are still some gaps in the Python library for using advanced statistics packages. Have you tried using the RPy module? When using RPy you can load R modules.
brief tutorial on RPy: http://www.sciprogblog.com/2012/08/using-r-from-within-python.html strucchange
|
Python module for change point analysis
|
There are still some gaps in the Python library for using advanced statistics packages. Have you tried using the RPy module? When using RPy you can load R modules.
brief tutorial on RPy: http://www.sc
|
Python module for change point analysis
There are still some gaps in the Python library for using advanced statistics packages. Have you tried using the RPy module? When using RPy you can load R modules.
brief tutorial on RPy: http://www.sciprogblog.com/2012/08/using-r-from-within-python.html strucchange
|
Python module for change point analysis
There are still some gaps in the Python library for using advanced statistics packages. Have you tried using the RPy module? When using RPy you can load R modules.
brief tutorial on RPy: http://www.sc
|
9,326
|
Python module for change point analysis
|
I just came across a change point detection library in Python named "ruptures" : https://arxiv.org/abs/1801.00826
Maybe this can be of use.
|
Python module for change point analysis
|
I just came across a change point detection library in Python named "ruptures" : https://arxiv.org/abs/1801.00826
Maybe this can be of use.
|
Python module for change point analysis
I just came across a change point detection library in Python named "ruptures" : https://arxiv.org/abs/1801.00826
Maybe this can be of use.
|
Python module for change point analysis
I just came across a change point detection library in Python named "ruptures" : https://arxiv.org/abs/1801.00826
Maybe this can be of use.
|
9,327
|
Python module for change point analysis
|
This implementation of the Python package rpy2 worked for me:
import numpy as np
from rpy2.robjects.packages import importr
import rpy2.robjects as robjects
r = robjects.r #allows access to r object with r.
bcp = importr('bcp') #import bayesian change point package in python
values = bcp.bcp( r.c( r.rnorm(50) , r.rnorm(50,5,1), r.rnorm(50) ) ) #use bcp function on vector
posterior_means = np.array(values[5]).flatten()
posterior_probability = np.array(values[7]).flatten()
Then, you can plot the posterior means and posterior probability against the original vector. See the bcp function example in R for more detailed information about this example.
Also, hard indexing values with a number (i.e. values[5]) is not ideal, but I was having a hard time using the rx and rx2 extractor. So if anyone can enlighten me on a less hacky method of extraction, I'd love to know!
|
Python module for change point analysis
|
This implementation of the Python package rpy2 worked for me:
import numpy as np
from rpy2.robjects.packages import importr
import rpy2.robjects as robjects
r = robjects.r #allows access to r object
|
Python module for change point analysis
This implementation of the Python package rpy2 worked for me:
import numpy as np
from rpy2.robjects.packages import importr
import rpy2.robjects as robjects
r = robjects.r #allows access to r object with r.
bcp = importr('bcp') #import bayesian change point package in python
values = bcp.bcp( r.c( r.rnorm(50) , r.rnorm(50,5,1), r.rnorm(50) ) ) #use bcp function on vector
posterior_means = np.array(values[5]).flatten()
posterior_probability = np.array(values[7]).flatten()
Then, you can plot the posterior means and posterior probability against the original vector. See the bcp function example in R for more detailed information about this example.
Also, hard indexing values with a number (i.e. values[5]) is not ideal, but I was having a hard time using the rx and rx2 extractor. So if anyone can enlighten me on a less hacky method of extraction, I'd love to know!
|
Python module for change point analysis
This implementation of the Python package rpy2 worked for me:
import numpy as np
from rpy2.robjects.packages import importr
import rpy2.robjects as robjects
r = robjects.r #allows access to r object
|
9,328
|
Python module for change point analysis
|
Depending on your requirement for online/offline change point detection, python has the below packages:
1) The ruptures package, a Python library for performing offline change point detection.
2) Calling the R changepoint package into Python using the rpy2 package, an R-to-Python interface.
3) The changefinder package, a Python library for online change point detection.
4) Bayesian Change Point Detection - both online and offline approaches.
|
Python module for change point analysis
|
Depending on your requirement for online/offline change point detection, python has the below packages:
1) The ruptures package, a Python library for performing offline change point detection.
2) Ca
|
Python module for change point analysis
Depending on your requirement for online/offline change point detection, python has the below packages:
1) The ruptures package, a Python library for performing offline change point detection.
2) Calling the R changepoint package into Python using the rpy2 package, an R-to-Python interface.
3) The changefinder package, a Python library for online change point detection.
4) Bayesian Change Point Detection - both online and offline approaches.
|
Python module for change point analysis
Depending on your requirement for online/offline change point detection, python has the below packages:
1) The ruptures package, a Python library for performing offline change point detection.
2) Ca
|
9,329
|
Python module for change point analysis
|
Have you tried ChangeFinder library, you can install it on linux by:
pip install changefinder
also Bayesian_changepoint_detection GitHub code can be found here: GitHub Code
|
Python module for change point analysis
|
Have you tried ChangeFinder library, you can install it on linux by:
pip install changefinder
also Bayesian_changepoint_detection GitHub code can be found here: GitHub Code
|
Python module for change point analysis
Have you tried ChangeFinder library, you can install it on linux by:
pip install changefinder
also Bayesian_changepoint_detection GitHub code can be found here: GitHub Code
|
Python module for change point analysis
Have you tried ChangeFinder library, you can install it on linux by:
pip install changefinder
also Bayesian_changepoint_detection GitHub code can be found here: GitHub Code
|
9,330
|
Kolmogorov–Smirnov test vs. t-test
|
As an example of why you'd want to use the two sample Kolmogorov-Smirnov test:
Imagine that the population means were similar but the variances were very different. The Kolmogorov-Smirnov test could pick this difference up but the t-test cannot.
Or imagine that the distributions have similar means and sd's but the males have a bimodal distribution (red) while the females (blue) don't:
Do males and females perform differently? Yes -- the males tend to either score somewhere around 7.5-8 or 12.5-13, while the females tend more often to score more toward the middle (near 10 or so) but are much less clustered about that value than the two values the males tend to score near to.
So the Kolmogorov-Smirnov can find much more general kinds of difference in distribution than the t-test can.
|
Kolmogorov–Smirnov test vs. t-test
|
As an example of why you'd want to use the two sample Kolmogorov-Smirnov test:
Imagine that the population means were similar but the variances were very different. The Kolmogorov-Smirnov test could p
|
Kolmogorov–Smirnov test vs. t-test
As an example of why you'd want to use the two sample Kolmogorov-Smirnov test:
Imagine that the population means were similar but the variances were very different. The Kolmogorov-Smirnov test could pick this difference up but the t-test cannot.
Or imagine that the distributions have similar means and sd's but the males have a bimodal distribution (red) while the females (blue) don't:
Do males and females perform differently? Yes -- the males tend to either score somewhere around 7.5-8 or 12.5-13, while the females tend more often to score more toward the middle (near 10 or so) but are much less clustered about that value than the two values the males tend to score near to.
So the Kolmogorov-Smirnov can find much more general kinds of difference in distribution than the t-test can.
|
Kolmogorov–Smirnov test vs. t-test
As an example of why you'd want to use the two sample Kolmogorov-Smirnov test:
Imagine that the population means were similar but the variances were very different. The Kolmogorov-Smirnov test could p
|
9,331
|
Distant supervision: supervised, semi-supervised, or both?
|
A Distant supervision algorithm usually has the following steps:
1] It may have some labeled training data
2] It "has" access to a pool of unlabeled data
3] It has an operator that allows it to sample from this unlabeled data and label them and this operator is expected to be noisy in its labels
4] The algorithm then collectively utilizes the original labeled training data if it had and this new noisily labeled data to give the final output.
Now, to answer your question, you as well as the site both are correct. You are looking at the 4th step of the algorithm and notice that at the 4th step one can use any algorithm that the user has access to. Hence your point, "it can be applied to both supervised and semi-supervised learning".
Whereas the site is looking at all the steps 1-4 collectively and notices that the noisily labeled data is obtained from a pool of unlabeled data (with or without the use of some pre-existing labeled training data) and this process of obtaining noisy labels is an essential component for any distant supervision algorithm, hence it is a semi-supervised algorithm.
|
Distant supervision: supervised, semi-supervised, or both?
|
A Distant supervision algorithm usually has the following steps:
1] It may have some labeled training data
2] It "has" access to a pool of unlabeled data
3] It has an operator that allows it to sam
|
Distant supervision: supervised, semi-supervised, or both?
A Distant supervision algorithm usually has the following steps:
1] It may have some labeled training data
2] It "has" access to a pool of unlabeled data
3] It has an operator that allows it to sample from this unlabeled data and label them and this operator is expected to be noisy in its labels
4] The algorithm then collectively utilizes the original labeled training data if it had and this new noisily labeled data to give the final output.
Now, to answer your question, you as well as the site both are correct. You are looking at the 4th step of the algorithm and notice that at the 4th step one can use any algorithm that the user has access to. Hence your point, "it can be applied to both supervised and semi-supervised learning".
Whereas the site is looking at all the steps 1-4 collectively and notices that the noisily labeled data is obtained from a pool of unlabeled data (with or without the use of some pre-existing labeled training data) and this process of obtaining noisy labels is an essential component for any distant supervision algorithm, hence it is a semi-supervised algorithm.
|
Distant supervision: supervised, semi-supervised, or both?
A Distant supervision algorithm usually has the following steps:
1] It may have some labeled training data
2] It "has" access to a pool of unlabeled data
3] It has an operator that allows it to sam
|
9,332
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
|
In addition to @Bhagyesh_Vikani:
Relu behaves close to a linear unit
Relu is like a switch for linearity. If you don't need it, you "switch" it off. If you need it, you "switch" it on. Thus, we get the linearity benefits but reserve ourself an option of not using it altogther.
The derivative is 1 when it's active. The second derivative of the function is 0 almost everywhere. Thus, it's a very simple function. That makes optimisation much easier.
The gradient is large whenever you want it be and never saturate
There are also generalisations of rectified linear units. Rectified linear units and its generalisations are based on the principle that linear models are easier to optimize.
Both sigmoid/softmax are discouraged (chapter 6: Ian Goodfellow) for vanilla feedforward implementation. They are more useful for recurrent networks, probabilistic models, and some autoencoders have additional requirements that rule out the use of piecewise linear activation functions.
If you have a simple NN (that's the question), Relu is your first preference.
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
|
In addition to @Bhagyesh_Vikani:
Relu behaves close to a linear unit
Relu is like a switch for linearity. If you don't need it, you "switch" it off. If you need it, you "switch" it on. Thus, we get t
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
In addition to @Bhagyesh_Vikani:
Relu behaves close to a linear unit
Relu is like a switch for linearity. If you don't need it, you "switch" it off. If you need it, you "switch" it on. Thus, we get the linearity benefits but reserve ourself an option of not using it altogther.
The derivative is 1 when it's active. The second derivative of the function is 0 almost everywhere. Thus, it's a very simple function. That makes optimisation much easier.
The gradient is large whenever you want it be and never saturate
There are also generalisations of rectified linear units. Rectified linear units and its generalisations are based on the principle that linear models are easier to optimize.
Both sigmoid/softmax are discouraged (chapter 6: Ian Goodfellow) for vanilla feedforward implementation. They are more useful for recurrent networks, probabilistic models, and some autoencoders have additional requirements that rule out the use of piecewise linear activation functions.
If you have a simple NN (that's the question), Relu is your first preference.
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
In addition to @Bhagyesh_Vikani:
Relu behaves close to a linear unit
Relu is like a switch for linearity. If you don't need it, you "switch" it off. If you need it, you "switch" it on. Thus, we get t
|
9,333
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
|
Relu have its own pros and cons:
Pros:
1. Does not saturate (in +ve region)
2. Computationally, it is very efficient
3. Generally models with relu neurons converge much faster than neurons with other activation functions, as described here
Cons:
1. One issue with dealing with them is where they die, i.e. dead Relus. Because if activation of any relu neurons become zero then its gradients will be clipped to zero in back-propagation. This can be avoided if we are very careful with weights initialization and tuning learning rate.
For more details: Check this lecture-5 of CS231n
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
|
Relu have its own pros and cons:
Pros:
1. Does not saturate (in +ve region)
2. Computationally, it is very efficient
3. Generally models with relu neurons converge much faster than neurons with
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
Relu have its own pros and cons:
Pros:
1. Does not saturate (in +ve region)
2. Computationally, it is very efficient
3. Generally models with relu neurons converge much faster than neurons with other activation functions, as described here
Cons:
1. One issue with dealing with them is where they die, i.e. dead Relus. Because if activation of any relu neurons become zero then its gradients will be clipped to zero in back-propagation. This can be avoided if we are very careful with weights initialization and tuning learning rate.
For more details: Check this lecture-5 of CS231n
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
Relu have its own pros and cons:
Pros:
1. Does not saturate (in +ve region)
2. Computationally, it is very efficient
3. Generally models with relu neurons converge much faster than neurons with
|
9,334
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
|
http://cs231n.github.io/neural-networks-1/
Sigmoids
Sigmoids saturate and kill gradients.
Sigmoid outputs are not zero-centered.
tanh
Like the sigmoid neuron, its activations saturate, but unlike the sigmoid neuron its output is zero-centered. Therefore, in practice the tanh non-linearity is always preferred to the sigmoid nonlinearity.
ReLU
Use the ReLU non-linearity, be careful with your learning rates and possibly monitor the fraction of “dead” units in a network. If this concerns you, give Leaky ReLU or Maxout a try. Never use sigmoid. Try tanh, but expect it to work worse than ReLU/Maxout.
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
|
http://cs231n.github.io/neural-networks-1/
Sigmoids
Sigmoids saturate and kill gradients.
Sigmoid outputs are not zero-centered.
tanh
Like the sigmoid neuron, its activations saturate, but unlike th
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
http://cs231n.github.io/neural-networks-1/
Sigmoids
Sigmoids saturate and kill gradients.
Sigmoid outputs are not zero-centered.
tanh
Like the sigmoid neuron, its activations saturate, but unlike the sigmoid neuron its output is zero-centered. Therefore, in practice the tanh non-linearity is always preferred to the sigmoid nonlinearity.
ReLU
Use the ReLU non-linearity, be careful with your learning rates and possibly monitor the fraction of “dead” units in a network. If this concerns you, give Leaky ReLU or Maxout a try. Never use sigmoid. Try tanh, but expect it to work worse than ReLU/Maxout.
|
Relu vs Sigmoid vs Softmax as hidden layer neurons
http://cs231n.github.io/neural-networks-1/
Sigmoids
Sigmoids saturate and kill gradients.
Sigmoid outputs are not zero-centered.
tanh
Like the sigmoid neuron, its activations saturate, but unlike th
|
9,335
|
How well does R scale to text classification tasks? [closed]
|
As requested in a comment, here are some pointers for processing steps. A number of tools may be found at the CRAN Task View for Natural Language Processing. You may also want to look at this paper on the tm (text mining) package for R.
Prior to processing, consider normalization of the word tokens. openNLP (for which there is an R package) is one route.
For text processing, a common pre-processing step is to normalize the data via tf.idf -- term frequency * inverse document frequency - see the Wikipedia entry for more details. There are other more recent normalizations, but this is a bread and butter method, so it's important to know it. You can easily implement it in R: just store (docID, wordID, freq1, freq2) where freq1 is the count of times the word indexed by wordID has appeared in the given document and freq2 is the # of documents in which it appears. No need to store this vector for words that don't appear in a given document. Then, just take freq1 / freq2 and you have your tf.idf value.
After calculating the tf.idf values, you can work with the full dimensionality of your data or filter out those words that are essentially uninformative. For instance, any word that appears in only 1 document is not going to give much insight. This may reduce your dimensionality substantially. Given the small # of documents being examined, you may find that reducing to just 1K dimensions is appropriate.
I wouldn't both recentering the data (e.g. for PCA), but you can store the data now in a term matrix (where entries are now tf.idf values) with ease, using the sparse matrices, as supported by the Matrix package.
At this point, you have a nicely pre-processed dataset. I would recommend proceeding with the tools cited in the CRAN task view or the text mining package. Clustering the data, for instance by projecting onto the first 4 or 6 principal components, could be very interesting to your group when the data is plotted.
One other thing: you may find that dimensionality reduction along the lines of PCA (*) can be helpful when using various classification methods, as you are essentially aggregating the related words. The first 10-50 principal components may be all that you need for document classification, given your sample size.
(*) Note: PCA is just a first step. It can be very interesting for someone just starting out with text mining and PCA, but you may eventually find that it is a bit of a nuisance for sparse data sets. As a first step, though, take a look at it, especially via the prcomp and princomp functions.
Update: I didn't state a preference in this answer - I recommend prcomp rather than princomp.
|
How well does R scale to text classification tasks? [closed]
|
As requested in a comment, here are some pointers for processing steps. A number of tools may be found at the CRAN Task View for Natural Language Processing. You may also want to look at this paper
|
How well does R scale to text classification tasks? [closed]
As requested in a comment, here are some pointers for processing steps. A number of tools may be found at the CRAN Task View for Natural Language Processing. You may also want to look at this paper on the tm (text mining) package for R.
Prior to processing, consider normalization of the word tokens. openNLP (for which there is an R package) is one route.
For text processing, a common pre-processing step is to normalize the data via tf.idf -- term frequency * inverse document frequency - see the Wikipedia entry for more details. There are other more recent normalizations, but this is a bread and butter method, so it's important to know it. You can easily implement it in R: just store (docID, wordID, freq1, freq2) where freq1 is the count of times the word indexed by wordID has appeared in the given document and freq2 is the # of documents in which it appears. No need to store this vector for words that don't appear in a given document. Then, just take freq1 / freq2 and you have your tf.idf value.
After calculating the tf.idf values, you can work with the full dimensionality of your data or filter out those words that are essentially uninformative. For instance, any word that appears in only 1 document is not going to give much insight. This may reduce your dimensionality substantially. Given the small # of documents being examined, you may find that reducing to just 1K dimensions is appropriate.
I wouldn't both recentering the data (e.g. for PCA), but you can store the data now in a term matrix (where entries are now tf.idf values) with ease, using the sparse matrices, as supported by the Matrix package.
At this point, you have a nicely pre-processed dataset. I would recommend proceeding with the tools cited in the CRAN task view or the text mining package. Clustering the data, for instance by projecting onto the first 4 or 6 principal components, could be very interesting to your group when the data is plotted.
One other thing: you may find that dimensionality reduction along the lines of PCA (*) can be helpful when using various classification methods, as you are essentially aggregating the related words. The first 10-50 principal components may be all that you need for document classification, given your sample size.
(*) Note: PCA is just a first step. It can be very interesting for someone just starting out with text mining and PCA, but you may eventually find that it is a bit of a nuisance for sparse data sets. As a first step, though, take a look at it, especially via the prcomp and princomp functions.
Update: I didn't state a preference in this answer - I recommend prcomp rather than princomp.
|
How well does R scale to text classification tasks? [closed]
As requested in a comment, here are some pointers for processing steps. A number of tools may be found at the CRAN Task View for Natural Language Processing. You may also want to look at this paper
|
9,336
|
How well does R scale to text classification tasks? [closed]
|
First, welcome! Text processing is lots of fun, and doing it in R is getting easier all the time.
The short answer: yes - the tools in R are now quite good for dealing with this kind of data. In fact, there's nothing special about R, C++, Groovy, Scala, or any other language when it comes to data storage in RAM: every language stores an 8 byte double float in...wait for it...wait for it... 8 bytes!
The algorithms and their implementation do matter, especially if implemented very poorly with regard to data structures and computational complexity. If you are implementing your own algorithms, just take care. If using other code, caveat emptor applies, as it does in any environment.
For R, you will need to consider:
Your data representation (look at sparse matrices, especially in the Matrix package)
Data storage (perhaps memory mapped, using bigmemory or ff; or distributed, using Hadoop)
Your partitioning of data (how much can you fit in RAM is dependent on how much RAM you have)
The last point is really under your control.
When it comes to this dimensionality, it's not particularly big anymore. The # of observations will be more of an impact, but you can partition your data to adjust for RAM usage, so there's not really much to get too worried about.
|
How well does R scale to text classification tasks? [closed]
|
First, welcome! Text processing is lots of fun, and doing it in R is getting easier all the time.
The short answer: yes - the tools in R are now quite good for dealing with this kind of data. In fac
|
How well does R scale to text classification tasks? [closed]
First, welcome! Text processing is lots of fun, and doing it in R is getting easier all the time.
The short answer: yes - the tools in R are now quite good for dealing with this kind of data. In fact, there's nothing special about R, C++, Groovy, Scala, or any other language when it comes to data storage in RAM: every language stores an 8 byte double float in...wait for it...wait for it... 8 bytes!
The algorithms and their implementation do matter, especially if implemented very poorly with regard to data structures and computational complexity. If you are implementing your own algorithms, just take care. If using other code, caveat emptor applies, as it does in any environment.
For R, you will need to consider:
Your data representation (look at sparse matrices, especially in the Matrix package)
Data storage (perhaps memory mapped, using bigmemory or ff; or distributed, using Hadoop)
Your partitioning of data (how much can you fit in RAM is dependent on how much RAM you have)
The last point is really under your control.
When it comes to this dimensionality, it's not particularly big anymore. The # of observations will be more of an impact, but you can partition your data to adjust for RAM usage, so there's not really much to get too worried about.
|
How well does R scale to text classification tasks? [closed]
First, welcome! Text processing is lots of fun, and doing it in R is getting easier all the time.
The short answer: yes - the tools in R are now quite good for dealing with this kind of data. In fac
|
9,337
|
How well does R scale to text classification tasks? [closed]
|
I agree with crayola that the number of rows is crucial here. For RF you will need at least 3x more RAM than your dataset weights and probably a lot of time (such number of attributes usually requires a lot of trees in the forest -- and note that there is no parallel implementation of RF in R).
About SVM, I doubt it is a good idea to fight with 300k dimensions while you probably can develop a kernel function that will be equivalent to your descriptors of text.
EDIT:
3k x 30k (real) matrix would occupy something like 7Gb, so all you need to do RF (using randomForest) on this data is a computer with 16GB RAM, some luck and quite a bit of time or just a computer with 24GB RAM and quite a bit of time.
|
How well does R scale to text classification tasks? [closed]
|
I agree with crayola that the number of rows is crucial here. For RF you will need at least 3x more RAM than your dataset weights and probably a lot of time (such number of attributes usually requires
|
How well does R scale to text classification tasks? [closed]
I agree with crayola that the number of rows is crucial here. For RF you will need at least 3x more RAM than your dataset weights and probably a lot of time (such number of attributes usually requires a lot of trees in the forest -- and note that there is no parallel implementation of RF in R).
About SVM, I doubt it is a good idea to fight with 300k dimensions while you probably can develop a kernel function that will be equivalent to your descriptors of text.
EDIT:
3k x 30k (real) matrix would occupy something like 7Gb, so all you need to do RF (using randomForest) on this data is a computer with 16GB RAM, some luck and quite a bit of time or just a computer with 24GB RAM and quite a bit of time.
|
How well does R scale to text classification tasks? [closed]
I agree with crayola that the number of rows is crucial here. For RF you will need at least 3x more RAM than your dataset weights and probably a lot of time (such number of attributes usually requires
|
9,338
|
How to interpret these acf and pacf plots
|
looking at plots in order to try to pigeonhole the data into a guessed arima model works well when 1: There are no outliers/pulses/level shifts, local time trends and no seasonal deterministic pulses in the data AND 2) when the arima model has constant parameters over time AND 3) when the error variance from the arima model has constant variance over time. When do these three things hold .... in most textbook data sets presenting the ease of arima modelling. When do 1 or more of the 3 not hold .... in every real world data set that I have ever seen . The simple answer to your question requires access to the original facts ( the historical data ) not the secondary descriptive information in your plots. But this is just my opinion!
EDITED AFTER RECEIPT OF DATA:
I was on a Greek vacation (actually doing something other than time series analysis) and was unable to analyse the SUICIDE DATA but in conjunction with this post. It is now fitting and right that I submit an analysis to follow up/prove by example my comments about multi-stage model identification strategies and the failings of simple visual analysis of simple correlation plots as "the proof is in the pudding".
Here is the ACF of the original data The PACF of the original series . AUTOBOX http://www.autobox.com/cms/ a piece of software that I have helped developed uses heuristics to identify a starting model In this case the initially identified model was found to be . Diagnostic checking of the residuals from this model suggested some model augmentation using a level shift, pulses and a seasonal pulse Note that the Level Shift is detected at or about period 164 which is nearly identical to an earlier conclusion about period 176 from @forecaster. All roads do not lead to Rome but some can get you close ! . Testing for parameter constancy rejected parameter changes over time . Checking for deterministic changes in the error variance concluded that no deterministic changes were detected in the error variance. . The Box-Cox test for the need for a power transform was positive with the conclusion that a logarithmic transform was necessary. . The final model is here . The residuals from the final model appear to be free of any autocorrelation . The plot of the final models residuals appears to be free of any Gaussian Violations . The plot of Actual/Fit/Forecasts is here with forecasts here
|
How to interpret these acf and pacf plots
|
looking at plots in order to try to pigeonhole the data into a guessed arima model works well when 1: There are no outliers/pulses/level shifts, local time trends and no seasonal deterministic pulses
|
How to interpret these acf and pacf plots
looking at plots in order to try to pigeonhole the data into a guessed arima model works well when 1: There are no outliers/pulses/level shifts, local time trends and no seasonal deterministic pulses in the data AND 2) when the arima model has constant parameters over time AND 3) when the error variance from the arima model has constant variance over time. When do these three things hold .... in most textbook data sets presenting the ease of arima modelling. When do 1 or more of the 3 not hold .... in every real world data set that I have ever seen . The simple answer to your question requires access to the original facts ( the historical data ) not the secondary descriptive information in your plots. But this is just my opinion!
EDITED AFTER RECEIPT OF DATA:
I was on a Greek vacation (actually doing something other than time series analysis) and was unable to analyse the SUICIDE DATA but in conjunction with this post. It is now fitting and right that I submit an analysis to follow up/prove by example my comments about multi-stage model identification strategies and the failings of simple visual analysis of simple correlation plots as "the proof is in the pudding".
Here is the ACF of the original data The PACF of the original series . AUTOBOX http://www.autobox.com/cms/ a piece of software that I have helped developed uses heuristics to identify a starting model In this case the initially identified model was found to be . Diagnostic checking of the residuals from this model suggested some model augmentation using a level shift, pulses and a seasonal pulse Note that the Level Shift is detected at or about period 164 which is nearly identical to an earlier conclusion about period 176 from @forecaster. All roads do not lead to Rome but some can get you close ! . Testing for parameter constancy rejected parameter changes over time . Checking for deterministic changes in the error variance concluded that no deterministic changes were detected in the error variance. . The Box-Cox test for the need for a power transform was positive with the conclusion that a logarithmic transform was necessary. . The final model is here . The residuals from the final model appear to be free of any autocorrelation . The plot of the final models residuals appears to be free of any Gaussian Violations . The plot of Actual/Fit/Forecasts is here with forecasts here
|
How to interpret these acf and pacf plots
looking at plots in order to try to pigeonhole the data into a guessed arima model works well when 1: There are no outliers/pulses/level shifts, local time trends and no seasonal deterministic pulses
|
9,339
|
How to interpret these acf and pacf plots
|
Interpretation of the ACF and PACF
The slow decay of the autocorrelation function suggests the data follow a long-memory process. The duration of shocks is relatively persistent and influence the data several observations ahead. This is probably reflected by a
smooth trending pattern in the data.
The ACF and PACF of order 12 are beyond the significance confidence bands. However, this does not necessarily mean the presence of an identifiable seasonal pattern. The ACF and PACF of other seasonal orders (24, 36, 48, 60) are within the confidence bands. From the graphic, it is not possible to conclude whether the significance of the ACF and PACF of order 12 is due to seasonality or transitory fluctuations.
The persistence of the ACF mentioned before suggests that first differences may be needed to render the data stationary. However, the ACF/PACF of the differenced series look suspicious, negative correlation may have been induced by the differencing filter and may not be actually appropriate. See this post for some details.
Determine if seasonality is present
The analysis of the ACF and PACF should be complemented with other tools, for example:
Spectrum (a view to the ACF in the frequency domain), may reveal the periodicity of cycles that explain most of the variability in the data.
Fit the basic structural time series model and check if the variance of the seasonal component is close to zero relatively to the other parameters (in R function stats::StructTS and package stsm).
Tests for seasonality, based on seasonal dummies, seasonal cycles or those described and implemented in X-12.
Checking for the presence of pulses and level shifts as mentioned by IrishStat is also necessary since they can distort the conclusions from the previous methods (in R the package tsoutliers can be useful to this end).
|
How to interpret these acf and pacf plots
|
Interpretation of the ACF and PACF
The slow decay of the autocorrelation function suggests the data follow a long-memory process. The duration of shocks is relatively persistent and influence the data
|
How to interpret these acf and pacf plots
Interpretation of the ACF and PACF
The slow decay of the autocorrelation function suggests the data follow a long-memory process. The duration of shocks is relatively persistent and influence the data several observations ahead. This is probably reflected by a
smooth trending pattern in the data.
The ACF and PACF of order 12 are beyond the significance confidence bands. However, this does not necessarily mean the presence of an identifiable seasonal pattern. The ACF and PACF of other seasonal orders (24, 36, 48, 60) are within the confidence bands. From the graphic, it is not possible to conclude whether the significance of the ACF and PACF of order 12 is due to seasonality or transitory fluctuations.
The persistence of the ACF mentioned before suggests that first differences may be needed to render the data stationary. However, the ACF/PACF of the differenced series look suspicious, negative correlation may have been induced by the differencing filter and may not be actually appropriate. See this post for some details.
Determine if seasonality is present
The analysis of the ACF and PACF should be complemented with other tools, for example:
Spectrum (a view to the ACF in the frequency domain), may reveal the periodicity of cycles that explain most of the variability in the data.
Fit the basic structural time series model and check if the variance of the seasonal component is close to zero relatively to the other parameters (in R function stats::StructTS and package stsm).
Tests for seasonality, based on seasonal dummies, seasonal cycles or those described and implemented in X-12.
Checking for the presence of pulses and level shifts as mentioned by IrishStat is also necessary since they can distort the conclusions from the previous methods (in R the package tsoutliers can be useful to this end).
|
How to interpret these acf and pacf plots
Interpretation of the ACF and PACF
The slow decay of the autocorrelation function suggests the data follow a long-memory process. The duration of shocks is relatively persistent and influence the data
|
9,340
|
Choosing a bandwidth for kernel density estimators
|
For a univariate KDE, you are better off using something other than Silverman's rule which is based on a normal approximation. One excellent approach is the Sheather-Jones method, easily implemented in R; for example,
plot(density(precip, bw="SJ"))
The situation for multivariate KDE is not so well studied, and the tools are not so mature. Rather than a bandwidth, you need a bandwidth matrix. To simplify the problem, most people assume a diagonal matrix, although this may not lead to the best results. The ks package in R provides some very useful tools including allowing a full (not necessarily diagonal) bandwidth matrix.
|
Choosing a bandwidth for kernel density estimators
|
For a univariate KDE, you are better off using something other than Silverman's rule which is based on a normal approximation. One excellent approach is the Sheather-Jones method, easily implemented i
|
Choosing a bandwidth for kernel density estimators
For a univariate KDE, you are better off using something other than Silverman's rule which is based on a normal approximation. One excellent approach is the Sheather-Jones method, easily implemented in R; for example,
plot(density(precip, bw="SJ"))
The situation for multivariate KDE is not so well studied, and the tools are not so mature. Rather than a bandwidth, you need a bandwidth matrix. To simplify the problem, most people assume a diagonal matrix, although this may not lead to the best results. The ks package in R provides some very useful tools including allowing a full (not necessarily diagonal) bandwidth matrix.
|
Choosing a bandwidth for kernel density estimators
For a univariate KDE, you are better off using something other than Silverman's rule which is based on a normal approximation. One excellent approach is the Sheather-Jones method, easily implemented i
|
9,341
|
Choosing a bandwidth for kernel density estimators
|
For univariate kernel density estimation, the bandwidth can be estimated by Normal reference rule or Cross Validation method or plug-in approach.
For multivariate kernel density estimation, a Bayesian bandwidth selection method may be utilized, see Zhang, X., M.L. King and R.J. Hyndman (2006), A Bayesian approach to bandwidth selection for multivariate kernel density estimation, Computational Statistics and Data Analysis, 50, 3009-3031
|
Choosing a bandwidth for kernel density estimators
|
For univariate kernel density estimation, the bandwidth can be estimated by Normal reference rule or Cross Validation method or plug-in approach.
For multivariate kernel density estimation, a Bayesia
|
Choosing a bandwidth for kernel density estimators
For univariate kernel density estimation, the bandwidth can be estimated by Normal reference rule or Cross Validation method or plug-in approach.
For multivariate kernel density estimation, a Bayesian bandwidth selection method may be utilized, see Zhang, X., M.L. King and R.J. Hyndman (2006), A Bayesian approach to bandwidth selection for multivariate kernel density estimation, Computational Statistics and Data Analysis, 50, 3009-3031
|
Choosing a bandwidth for kernel density estimators
For univariate kernel density estimation, the bandwidth can be estimated by Normal reference rule or Cross Validation method or plug-in approach.
For multivariate kernel density estimation, a Bayesia
|
9,342
|
Clustering a binary matrix
|
Latent class analysis is one possible approach.
Take the following probability distribution where A, B, and C can take on values of 1 or 0.
$P(A_i, B_j, C_k)$
If these were independent of each other, then we would expect to see:
$P(A_i, B_j, C_k)=P(A_i)P(B_j)P(C_k)$
Once this possiblity is eliminated, we might hypothesize that any observed dependency is due to values clustering within otherwise unobserved subgroups. To test this idea, we can estimate the following model:
$P(A_i, B_j, C_k)=P(X_n)P(A_i|X_n)P(B_j|X_n)P(C_k|X_n)$
Where $X$ is a latent categorical variable with $n$ levels. You specfy $n$, and the model parameters (marginal probabilities of class membership, and class specific probabilities for each variable) can be estimated via expectation-maximization.
In practice, you could estimate several models, with $5 \le n \le 10$, and "choose" the best model based on theory, likelihood based fit indices, and classification quality (which can be assessed by calculating posterior probabilities of class membership for the observations).
However, trying to identify meaningful patterns in 100 variables with 5-10 groups will likely require reducing that list down prior to estimating the model, which is a tricky enough topic in its own right (REF).
|
Clustering a binary matrix
|
Latent class analysis is one possible approach.
Take the following probability distribution where A, B, and C can take on values of 1 or 0.
$P(A_i, B_j, C_k)$
If these were independent of each other,
|
Clustering a binary matrix
Latent class analysis is one possible approach.
Take the following probability distribution where A, B, and C can take on values of 1 or 0.
$P(A_i, B_j, C_k)$
If these were independent of each other, then we would expect to see:
$P(A_i, B_j, C_k)=P(A_i)P(B_j)P(C_k)$
Once this possiblity is eliminated, we might hypothesize that any observed dependency is due to values clustering within otherwise unobserved subgroups. To test this idea, we can estimate the following model:
$P(A_i, B_j, C_k)=P(X_n)P(A_i|X_n)P(B_j|X_n)P(C_k|X_n)$
Where $X$ is a latent categorical variable with $n$ levels. You specfy $n$, and the model parameters (marginal probabilities of class membership, and class specific probabilities for each variable) can be estimated via expectation-maximization.
In practice, you could estimate several models, with $5 \le n \le 10$, and "choose" the best model based on theory, likelihood based fit indices, and classification quality (which can be assessed by calculating posterior probabilities of class membership for the observations).
However, trying to identify meaningful patterns in 100 variables with 5-10 groups will likely require reducing that list down prior to estimating the model, which is a tricky enough topic in its own right (REF).
|
Clustering a binary matrix
Latent class analysis is one possible approach.
Take the following probability distribution where A, B, and C can take on values of 1 or 0.
$P(A_i, B_j, C_k)$
If these were independent of each other,
|
9,343
|
Clustering a binary matrix
|
Actually, frequent itemset mining may be a better choice than clustering on such data.
The usual vector-oriented set of algorithms does not make a lot of sense. K-means for example will produce means that are no longer binary.
|
Clustering a binary matrix
|
Actually, frequent itemset mining may be a better choice than clustering on such data.
The usual vector-oriented set of algorithms does not make a lot of sense. K-means for example will produce means
|
Clustering a binary matrix
Actually, frequent itemset mining may be a better choice than clustering on such data.
The usual vector-oriented set of algorithms does not make a lot of sense. K-means for example will produce means that are no longer binary.
|
Clustering a binary matrix
Actually, frequent itemset mining may be a better choice than clustering on such data.
The usual vector-oriented set of algorithms does not make a lot of sense. K-means for example will produce means
|
9,344
|
Is PCA unstable under multicollinearity?
|
The answer might be given in even simpler terms: the multiple regression has one step more than the pca if seen in terms of linear algebra, and from the second step the instability comes into existence:
The first step of pca and mult. regression can be seen as factoring of the correlation-matrix $R$ into two cholesky factors $L \cdot L^t$ , which are triangular -and which is indifferent to low or high correlations. (The pca can then be seen as a rotation of that (triangular) cholesky-factor to pc-position (this is called Jacobi-rotation as far as I remember)
The mult. regression procedure is the to apply an inversion of that cholesky factor $L$ minus the row and column of the dependent variable, which is conveniently in the last row of the correlation-matrix.
The instability comes into play here: if the independent variables are highly correlated, then the diagonal of the cholesky factor $L$ can degenerate to very small numeric values - and to invert that introduces then the problem of division by nearly-zero.
|
Is PCA unstable under multicollinearity?
|
The answer might be given in even simpler terms: the multiple regression has one step more than the pca if seen in terms of linear algebra, and from the second step the instability comes into existenc
|
Is PCA unstable under multicollinearity?
The answer might be given in even simpler terms: the multiple regression has one step more than the pca if seen in terms of linear algebra, and from the second step the instability comes into existence:
The first step of pca and mult. regression can be seen as factoring of the correlation-matrix $R$ into two cholesky factors $L \cdot L^t$ , which are triangular -and which is indifferent to low or high correlations. (The pca can then be seen as a rotation of that (triangular) cholesky-factor to pc-position (this is called Jacobi-rotation as far as I remember)
The mult. regression procedure is the to apply an inversion of that cholesky factor $L$ minus the row and column of the dependent variable, which is conveniently in the last row of the correlation-matrix.
The instability comes into play here: if the independent variables are highly correlated, then the diagonal of the cholesky factor $L$ can degenerate to very small numeric values - and to invert that introduces then the problem of division by nearly-zero.
|
Is PCA unstable under multicollinearity?
The answer might be given in even simpler terms: the multiple regression has one step more than the pca if seen in terms of linear algebra, and from the second step the instability comes into existenc
|
9,345
|
Is PCA unstable under multicollinearity?
|
PCA is often a means to an ends; leading up to either inputs to a multiple regression or for use in a cluster analysis. I think in your case, you are talking about using the results of a PCA to perform a regression.
In that case, your objective of performing a PCA is to get rid of mulitcollinearity and get orthogonal inputs to a multiple regression, not surprisingly this is called Principal Components Regression. Here, if all your original inputs were orthogonal then doing a PCA would give you another set of orthogonal inputs. Therefore; if you are doing a PCA, one would assume that your inputs have multicollinearity.
Given the above, you would want to do PCA to get a few input variable from a problem that has a number of inputs. To determine how many of those new orthogonal variables you should retain, a scree plot is often used (Johnson & Wichern, 2001, p. 445). If you have a large number of observations, then you could also use the rule of thumb that with $\hat{ \lambda_{i} }$ as the $i^{th}$ largest estimated eigenvalue only use up to and including those values where $\frac{ \hat{ \lambda_{i} } }{p}$ are greater than or equal to one (Johnson & Wichern, 2001, p. 451).
References
Johnson & Wichern (2001). Applied Multivariate Statistical Analysis (6th Edition). Prentice Hall.
|
Is PCA unstable under multicollinearity?
|
PCA is often a means to an ends; leading up to either inputs to a multiple regression or for use in a cluster analysis. I think in your case, you are talking about using the results of a PCA to perfor
|
Is PCA unstable under multicollinearity?
PCA is often a means to an ends; leading up to either inputs to a multiple regression or for use in a cluster analysis. I think in your case, you are talking about using the results of a PCA to perform a regression.
In that case, your objective of performing a PCA is to get rid of mulitcollinearity and get orthogonal inputs to a multiple regression, not surprisingly this is called Principal Components Regression. Here, if all your original inputs were orthogonal then doing a PCA would give you another set of orthogonal inputs. Therefore; if you are doing a PCA, one would assume that your inputs have multicollinearity.
Given the above, you would want to do PCA to get a few input variable from a problem that has a number of inputs. To determine how many of those new orthogonal variables you should retain, a scree plot is often used (Johnson & Wichern, 2001, p. 445). If you have a large number of observations, then you could also use the rule of thumb that with $\hat{ \lambda_{i} }$ as the $i^{th}$ largest estimated eigenvalue only use up to and including those values where $\frac{ \hat{ \lambda_{i} } }{p}$ are greater than or equal to one (Johnson & Wichern, 2001, p. 451).
References
Johnson & Wichern (2001). Applied Multivariate Statistical Analysis (6th Edition). Prentice Hall.
|
Is PCA unstable under multicollinearity?
PCA is often a means to an ends; leading up to either inputs to a multiple regression or for use in a cluster analysis. I think in your case, you are talking about using the results of a PCA to perfor
|
9,346
|
Variance estimates in k-fold cross-validation
|
Very interesting question, I'll have to read the papers you give... But maybe this will start us in direction of an answer:
I usually tackle this problem in a very pragmatic way: I iterate the k-fold cross validation with new random splits and calculate performance just as usual for each iteration. The overall test samples are then the same for each iteration, and the differences come from different splits of the data.
This I report e.g. as the 5th to 95th percentile of observed performance wrt. exchanging up to $\frac{n}{k} - 1$ samples for new samples and discuss it as a measure for model instability.
Side note: I anyways cannot use formulas that need the sample size. As my data are clustered or hierarchical in structure (many similar but not repeated measurements of the same case, usually several [hundred] different locations of the same specimen) I don't know the effective sample size.
comparison to bootstrapping:
iterations use new random splits.
the main difference is resampling with (bootstrap) or without (cv) replacement.
computational cost is about the same, as I'd choose no of iterations of cv $\approx$ no of bootstrap iterations / k, i.e. calculate the same total no of models.
bootstrap has advantages over cv in terms of some statistical properties (asymptotically correct, possibly you need less iterations to obtain a good estimate)
however, with cv you have the advantage that you are guaranteed that
the number of distinct training samples is the same for all models (important if you want to calculate learning curves)
each sample is tested exactly once in each iteration
some classification methods will discard repeated samples, so bootstrapping does not make sense
Variance for the performance
short answer: yes it does make sense to speak of variance in situation where only {0,1} outcomes exist.
Have a look at the binomial distribution (k = successes, n = tests, p = true probability for success = average k / n):
$\sigma^2 (k) = np(1-p)$
The variance of proportions (such as hit rate, error rate, sensitivity, TPR,..., I'll use $p$ from now on and $\hat p$ for the observed value in a test) is a topic that fills whole books...
Fleiss: Statistical Methods for Rates and Proportions
Forthofer and Lee: Biostatistics has a nice introduction.
Now, $\hat p = \frac{k}{n}$ and therefore:
$\sigma^2 (\hat p) = \frac{p (1-p)}{n}$
This means that the uncertainty for measuring classifier performance depends only on the true performance p of the tested model and the number of test samples.
In cross validation you assume
that the k "surrogate" models have the same true performance as the "real" model you usually build from all samples. (The breakdown of this assumption is the well-known pessimistic bias).
that the k "surrogate" models have the same true performance (are equivalent, have stable predictions), so you are allowed to pool the results of the k tests.
Of course then not only the k "surrogate" models of one iteration of cv can be pooled but the ki models of i iterations of k-fold cv.
Why iterate?
The main thing the iterations tell you is the model (prediction) instability, i.e. variance of the predictions of different models for the same sample.
You can directly report instability as e.g. the variance in prediction of a given test case regardless whether the prediction is correct or a bit more indirectly as the variance of $\hat p$ for different cv iterations.
And yes, this is important information.
Now, if your models are perfectly stable, all $n_{bootstrap}$ or $k \cdot n_{iter.~cv}$ would produce exactly the same prediction for a given sample. In other words, all iterations would have the same outcome. The variance of the estimate would not be reduced by the iteration (assuming $n - 1 \approx n$). In that case, assumption 2 from above is met and you are subject only to $\sigma^2 (\hat p) = \frac{p (1-p)}{n}$ with n being the total number of samples tested in all k folds of the cv.
In that case, iterations are not needed (other than for demonstrating stability).
You can then construct confidence intervals for the true performance $p$ from the observed no of successes $k$ in the $n$ tests. So, strictly, there is no need to report the variance uncertainty if $\hat p$ and $n$ are reported. However, in my field, not many people are aware of that or even have an intuitive grip on how large the uncertainty is with what sample size. So I'd recommend to report it anyways.
If you observe model instability, the pooled average is a better estimate of the true performance. The variance between the iterations is an important information, and you could compare it to the expected minimal variance for a test set of size n with true performance average performance over all iterations.
|
Variance estimates in k-fold cross-validation
|
Very interesting question, I'll have to read the papers you give... But maybe this will start us in direction of an answer:
I usually tackle this problem in a very pragmatic way: I iterate the k-fold
|
Variance estimates in k-fold cross-validation
Very interesting question, I'll have to read the papers you give... But maybe this will start us in direction of an answer:
I usually tackle this problem in a very pragmatic way: I iterate the k-fold cross validation with new random splits and calculate performance just as usual for each iteration. The overall test samples are then the same for each iteration, and the differences come from different splits of the data.
This I report e.g. as the 5th to 95th percentile of observed performance wrt. exchanging up to $\frac{n}{k} - 1$ samples for new samples and discuss it as a measure for model instability.
Side note: I anyways cannot use formulas that need the sample size. As my data are clustered or hierarchical in structure (many similar but not repeated measurements of the same case, usually several [hundred] different locations of the same specimen) I don't know the effective sample size.
comparison to bootstrapping:
iterations use new random splits.
the main difference is resampling with (bootstrap) or without (cv) replacement.
computational cost is about the same, as I'd choose no of iterations of cv $\approx$ no of bootstrap iterations / k, i.e. calculate the same total no of models.
bootstrap has advantages over cv in terms of some statistical properties (asymptotically correct, possibly you need less iterations to obtain a good estimate)
however, with cv you have the advantage that you are guaranteed that
the number of distinct training samples is the same for all models (important if you want to calculate learning curves)
each sample is tested exactly once in each iteration
some classification methods will discard repeated samples, so bootstrapping does not make sense
Variance for the performance
short answer: yes it does make sense to speak of variance in situation where only {0,1} outcomes exist.
Have a look at the binomial distribution (k = successes, n = tests, p = true probability for success = average k / n):
$\sigma^2 (k) = np(1-p)$
The variance of proportions (such as hit rate, error rate, sensitivity, TPR,..., I'll use $p$ from now on and $\hat p$ for the observed value in a test) is a topic that fills whole books...
Fleiss: Statistical Methods for Rates and Proportions
Forthofer and Lee: Biostatistics has a nice introduction.
Now, $\hat p = \frac{k}{n}$ and therefore:
$\sigma^2 (\hat p) = \frac{p (1-p)}{n}$
This means that the uncertainty for measuring classifier performance depends only on the true performance p of the tested model and the number of test samples.
In cross validation you assume
that the k "surrogate" models have the same true performance as the "real" model you usually build from all samples. (The breakdown of this assumption is the well-known pessimistic bias).
that the k "surrogate" models have the same true performance (are equivalent, have stable predictions), so you are allowed to pool the results of the k tests.
Of course then not only the k "surrogate" models of one iteration of cv can be pooled but the ki models of i iterations of k-fold cv.
Why iterate?
The main thing the iterations tell you is the model (prediction) instability, i.e. variance of the predictions of different models for the same sample.
You can directly report instability as e.g. the variance in prediction of a given test case regardless whether the prediction is correct or a bit more indirectly as the variance of $\hat p$ for different cv iterations.
And yes, this is important information.
Now, if your models are perfectly stable, all $n_{bootstrap}$ or $k \cdot n_{iter.~cv}$ would produce exactly the same prediction for a given sample. In other words, all iterations would have the same outcome. The variance of the estimate would not be reduced by the iteration (assuming $n - 1 \approx n$). In that case, assumption 2 from above is met and you are subject only to $\sigma^2 (\hat p) = \frac{p (1-p)}{n}$ with n being the total number of samples tested in all k folds of the cv.
In that case, iterations are not needed (other than for demonstrating stability).
You can then construct confidence intervals for the true performance $p$ from the observed no of successes $k$ in the $n$ tests. So, strictly, there is no need to report the variance uncertainty if $\hat p$ and $n$ are reported. However, in my field, not many people are aware of that or even have an intuitive grip on how large the uncertainty is with what sample size. So I'd recommend to report it anyways.
If you observe model instability, the pooled average is a better estimate of the true performance. The variance between the iterations is an important information, and you could compare it to the expected minimal variance for a test set of size n with true performance average performance over all iterations.
|
Variance estimates in k-fold cross-validation
Very interesting question, I'll have to read the papers you give... But maybe this will start us in direction of an answer:
I usually tackle this problem in a very pragmatic way: I iterate the k-fold
|
9,347
|
Variance estimates in k-fold cross-validation
|
Remember CV is an estimate only and can never represent the 'real' generalisation error.
Depending on your sample size (which will impact your number of folds or fold size) you can be severely limited in your ability to calculate any parameter estimates of the distribution of the generalisation error.
In my opinion (and I've seen it purported in various text books, 'Knowledge Discovery with Support Vector Machines'-Lutz Hamel)you can do some bootstrapping variant of CV to estimate the distribution of the generalisation error, but a standard 10-1 (for example) once off CV will not give you enough data points to make inferences about the true gen-error.
Bootstrapping requires you to take multiple samples with replacement from your training/test/val effectively doing multiple (say 1000 or so) 10-1 (or whatever) CV tests.
You then take your sample distribtion of averages for each CV test as an estimate of the sampling distribution of the mean for the population of CV errors and from this you can estimate distributional parameters i.e. mean, median, std min max Q1 Q3 etc...
It's a bit of work, and in my opinion only really required if your application is important/risky enough to warrant the extra work. i.e. perhaps in a marketing environment where the business is simply happy to be better than random then maybe not required.
BUT if you are trying to evaluate patient reactions to high risk drugs or predict income expectations for large investments you may well be prudent to carry it out.
|
Variance estimates in k-fold cross-validation
|
Remember CV is an estimate only and can never represent the 'real' generalisation error.
Depending on your sample size (which will impact your number of folds or fold size) you can be severely limited
|
Variance estimates in k-fold cross-validation
Remember CV is an estimate only and can never represent the 'real' generalisation error.
Depending on your sample size (which will impact your number of folds or fold size) you can be severely limited in your ability to calculate any parameter estimates of the distribution of the generalisation error.
In my opinion (and I've seen it purported in various text books, 'Knowledge Discovery with Support Vector Machines'-Lutz Hamel)you can do some bootstrapping variant of CV to estimate the distribution of the generalisation error, but a standard 10-1 (for example) once off CV will not give you enough data points to make inferences about the true gen-error.
Bootstrapping requires you to take multiple samples with replacement from your training/test/val effectively doing multiple (say 1000 or so) 10-1 (or whatever) CV tests.
You then take your sample distribtion of averages for each CV test as an estimate of the sampling distribution of the mean for the population of CV errors and from this you can estimate distributional parameters i.e. mean, median, std min max Q1 Q3 etc...
It's a bit of work, and in my opinion only really required if your application is important/risky enough to warrant the extra work. i.e. perhaps in a marketing environment where the business is simply happy to be better than random then maybe not required.
BUT if you are trying to evaluate patient reactions to high risk drugs or predict income expectations for large investments you may well be prudent to carry it out.
|
Variance estimates in k-fold cross-validation
Remember CV is an estimate only and can never represent the 'real' generalisation error.
Depending on your sample size (which will impact your number of folds or fold size) you can be severely limited
|
9,348
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
There is a blog posting by the authors that describes this at a high level.
To quote from early in that posting:
In order to reduce the number of variables and simplify our task, we
first select some promising looking variables, for example, those that
have a positive correlation with the response variable (systolic blood
pressure). We then fit a linear regression model on the selected
variables. To measure the goodness of our model fit, we crank out a
standard F-test from our favorite statistics textbook and report the
resulting p-value.
Freedman showed that the reported p-value is highly misleading - even
if the data were completely random with no correlation whatsoever
between the response variable and the data points, we’d likely observe
a significant p-value! The bias stems from the fact that we selected a
subset of the variables adaptively based on the data, but we never
account for this fact. There is a huge number of possible subsets of
variables that we selected from. The mere fact that we chose one test
over the other by peeking at the data creates a selection bias that
invalidates the assumptions underlying the F-test.
Freedman’s paradox bears an important lesson. Significance levels of
standard procedures do not capture the vast number of analyses one can
choose to carry out or to omit. For this reason, adaptivity is one of
the primary explanations of why research findings are frequently false
as was argued by Gelman and Loken who aptly refer to adaptivity as
“garden of the forking paths”.
I can't see how their technique addresses this issue at all. So in answer to your question I believe that they don't address the Garden of Forking Paths, and in that sense their technique will lull people into a false sense of security. Not much different from saying "I used cross-validation" lulls many -- who used non-nested CV -- into a false sense of security.
It seems to me that the bulk of the blog posting points to their technique as a better answer to how to keep participants in a Kaggle-style competition from climbing the test set gradient. Which is useful, but doesn't directly address the Forking Paths. It feels like it has the flavor of the Wolfram and Google's New Science where massive amounts of data will take over. That narrative has a mixed record, and I'm always skeptical of automated magic.
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
There is a blog posting by the authors that describes this at a high level.
To quote from early in that posting:
In order to reduce the number of variables and simplify our task, we
first select so
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
There is a blog posting by the authors that describes this at a high level.
To quote from early in that posting:
In order to reduce the number of variables and simplify our task, we
first select some promising looking variables, for example, those that
have a positive correlation with the response variable (systolic blood
pressure). We then fit a linear regression model on the selected
variables. To measure the goodness of our model fit, we crank out a
standard F-test from our favorite statistics textbook and report the
resulting p-value.
Freedman showed that the reported p-value is highly misleading - even
if the data were completely random with no correlation whatsoever
between the response variable and the data points, we’d likely observe
a significant p-value! The bias stems from the fact that we selected a
subset of the variables adaptively based on the data, but we never
account for this fact. There is a huge number of possible subsets of
variables that we selected from. The mere fact that we chose one test
over the other by peeking at the data creates a selection bias that
invalidates the assumptions underlying the F-test.
Freedman’s paradox bears an important lesson. Significance levels of
standard procedures do not capture the vast number of analyses one can
choose to carry out or to omit. For this reason, adaptivity is one of
the primary explanations of why research findings are frequently false
as was argued by Gelman and Loken who aptly refer to adaptivity as
“garden of the forking paths”.
I can't see how their technique addresses this issue at all. So in answer to your question I believe that they don't address the Garden of Forking Paths, and in that sense their technique will lull people into a false sense of security. Not much different from saying "I used cross-validation" lulls many -- who used non-nested CV -- into a false sense of security.
It seems to me that the bulk of the blog posting points to their technique as a better answer to how to keep participants in a Kaggle-style competition from climbing the test set gradient. Which is useful, but doesn't directly address the Forking Paths. It feels like it has the flavor of the Wolfram and Google's New Science where massive amounts of data will take over. That narrative has a mixed record, and I'm always skeptical of automated magic.
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
There is a blog posting by the authors that describes this at a high level.
To quote from early in that posting:
In order to reduce the number of variables and simplify our task, we
first select so
|
9,349
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
The claim that adding noise helps prevent overfitting really does hold water here, since what they are really doing is limiting how the holdout is reused. Their method actually does two things: it limits the number of questions that can be asked of the holdout, and how much of each of the answers reveals about the holdout data.
It might help to understand what the benchmarks are: one on hand, you can just insist that the holdout be used only once. That has clear drawbacks. On the other hand, if you want to be able to use the holdout $k$ times, you could chop it into $k$ disjoint pieces, and use each piece once. The problem with that method is that it loses a lot of power (if you had $n$ data points in your holdout sample to begin with, you are now getting the statistical power of only $n/k$ samples).
The Dwork et al paper gives a method which, even with adversarially posed questions, gives you an effective sample size of about $n/\sqrt{k}$ for each of the $k$ questions you ask. Furthermore, they can do better if the questions are "not too nasty" (in a sense that is a bit hard to pin down, so let's ignore that for now).
The heart of their method is a relationship between algorithmic stability and overfitting, which dates back to the late 1970's (Devroye and Wagner 1978). Roughly, it says
"Let $A$ be an algorithm that takes a data set $X$ as input and outputs the description of a predicate $q=A(X)$. If $A$ is "stable" and $X$ is drawn i.i.d from a population $P$, then the empirical frequency of $q$ in $x$ is about the same as the frequency of $q$ in the population $P$."
Dwork et al. suggest using a notion of stability that controls how the distribution of answers changes as the data set changes (called differential privacy). It has the useful property that if $A(\cdot)$ is differentially private, then so is $f(A(\cdot))$, for any function $f$. In other words, for the stability analysis to go through, the predicate $q$ doesn't have to be the output of $A$ --- any predicate that is derived from $A$'s output will also enjoy the same type of guarantee.
There are now quite a few papers analyzing how different noise addition procedures control overfitting. A relatively readable one is that of Russo and Zou (https://arxiv.org/abs/1511.05219). Some more recent follow-up papers on the initial work of Dwork et al. might also be helpful to look at. (Disclaimer: I have two papers on the topic, the more recent one explaining a connection to adaptive hypothesis testing: https://arxiv.org/abs/1604.03924.)
Hope that all helps.
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
The claim that adding noise helps prevent overfitting really does hold water here, since what they are really doing is limiting how the holdout is reused. Their method actually does two things: it lim
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
The claim that adding noise helps prevent overfitting really does hold water here, since what they are really doing is limiting how the holdout is reused. Their method actually does two things: it limits the number of questions that can be asked of the holdout, and how much of each of the answers reveals about the holdout data.
It might help to understand what the benchmarks are: one on hand, you can just insist that the holdout be used only once. That has clear drawbacks. On the other hand, if you want to be able to use the holdout $k$ times, you could chop it into $k$ disjoint pieces, and use each piece once. The problem with that method is that it loses a lot of power (if you had $n$ data points in your holdout sample to begin with, you are now getting the statistical power of only $n/k$ samples).
The Dwork et al paper gives a method which, even with adversarially posed questions, gives you an effective sample size of about $n/\sqrt{k}$ for each of the $k$ questions you ask. Furthermore, they can do better if the questions are "not too nasty" (in a sense that is a bit hard to pin down, so let's ignore that for now).
The heart of their method is a relationship between algorithmic stability and overfitting, which dates back to the late 1970's (Devroye and Wagner 1978). Roughly, it says
"Let $A$ be an algorithm that takes a data set $X$ as input and outputs the description of a predicate $q=A(X)$. If $A$ is "stable" and $X$ is drawn i.i.d from a population $P$, then the empirical frequency of $q$ in $x$ is about the same as the frequency of $q$ in the population $P$."
Dwork et al. suggest using a notion of stability that controls how the distribution of answers changes as the data set changes (called differential privacy). It has the useful property that if $A(\cdot)$ is differentially private, then so is $f(A(\cdot))$, for any function $f$. In other words, for the stability analysis to go through, the predicate $q$ doesn't have to be the output of $A$ --- any predicate that is derived from $A$'s output will also enjoy the same type of guarantee.
There are now quite a few papers analyzing how different noise addition procedures control overfitting. A relatively readable one is that of Russo and Zou (https://arxiv.org/abs/1511.05219). Some more recent follow-up papers on the initial work of Dwork et al. might also be helpful to look at. (Disclaimer: I have two papers on the topic, the more recent one explaining a connection to adaptive hypothesis testing: https://arxiv.org/abs/1604.03924.)
Hope that all helps.
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
The claim that adding noise helps prevent overfitting really does hold water here, since what they are really doing is limiting how the holdout is reused. Their method actually does two things: it lim
|
9,350
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
I'm sure I'm over-simplifying this differential privacy technique here, but the idea makes sense in a high level.
When you get an algorithm to spit out good result (wow, the accuracy on my test set has really improved), you don't want to jump to conclusion right away. You want to accept it only when the improvement is significantly larger than the previous algorithm. That's the reason for adding noise.
EDIT :
This blog has good explanation and R codes to demo the effectiveness of the noise adder,
http://www.win-vector.com/blog/2015/10/a-simpler-explanation-of-differential-privacy/
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
I'm sure I'm over-simplifying this differential privacy technique here, but the idea makes sense in a high level.
When you get an algorithm to spit out good result (wow, the accuracy on my test set ha
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
I'm sure I'm over-simplifying this differential privacy technique here, but the idea makes sense in a high level.
When you get an algorithm to spit out good result (wow, the accuracy on my test set has really improved), you don't want to jump to conclusion right away. You want to accept it only when the improvement is significantly larger than the previous algorithm. That's the reason for adding noise.
EDIT :
This blog has good explanation and R codes to demo the effectiveness of the noise adder,
http://www.win-vector.com/blog/2015/10/a-simpler-explanation-of-differential-privacy/
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
I'm sure I'm over-simplifying this differential privacy technique here, but the idea makes sense in a high level.
When you get an algorithm to spit out good result (wow, the accuracy on my test set ha
|
9,351
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
I object to your second sentence. The idea that one's complete plan of data analysis should be determined in advance is unjustified, even in a setting where you are trying to confirm a preexisting scientific hypothesis. On the contrary, any decent data analysis will require some attention to the actual data that has been acquired. The researchers who believe otherwise are generally researchers who believe that significance testing is the beginning and the end of data analysis, with little to no role for descriptive statistics, plots, estimation, prediction, model selection, etc. In that setting, the requirement to fix one's analytic plans in advance makes more sense because the conventional ways in which p-values are calculated require that the sample size and the tests to be conducted are decided in advance of seeing any data. This requirement hamstrings the analyst, and hence is one of many good reasons not to use significance tests.
You might object that letting the analyst choose what to do after seeing the data allows overfitting. It does, but a good analyst will show all the analyses they conducted, say explicitly what information in the data was used to make analytic decisions, and use methods such as cross-validation appropriately. For example, it is generally fine to recode variables based on the obtained distribution of values, but choosing for some analysis the 3 predictors out of 100 that have the closest observed association to the dependent variable means the the estimates of association are going to be positively biased, by the principle of regression to the mean. If you want to do variable selection in a predictive context, you need to select variables inside your cross-validation folds, or using only the training data.
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
|
I object to your second sentence. The idea that one's complete plan of data analysis should be determined in advance is unjustified, even in a setting where you are trying to confirm a preexisting sci
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
I object to your second sentence. The idea that one's complete plan of data analysis should be determined in advance is unjustified, even in a setting where you are trying to confirm a preexisting scientific hypothesis. On the contrary, any decent data analysis will require some attention to the actual data that has been acquired. The researchers who believe otherwise are generally researchers who believe that significance testing is the beginning and the end of data analysis, with little to no role for descriptive statistics, plots, estimation, prediction, model selection, etc. In that setting, the requirement to fix one's analytic plans in advance makes more sense because the conventional ways in which p-values are calculated require that the sample size and the tests to be conducted are decided in advance of seeing any data. This requirement hamstrings the analyst, and hence is one of many good reasons not to use significance tests.
You might object that letting the analyst choose what to do after seeing the data allows overfitting. It does, but a good analyst will show all the analyses they conducted, say explicitly what information in the data was used to make analytic decisions, and use methods such as cross-validation appropriately. For example, it is generally fine to recode variables based on the obtained distribution of values, but choosing for some analysis the 3 predictors out of 100 that have the closest observed association to the dependent variable means the the estimates of association are going to be positively biased, by the principle of regression to the mean. If you want to do variable selection in a predictive context, you need to select variables inside your cross-validation folds, or using only the training data.
|
Has the journal Science endorsed the Garden of Forking Pathes Analyses?
I object to your second sentence. The idea that one's complete plan of data analysis should be determined in advance is unjustified, even in a setting where you are trying to confirm a preexisting sci
|
9,352
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
|
In a nutshell, Birnbaum's argument is that two widely accepted principles logically imply that the likelihood principle must hold. The counter-argument of Mayo is that the proof is wrong because Birnbaum misuses one of the principles.
Below I simplify the arguments to the extent that they are not very rigorous. My purpose is to make them accessible to a wider audience because the original arguments are very technical. Interested readers should see the detail in the articles linked in the question and in the comments.
For the sake of concreteness, I will focus on the case of a coin with unknown bias $\theta$. In experiment $E_1$ we flip it 10 times. In experiment $E_2$ we flip it until we obtain 3 "tails". In experiment $E_{mix}$ we flip a fair coin with labels "1" and "2" on either side: if it lands a "1" we perform $E_1$; if it lands a "2" we perform $E_2$. This example will greatly simplify the discussion and will exhibit the logic of the arguments (the original proofs are of course more general).
The principles:
The following two principles are widely accepted:
The Weak Conditionality Principle says that we should draw the same conclusions if we decide to perform experiment $E_1$, or if we decide to perform $E_{mix}$ and the coin lands "1".
The Sufficiency Principle says that we should draw the same conclusions in two experiments where a sufficient statistic has the same value.
The following principle is accepted by the Bayesian but not by the frequentists. Yet, Birnbaum claims that it is a logical consequence of the first two.
The Likelihood Principle says that we should draw the same conclusions in two experiments where the likelihood functions are proportional.
Birnbaum's theorem:
Say we perform $E_1$ and we obtain 7 "heads" out of ten flips. The likelihood function of $\theta$ is ${10 \choose 3}\theta^7(1-\theta)^3$. We perform $E_2$ and need to flip the coin 10 times to obtain 3 "tails". The likelihood function of $\theta$ is ${9 \choose 7}\theta^7(1-\theta)^3$. The two likelihood functions are proportional.
Birnbaum considers the following statistic on $E_{mix}$ from $\{1, 2\} \times \mathbb{N}^2$ to $\{1, 2\} \times \mathbb{N}^2$:
$$T: (\xi, x,y) \rightarrow (1, x,y),$$
where $x$ and $y$ are the numbers of "heads" and "tails", respectively. So no matter what happens, $T$ reports the result as if it came from experiment $E_1$. It turns out that $T$ is sufficient for $\theta$ in $E_{mix}$. The only case that is non-trivial is when $x = 7$ and $y = 3$, where we have
$$P(X_{mix}=(1,x,y)|T=(1,x,y)) = \frac{0.5 \times {10 \choose 3}\theta^7(1-\theta)^3}{0.5 \times {10 \choose 3}\theta^7(1-\theta)^3 + 0.5 \times {9 \choose 7}\theta^7(1-\theta)^3}\\=\frac{{10 \choose 3}}{{10 \choose 3}+{9 \choose 7}}\text{, a value that is independent of } \theta.$$
All the other cases are 0 or 1—except $P(X_{mix}=(2,x,y)|T=(1,x,y))$, which is the complement of the probability above. The distribution of $X_{mix}$ given $T$ is independent of $\theta$, so $T$ is a sufficient statistic for $\theta$.
Now, according to the sufficiency principle, we must conclude the same for $(1,x,y)$ and $(2,x,y)$ in $E_{mix}$, and from the weak condionality principle, we must conclude the same for $(x,y)$ in $E_1$ and $(1,x,y)$ in $E_{mix}$, as well as for $(x,y)$ in $E_2$ and $(2,x,y)$ in $E_{mix}$. So our conclusion must be the same in all cases, which is the likelihood principle.
Mayo's counter-proof:
The setup of Birnbaum is not a mixture experiment because the result of the coin labelled "1" and "2" was not observed, therefore the weak conditionality principle does not apply to this case.
Take the test $\theta = 0.5$ versus $\theta > 0.5$ and draw a conclusion from the p-value of the test. As a preliminary observation, note that the p-value of $(7,3)$ in $E_1$ is given by the binomial distribution as approximately $0.1719$; the p-value of $(7,3)$ in $E_2$ is given by the negative binomial distribution as approximately $0.0898$.
Here comes the important part: the p-value of $T=(1,7,3)$ in $E_{mix}$ is given as the average of the two—remember we do not know the status of the coin—i.e. approximately $0.1309$. Yet the p-value of $(1,7,3)$ in $E_{mix}$—where the coin is observed—is the same as that in $E_1$, i.e. approximately $0.1719$. The weak conditionality principle holds (the conclusion is the same in $E_1$ and in $E_{mix}$ where the coin lands "1") and yet the likelihood principle does not. The counter-example disproves Birnbaum's theorem.
Peña and Berger's refutation of Mayo's counter-proof:
Mayo implicitly changed the statement of the sufficiency principle: she interprets "same conclusions" as "same method". Taking the p-value is an inference method, but not a conclusion. This is important because an agent can come to identical conclusions even when two p-values are different. This is not meant in the sense that you accept the null hypothesis if the p-value is 0.8 or 0.9, but in the sense that the two p-values of Mayo are computed from different experiments (different probability spaces with different outcomes), so with this information at hand you can draw the same conclusion even if the values are different.
The sufficiency principle says that if there exists a sufficient statistic, then the conclusions must be the same, but it does not require the sufficient statistic to be used at all. If it did, it would lead to a contradiction, as demonstrated by Mayo.
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
|
In a nutshell, Birnbaum's argument is that two widely accepted principles logically imply that the likelihood principle must hold. The counter-argument of Mayo is that the proof is wrong because Birnb
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
In a nutshell, Birnbaum's argument is that two widely accepted principles logically imply that the likelihood principle must hold. The counter-argument of Mayo is that the proof is wrong because Birnbaum misuses one of the principles.
Below I simplify the arguments to the extent that they are not very rigorous. My purpose is to make them accessible to a wider audience because the original arguments are very technical. Interested readers should see the detail in the articles linked in the question and in the comments.
For the sake of concreteness, I will focus on the case of a coin with unknown bias $\theta$. In experiment $E_1$ we flip it 10 times. In experiment $E_2$ we flip it until we obtain 3 "tails". In experiment $E_{mix}$ we flip a fair coin with labels "1" and "2" on either side: if it lands a "1" we perform $E_1$; if it lands a "2" we perform $E_2$. This example will greatly simplify the discussion and will exhibit the logic of the arguments (the original proofs are of course more general).
The principles:
The following two principles are widely accepted:
The Weak Conditionality Principle says that we should draw the same conclusions if we decide to perform experiment $E_1$, or if we decide to perform $E_{mix}$ and the coin lands "1".
The Sufficiency Principle says that we should draw the same conclusions in two experiments where a sufficient statistic has the same value.
The following principle is accepted by the Bayesian but not by the frequentists. Yet, Birnbaum claims that it is a logical consequence of the first two.
The Likelihood Principle says that we should draw the same conclusions in two experiments where the likelihood functions are proportional.
Birnbaum's theorem:
Say we perform $E_1$ and we obtain 7 "heads" out of ten flips. The likelihood function of $\theta$ is ${10 \choose 3}\theta^7(1-\theta)^3$. We perform $E_2$ and need to flip the coin 10 times to obtain 3 "tails". The likelihood function of $\theta$ is ${9 \choose 7}\theta^7(1-\theta)^3$. The two likelihood functions are proportional.
Birnbaum considers the following statistic on $E_{mix}$ from $\{1, 2\} \times \mathbb{N}^2$ to $\{1, 2\} \times \mathbb{N}^2$:
$$T: (\xi, x,y) \rightarrow (1, x,y),$$
where $x$ and $y$ are the numbers of "heads" and "tails", respectively. So no matter what happens, $T$ reports the result as if it came from experiment $E_1$. It turns out that $T$ is sufficient for $\theta$ in $E_{mix}$. The only case that is non-trivial is when $x = 7$ and $y = 3$, where we have
$$P(X_{mix}=(1,x,y)|T=(1,x,y)) = \frac{0.5 \times {10 \choose 3}\theta^7(1-\theta)^3}{0.5 \times {10 \choose 3}\theta^7(1-\theta)^3 + 0.5 \times {9 \choose 7}\theta^7(1-\theta)^3}\\=\frac{{10 \choose 3}}{{10 \choose 3}+{9 \choose 7}}\text{, a value that is independent of } \theta.$$
All the other cases are 0 or 1—except $P(X_{mix}=(2,x,y)|T=(1,x,y))$, which is the complement of the probability above. The distribution of $X_{mix}$ given $T$ is independent of $\theta$, so $T$ is a sufficient statistic for $\theta$.
Now, according to the sufficiency principle, we must conclude the same for $(1,x,y)$ and $(2,x,y)$ in $E_{mix}$, and from the weak condionality principle, we must conclude the same for $(x,y)$ in $E_1$ and $(1,x,y)$ in $E_{mix}$, as well as for $(x,y)$ in $E_2$ and $(2,x,y)$ in $E_{mix}$. So our conclusion must be the same in all cases, which is the likelihood principle.
Mayo's counter-proof:
The setup of Birnbaum is not a mixture experiment because the result of the coin labelled "1" and "2" was not observed, therefore the weak conditionality principle does not apply to this case.
Take the test $\theta = 0.5$ versus $\theta > 0.5$ and draw a conclusion from the p-value of the test. As a preliminary observation, note that the p-value of $(7,3)$ in $E_1$ is given by the binomial distribution as approximately $0.1719$; the p-value of $(7,3)$ in $E_2$ is given by the negative binomial distribution as approximately $0.0898$.
Here comes the important part: the p-value of $T=(1,7,3)$ in $E_{mix}$ is given as the average of the two—remember we do not know the status of the coin—i.e. approximately $0.1309$. Yet the p-value of $(1,7,3)$ in $E_{mix}$—where the coin is observed—is the same as that in $E_1$, i.e. approximately $0.1719$. The weak conditionality principle holds (the conclusion is the same in $E_1$ and in $E_{mix}$ where the coin lands "1") and yet the likelihood principle does not. The counter-example disproves Birnbaum's theorem.
Peña and Berger's refutation of Mayo's counter-proof:
Mayo implicitly changed the statement of the sufficiency principle: she interprets "same conclusions" as "same method". Taking the p-value is an inference method, but not a conclusion. This is important because an agent can come to identical conclusions even when two p-values are different. This is not meant in the sense that you accept the null hypothesis if the p-value is 0.8 or 0.9, but in the sense that the two p-values of Mayo are computed from different experiments (different probability spaces with different outcomes), so with this information at hand you can draw the same conclusion even if the values are different.
The sufficiency principle says that if there exists a sufficient statistic, then the conclusions must be the same, but it does not require the sufficient statistic to be used at all. If it did, it would lead to a contradiction, as demonstrated by Mayo.
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
In a nutshell, Birnbaum's argument is that two widely accepted principles logically imply that the likelihood principle must hold. The counter-argument of Mayo is that the proof is wrong because Birnb
|
9,353
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
|
While it is interesting to determine the validity of Birnbaum’s (1962) proof that the sufficiency principle (SP) and one of the versions of the conditionality principle (CP) together imply the likelihood principle (LP), I believe there is a deeper problem with the theorem. Specifically, the CP cannot be justified from a conditional inference perspective. The reasoning is as follows.
Fisher provided a number of examples showing that conditioning on an ancillary statistic was a reasonable approach. The CP is the result of extrapolating these small number of examples into a principle that requires us to always condition on an ancillary when one exists. The question is: Is this a case of unjustified extrapolation? I believe so. Consider first the intuitive argument for the mixture example. Informally, (from Giere 1977), the weak conditionality principle (WCP) claims the “irrelevance of (component) experiments not actually performed” while the LP claims “the irrelevance of outcomes not actually observed”. It is easy to see the intuitive appeal of the WCP when described this way. However, WCP could also be described informally as claiming “the irrelevance of some outcomes not actually observed.” Frequentists are concerned to use an appropriate reference set, but how do we know that conditioning on this ancillary variable provides the best reference set to use? The answer is we do not.
To see this, imagine a mixture model with two ancillaries, A and B, where A is the flip of the coin in the mixture experiment and where conditioning on A leads to much weaker inferences than conditioning on B. Ancillary B reflects a partition of the sample space across both components experiments. Thus, conditioning on B is preferred over A in the mixture model but is not available to use for conditioning in either component experiment. Not only will the WCP fail for this admittedly special case, it heralds a more-common problem. Perturb this first mixture model slightly so that A is still ancillary but B is now only approximately-ancillary. Conditioning on B will still be preferred over A even though A is the unique ancillary in the modified problem. In short, the conditionality principles cannot be justified because there can be better statistics to condition on than ancillaries. [Cox’s comment on Buehler’s (1982) ancillary paper discusses the need for forms of inference to be robust to minor perturbations of model specification. The WCP fails this test.]
Finally, as an aside, some history that tends to be overlooked in discussions about Birnbaum’s theorem. Giere (1977) reports that Birnbaum rejected the Likelihood Principle within two years of the publication of his theorem. Birnbaum abandoned the LP in favor of what he called the confidence concept in his 1969 paper.
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
|
While it is interesting to determine the validity of Birnbaum’s (1962) proof that the sufficiency principle (SP) and one of the versions of the conditionality principle (CP) together imply the likelih
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
While it is interesting to determine the validity of Birnbaum’s (1962) proof that the sufficiency principle (SP) and one of the versions of the conditionality principle (CP) together imply the likelihood principle (LP), I believe there is a deeper problem with the theorem. Specifically, the CP cannot be justified from a conditional inference perspective. The reasoning is as follows.
Fisher provided a number of examples showing that conditioning on an ancillary statistic was a reasonable approach. The CP is the result of extrapolating these small number of examples into a principle that requires us to always condition on an ancillary when one exists. The question is: Is this a case of unjustified extrapolation? I believe so. Consider first the intuitive argument for the mixture example. Informally, (from Giere 1977), the weak conditionality principle (WCP) claims the “irrelevance of (component) experiments not actually performed” while the LP claims “the irrelevance of outcomes not actually observed”. It is easy to see the intuitive appeal of the WCP when described this way. However, WCP could also be described informally as claiming “the irrelevance of some outcomes not actually observed.” Frequentists are concerned to use an appropriate reference set, but how do we know that conditioning on this ancillary variable provides the best reference set to use? The answer is we do not.
To see this, imagine a mixture model with two ancillaries, A and B, where A is the flip of the coin in the mixture experiment and where conditioning on A leads to much weaker inferences than conditioning on B. Ancillary B reflects a partition of the sample space across both components experiments. Thus, conditioning on B is preferred over A in the mixture model but is not available to use for conditioning in either component experiment. Not only will the WCP fail for this admittedly special case, it heralds a more-common problem. Perturb this first mixture model slightly so that A is still ancillary but B is now only approximately-ancillary. Conditioning on B will still be preferred over A even though A is the unique ancillary in the modified problem. In short, the conditionality principles cannot be justified because there can be better statistics to condition on than ancillaries. [Cox’s comment on Buehler’s (1982) ancillary paper discusses the need for forms of inference to be robust to minor perturbations of model specification. The WCP fails this test.]
Finally, as an aside, some history that tends to be overlooked in discussions about Birnbaum’s theorem. Giere (1977) reports that Birnbaum rejected the Likelihood Principle within two years of the publication of his theorem. Birnbaum abandoned the LP in favor of what he called the confidence concept in his 1969 paper.
|
Did Deborah Mayo refute Birnbaum's proof of the likelihood principle?
While it is interesting to determine the validity of Birnbaum’s (1962) proof that the sufficiency principle (SP) and one of the versions of the conditionality principle (CP) together imply the likelih
|
9,354
|
Consequences of the Gaussian correlation inequality for computing joint confidence intervals
|
I think the question is more of relevance. In some sense, you are looking at multiple hypothesis testing and comparing to running multiple hypothesis tests.
Yes, indeed there is a lower bound which is the product of the p-values of the tests assuming independence. This is the basis for adjustments to p-values in Multi-Hypothesis Tests such as Bonferroni or Holm adjustments. But the Bonferroni and Holm adjustments (assuming independence) are particularly low power tests.
One can do much better in practice (and this is done via Bootstrap, see for instance, H White's Bootstrap Reality Check, the papers by Romano-Wolf and the more recent set of papers on Model-Confidence Sets). Each of these is an attempt at a higher power hypothesis test (e.g., using the estimated correlation to do better than merely using this lower bound) and consequently far more relevant.
|
Consequences of the Gaussian correlation inequality for computing joint confidence intervals
|
I think the question is more of relevance. In some sense, you are looking at multiple hypothesis testing and comparing to running multiple hypothesis tests.
Yes, indeed there is a lower bound which
|
Consequences of the Gaussian correlation inequality for computing joint confidence intervals
I think the question is more of relevance. In some sense, you are looking at multiple hypothesis testing and comparing to running multiple hypothesis tests.
Yes, indeed there is a lower bound which is the product of the p-values of the tests assuming independence. This is the basis for adjustments to p-values in Multi-Hypothesis Tests such as Bonferroni or Holm adjustments. But the Bonferroni and Holm adjustments (assuming independence) are particularly low power tests.
One can do much better in practice (and this is done via Bootstrap, see for instance, H White's Bootstrap Reality Check, the papers by Romano-Wolf and the more recent set of papers on Model-Confidence Sets). Each of these is an attempt at a higher power hypothesis test (e.g., using the estimated correlation to do better than merely using this lower bound) and consequently far more relevant.
|
Consequences of the Gaussian correlation inequality for computing joint confidence intervals
I think the question is more of relevance. In some sense, you are looking at multiple hypothesis testing and comparing to running multiple hypothesis tests.
Yes, indeed there is a lower bound which
|
9,355
|
How does a Relevance Vector Machine (RVM) work?
|
$\newcommand{\wv}{\mathbf{w}}
\newcommand{\alv}{\boldsymbol{\alpha}}
\newcommand{\thv}{\boldsymbol{\theta}}
\newcommand{\muv}{\boldsymbol{\mu}}
\newcommand{\ev}{\mathbf{e}}
\newcommand{\fv}{\mathbf{f}}
\newcommand{\Xv}{\mathbf{X}}
\newcommand{\xv}{\mathbf{x}}
\newcommand{\yv}{\mathbf{y}}
\newcommand{\vv}{\mathbf{v}}
$
The RVM method combines four techniques:
dual model
Bayesian approach
sparsity promoting prior
kernel trick
The application of this scheme to regression is called Relevance Vector Regression (RVR), and the application to classification is called Relevance Vector Classification (RVC). Since RVC uses logistic regression (or softmax), which is in essence regression, too, the procedure is in principle the same in both cases, which is why I will only describe RVR.
Dual model
Note, that the word "dual" is quite overloaded and is used for many different notions. The usage here follows that in Prince. Consider linear regression:
$$
\yv = \Xv\vv + \ev,\tag{1}\label{ols}
$$
with
$\yv\in\mathbb{R}^n$ the dependent variables in our $n$ observations,
$\Xv\in\mathbb{R}^{n\times d}$ the design matrix, i.e. each row contains the $d$ features of a single observation,
$\vv\in \mathbb{R}^d$ the parameters that have to be learned, and
$\ev\sim N(0,\sigma^2\mathbf 1)$ is Gaussian noise.
Furthermore let's define $S := span(\{\xv\}_{i=1}^n)$, the span of all the observed inputs, i.e. of all the rows of $\Xv$. Then, the dual model uses the fact that $\vv$ can always be chosen as a linear combination of the observations $\mathbf{x}_i$, i.e. $v\in S$. That is because the response $y$ for some input $\xv$ will be computed as the scalar product $y = \langle\vv, \xv\rangle$, and adding a component $\mathbf f$ to $\vv$ with $\mathbf f$ being perpendicular to S, i.e. with $\langle \mathbf f, \xv \rangle = 0$ for all rows $\xv_i$ from $\Xv$, would not change anything, since:
$$
\begin{align}
\langle\vv+\mathbf f, \xv\rangle &= \langle\vv, \xv\rangle + \langle\mathbf f, \xv\rangle\\
&= \langle\vv, \xv\rangle + 0.
\end{align}
$$
Therefore, the extra component $\fv$ is not justified by anything in our data $\Xv$ and is thus left out.
I.e. it suffices to consider $\vv$ such that there is a (not necessarily unique) $\mathbf{w}$ with:
$$
\mathbf{v} = \mathbf{X}^T\mathbf{w}, \tag{2}\label{dual}
$$
which turns $\eqref{ols}$ into
$$
\yv = \Xv\Xv^T\wv + \ev.\tag{3}\label{dualOls}
$$
If there are more dimensions than observations ($d>n$), we have reduced the dimensionality, while, if $d<n$, we have increased. it.
Now, switching from $\mathbf{v}$ to $\mathbf{w}$ means switching to the dual model.
Note, that now each observation $\mathbf{x}_i$ has its own parameter $w_i$. In fact, $w_i$ can be understood as a weight that describes the "relevance" of $\mathbf{x}_i$ for $\mathbf{v}$ in $\eqref{dual}$. Conversely, the smaller the fitted parameter $w_i$ is, the less the influence of $\mathbf{x}_i$ on $\mathbf{v}$. And if $w_i\approx 0$, we see that this observation is of no relevance to the fitted model.
Bayesian approach
Using the Bayesian approach means that we don't just fit the parameters $\wv$ via optimization (that’s the frequentist approach), but rather consider them as random variables of their own. Learning then consists in obtaining their distributions, or at least some approximations thereof. For this approach, we need to choose a prior distribution $p(\wv)$, which contains our prior knowledge of the parameters, independent of the observations. This prior is then combined with the observations to obtain the posterior $p(\wv|\mathbf{X}, \mathbf{y})$. Equipped with the posterior, we can e.g. predict responses $y^\ast$ for new input $\xv^\ast$:
$$
p(y^\ast|\Xv, \yv) = \int p(y^\ast|\xv^\ast, \wv)\; p(\wv|\Xv,\yv)\; d\wv.\tag{4}\label{predict}
$$
Sparsity promoting prior
This is the most defining part of RVMs. Sparsity is obtained by learning a special prior that assigns more prior probability density to parameters $\mathbf{w}$ that are sparse, i.e. many parameters $w_i$ are zero. This learning procedure is a form of Automatic Relevance Determination (ARD) (MacKay, Neal), and can be understood as follows (see e.g. Tipping, Bishop, or Prince for more details):
The standard choice for a prior of parameters $\mathbf w$ is an isotropic Gaussian $\mathbf w \sim N(0, \alpha^{-1}\mathbf 1)$, where the scalar $\alpha\in\mathbb R$ is the precision. But this would give equal emphasis to all directions, while our goal is to distinguish between coordinates so a subset of them can become zero, giving sparsity. Hence, the major idea for RVMs is to choose as prior $p(\mathbf w)$ a diagonal Gaussian with a different precision $\alpha_i$ for each coordinate $w_i$, i.e.
$$
p(\mathbf w) = N(0, \; diag(\alpha_1^{-1}, \ldots, \alpha_n^{-1})).
$$
The following procedure is known as maximization of the marginal likelihood (or evidence), which, intuitively, works as follows: Instead of going full Bayesian, i.e. treating all parameters $(\wv, \alv, \sigma^2)$ as random variables, we adopt a "partial" Bayesian approach where only the $\wv$ are random variables while $(\alv, \sigma^2)$ are chosen via optimization.
Namely, we pick the hyperparameter pair $(\alv_m, \sigma^2_m)$ that gives the most probability to the observed data $(\Xv, \yv)$ when averaged over all values of $\wv$:
$$
\begin{align}
(\alv_m, \sigma^2_m) &:= argmax_{(\alv, \sigma^2)} p(\yv| \Xv, \alv, \sigma^2)\\
&= argmax_{(\alv, \sigma^2)} \int p(\yv|\Xv, \wv, \sigma^2)\; p(\wv|\alv) \; d\wv,
\end{align}
$$
and then use as posterior $p(\wv|\Xv, \yv, \alv_m, \sigma^2_m)$ for predictions (see $\eqref{predict}$). This optimization can be done in various ways and is usually an iterative approximation. Those methods are not completely straightforward and for the gory details, I again refer you to e.g. Tipping, Bishop, or Prince. I will, however, consider the following two aspects:
How good an approximation is it?
Why does this lead to sparse $\wv$?
With respect to the first question, Tipping points out that setting $(\alv, \sigma^2) = (\alv_m, \sigma_m^2)$ actually does not lead to a good approximation of the posterior. However, we only need it to work well in prediction integrals (see $\eqref{predict}$) and there:
Tipping: "All the evidence from the experiments presented in this paper suggests that this predictive approximation is very effective in general."
For the second question, there exists some nice geometric explanation. Let's consider the space $\mathbb{R}^n$ where the response vectors $\yv\in\mathbb{R}^n$ live. Here, one single point $\yv$ represents all $n$ observed responses $y_i$. The marginal likelihood $p(\yv| \Xv, \alv, \sigma^2)$, which we want to maximize, is a distribution in this space. So our task is to find the distribution that gives the response vector $\yv$ the most probability. It is not difficult to show (see e.g. Tipping, equation (34)), that this marginal likelihood is a family of Gaussians parameterized by $\alv$ and $\sigma^2$ like this:
$$
\begin{align}
p(\yv| \Xv, \alv, \sigma^2) &= N(\yv | 0, C)\\
C &= \sigma^2\mathbf 1 + \sum_{i=0}^n \alpha_i^{-1}\Xv^c_i {\Xv^c_i}^T,
\end{align}
$$
where $\Xv^c_i$ is the $i$-th column vector of the design matrix $\Xv$, i.e. the $i$-th components of all the observed $\xv$. The term $\Xv^c_i {\Xv^c_i}^T$ can be understood as the singular variance of a pdf that has positive density only on the line in the direction of $\Xv^c_i$.
Now, first, consider the case where all $\alpha_i^{-1}$ are nearly zero. Then the only relevant part of $C$ is $\sigma^2\mathbf 1$. This means the contour lines of $C$ are circular. That would be the blue circle in the figure below.
Next, imagine that one of the $\alpha_i^{-1}$ is nonzero, say for the index $k$, but the belonging $\Xv^c_k$ is not pointing much in the direction of $\yv$. The sum $C = \sigma^2\mathbf 1 + \alpha_k^{-1}\Xv^c_k {\Xv^c_k}^T$ is then an ellipse that is elongated along $\Xv^c_k$ which makes it leaner and thus it has less density in the direction of $\yv$. This would be the green ellipse in the figure. That means we would want $\alpha_k^{-1}$ to be zero. Thus, for all the columns $\Xv^c_i$ of the design matrix $\Xv$ that are badly aligned with $\yv$, it is not unreasonable to expect that the optimization will drive their precisions $\alpha_i$ to infinity, so the belonging $w_i$ become zero, resulting in sparsity.
Kernel trick
Fortunately, the methods described here only depend on the scalar product of the $\xv$. Thus we can use the well-known kernel trick, meaning we replace the scalar product with a kernel, which is tantamount to using much more complex basis functions.
Complexity
One has to distinguish between the training and application complexity of RVM. The application of the trained RVM, i,e. the computation of the prediction $\eqref{predict}$ of the response $\yv^\ast$ of a new input $\xv^\ast$, involves the scalar product of the posterior mean $\muv_\wv$ of $\wv$ with $\xv^\ast$. In the dual model, $\wv$ is $n$-dimensional, so this scalar product is of order $n$, but since it is sparse, the complexity reduces to the order of the number of relevance vectors.
One of the main weaknesses, however, of RVMs, is that the training, in the vanilla version, is cubic in the number of observations. However, there are methods that can reduce this complexity.
Comparison RVM SVM
Superficially, RVMs and SVMs are quite similar. Both use the dual model and both reduce the input set to only a few important observations. However, internally they are quite different. A short comparison might include the following points:
RVM is Bayesian, SVM is not.
RVM provides probabilities, SVM doesn’t (in its original variant)
RVM is sparser and application is faster:
Bishop: “For a wide range of regression and classification tasks,
the RVM is found to give models that are typically an order of
magnitude more compact than the corresponding support vector machine,
resulting in a significant improvement in the speed of processing on
test data. Remarkably, this greater sparsity is achieved with little
or no reduction in generalization error compared with the
corresponding SVM.”
SVM is a simpler model with a convex objective function, i.e. a global optimum is guaranteed.
RVM struggles with training complexity:
Bishop: “The principal disadvantage of the relevance vector
machine is the relatively long training times compared with the SVM.”
SVMs achieve sparsity via the maximum margin (classification) or the epsilon-tube (regression) approach, which is geometrically intuitive. RVM, on the other hand, achieves sparsity via special priors and uses a nontrivial approximate optimization of partial posteriors, which is arguably more complex.
The improved sparsity can be observed in the following plot which I reproduced from here using the sklearn-rvm package:
While SVR (left) is using 27 support vectors, RVR (right) uses only ten.
|
How does a Relevance Vector Machine (RVM) work?
|
$\newcommand{\wv}{\mathbf{w}}
\newcommand{\alv}{\boldsymbol{\alpha}}
\newcommand{\thv}{\boldsymbol{\theta}}
\newcommand{\muv}{\boldsymbol{\mu}}
\newcommand{\ev}{\mathbf{e}}
\newcommand{\fv}{\mathbf{f}
|
How does a Relevance Vector Machine (RVM) work?
$\newcommand{\wv}{\mathbf{w}}
\newcommand{\alv}{\boldsymbol{\alpha}}
\newcommand{\thv}{\boldsymbol{\theta}}
\newcommand{\muv}{\boldsymbol{\mu}}
\newcommand{\ev}{\mathbf{e}}
\newcommand{\fv}{\mathbf{f}}
\newcommand{\Xv}{\mathbf{X}}
\newcommand{\xv}{\mathbf{x}}
\newcommand{\yv}{\mathbf{y}}
\newcommand{\vv}{\mathbf{v}}
$
The RVM method combines four techniques:
dual model
Bayesian approach
sparsity promoting prior
kernel trick
The application of this scheme to regression is called Relevance Vector Regression (RVR), and the application to classification is called Relevance Vector Classification (RVC). Since RVC uses logistic regression (or softmax), which is in essence regression, too, the procedure is in principle the same in both cases, which is why I will only describe RVR.
Dual model
Note, that the word "dual" is quite overloaded and is used for many different notions. The usage here follows that in Prince. Consider linear regression:
$$
\yv = \Xv\vv + \ev,\tag{1}\label{ols}
$$
with
$\yv\in\mathbb{R}^n$ the dependent variables in our $n$ observations,
$\Xv\in\mathbb{R}^{n\times d}$ the design matrix, i.e. each row contains the $d$ features of a single observation,
$\vv\in \mathbb{R}^d$ the parameters that have to be learned, and
$\ev\sim N(0,\sigma^2\mathbf 1)$ is Gaussian noise.
Furthermore let's define $S := span(\{\xv\}_{i=1}^n)$, the span of all the observed inputs, i.e. of all the rows of $\Xv$. Then, the dual model uses the fact that $\vv$ can always be chosen as a linear combination of the observations $\mathbf{x}_i$, i.e. $v\in S$. That is because the response $y$ for some input $\xv$ will be computed as the scalar product $y = \langle\vv, \xv\rangle$, and adding a component $\mathbf f$ to $\vv$ with $\mathbf f$ being perpendicular to S, i.e. with $\langle \mathbf f, \xv \rangle = 0$ for all rows $\xv_i$ from $\Xv$, would not change anything, since:
$$
\begin{align}
\langle\vv+\mathbf f, \xv\rangle &= \langle\vv, \xv\rangle + \langle\mathbf f, \xv\rangle\\
&= \langle\vv, \xv\rangle + 0.
\end{align}
$$
Therefore, the extra component $\fv$ is not justified by anything in our data $\Xv$ and is thus left out.
I.e. it suffices to consider $\vv$ such that there is a (not necessarily unique) $\mathbf{w}$ with:
$$
\mathbf{v} = \mathbf{X}^T\mathbf{w}, \tag{2}\label{dual}
$$
which turns $\eqref{ols}$ into
$$
\yv = \Xv\Xv^T\wv + \ev.\tag{3}\label{dualOls}
$$
If there are more dimensions than observations ($d>n$), we have reduced the dimensionality, while, if $d<n$, we have increased. it.
Now, switching from $\mathbf{v}$ to $\mathbf{w}$ means switching to the dual model.
Note, that now each observation $\mathbf{x}_i$ has its own parameter $w_i$. In fact, $w_i$ can be understood as a weight that describes the "relevance" of $\mathbf{x}_i$ for $\mathbf{v}$ in $\eqref{dual}$. Conversely, the smaller the fitted parameter $w_i$ is, the less the influence of $\mathbf{x}_i$ on $\mathbf{v}$. And if $w_i\approx 0$, we see that this observation is of no relevance to the fitted model.
Bayesian approach
Using the Bayesian approach means that we don't just fit the parameters $\wv$ via optimization (that’s the frequentist approach), but rather consider them as random variables of their own. Learning then consists in obtaining their distributions, or at least some approximations thereof. For this approach, we need to choose a prior distribution $p(\wv)$, which contains our prior knowledge of the parameters, independent of the observations. This prior is then combined with the observations to obtain the posterior $p(\wv|\mathbf{X}, \mathbf{y})$. Equipped with the posterior, we can e.g. predict responses $y^\ast$ for new input $\xv^\ast$:
$$
p(y^\ast|\Xv, \yv) = \int p(y^\ast|\xv^\ast, \wv)\; p(\wv|\Xv,\yv)\; d\wv.\tag{4}\label{predict}
$$
Sparsity promoting prior
This is the most defining part of RVMs. Sparsity is obtained by learning a special prior that assigns more prior probability density to parameters $\mathbf{w}$ that are sparse, i.e. many parameters $w_i$ are zero. This learning procedure is a form of Automatic Relevance Determination (ARD) (MacKay, Neal), and can be understood as follows (see e.g. Tipping, Bishop, or Prince for more details):
The standard choice for a prior of parameters $\mathbf w$ is an isotropic Gaussian $\mathbf w \sim N(0, \alpha^{-1}\mathbf 1)$, where the scalar $\alpha\in\mathbb R$ is the precision. But this would give equal emphasis to all directions, while our goal is to distinguish between coordinates so a subset of them can become zero, giving sparsity. Hence, the major idea for RVMs is to choose as prior $p(\mathbf w)$ a diagonal Gaussian with a different precision $\alpha_i$ for each coordinate $w_i$, i.e.
$$
p(\mathbf w) = N(0, \; diag(\alpha_1^{-1}, \ldots, \alpha_n^{-1})).
$$
The following procedure is known as maximization of the marginal likelihood (or evidence), which, intuitively, works as follows: Instead of going full Bayesian, i.e. treating all parameters $(\wv, \alv, \sigma^2)$ as random variables, we adopt a "partial" Bayesian approach where only the $\wv$ are random variables while $(\alv, \sigma^2)$ are chosen via optimization.
Namely, we pick the hyperparameter pair $(\alv_m, \sigma^2_m)$ that gives the most probability to the observed data $(\Xv, \yv)$ when averaged over all values of $\wv$:
$$
\begin{align}
(\alv_m, \sigma^2_m) &:= argmax_{(\alv, \sigma^2)} p(\yv| \Xv, \alv, \sigma^2)\\
&= argmax_{(\alv, \sigma^2)} \int p(\yv|\Xv, \wv, \sigma^2)\; p(\wv|\alv) \; d\wv,
\end{align}
$$
and then use as posterior $p(\wv|\Xv, \yv, \alv_m, \sigma^2_m)$ for predictions (see $\eqref{predict}$). This optimization can be done in various ways and is usually an iterative approximation. Those methods are not completely straightforward and for the gory details, I again refer you to e.g. Tipping, Bishop, or Prince. I will, however, consider the following two aspects:
How good an approximation is it?
Why does this lead to sparse $\wv$?
With respect to the first question, Tipping points out that setting $(\alv, \sigma^2) = (\alv_m, \sigma_m^2)$ actually does not lead to a good approximation of the posterior. However, we only need it to work well in prediction integrals (see $\eqref{predict}$) and there:
Tipping: "All the evidence from the experiments presented in this paper suggests that this predictive approximation is very effective in general."
For the second question, there exists some nice geometric explanation. Let's consider the space $\mathbb{R}^n$ where the response vectors $\yv\in\mathbb{R}^n$ live. Here, one single point $\yv$ represents all $n$ observed responses $y_i$. The marginal likelihood $p(\yv| \Xv, \alv, \sigma^2)$, which we want to maximize, is a distribution in this space. So our task is to find the distribution that gives the response vector $\yv$ the most probability. It is not difficult to show (see e.g. Tipping, equation (34)), that this marginal likelihood is a family of Gaussians parameterized by $\alv$ and $\sigma^2$ like this:
$$
\begin{align}
p(\yv| \Xv, \alv, \sigma^2) &= N(\yv | 0, C)\\
C &= \sigma^2\mathbf 1 + \sum_{i=0}^n \alpha_i^{-1}\Xv^c_i {\Xv^c_i}^T,
\end{align}
$$
where $\Xv^c_i$ is the $i$-th column vector of the design matrix $\Xv$, i.e. the $i$-th components of all the observed $\xv$. The term $\Xv^c_i {\Xv^c_i}^T$ can be understood as the singular variance of a pdf that has positive density only on the line in the direction of $\Xv^c_i$.
Now, first, consider the case where all $\alpha_i^{-1}$ are nearly zero. Then the only relevant part of $C$ is $\sigma^2\mathbf 1$. This means the contour lines of $C$ are circular. That would be the blue circle in the figure below.
Next, imagine that one of the $\alpha_i^{-1}$ is nonzero, say for the index $k$, but the belonging $\Xv^c_k$ is not pointing much in the direction of $\yv$. The sum $C = \sigma^2\mathbf 1 + \alpha_k^{-1}\Xv^c_k {\Xv^c_k}^T$ is then an ellipse that is elongated along $\Xv^c_k$ which makes it leaner and thus it has less density in the direction of $\yv$. This would be the green ellipse in the figure. That means we would want $\alpha_k^{-1}$ to be zero. Thus, for all the columns $\Xv^c_i$ of the design matrix $\Xv$ that are badly aligned with $\yv$, it is not unreasonable to expect that the optimization will drive their precisions $\alpha_i$ to infinity, so the belonging $w_i$ become zero, resulting in sparsity.
Kernel trick
Fortunately, the methods described here only depend on the scalar product of the $\xv$. Thus we can use the well-known kernel trick, meaning we replace the scalar product with a kernel, which is tantamount to using much more complex basis functions.
Complexity
One has to distinguish between the training and application complexity of RVM. The application of the trained RVM, i,e. the computation of the prediction $\eqref{predict}$ of the response $\yv^\ast$ of a new input $\xv^\ast$, involves the scalar product of the posterior mean $\muv_\wv$ of $\wv$ with $\xv^\ast$. In the dual model, $\wv$ is $n$-dimensional, so this scalar product is of order $n$, but since it is sparse, the complexity reduces to the order of the number of relevance vectors.
One of the main weaknesses, however, of RVMs, is that the training, in the vanilla version, is cubic in the number of observations. However, there are methods that can reduce this complexity.
Comparison RVM SVM
Superficially, RVMs and SVMs are quite similar. Both use the dual model and both reduce the input set to only a few important observations. However, internally they are quite different. A short comparison might include the following points:
RVM is Bayesian, SVM is not.
RVM provides probabilities, SVM doesn’t (in its original variant)
RVM is sparser and application is faster:
Bishop: “For a wide range of regression and classification tasks,
the RVM is found to give models that are typically an order of
magnitude more compact than the corresponding support vector machine,
resulting in a significant improvement in the speed of processing on
test data. Remarkably, this greater sparsity is achieved with little
or no reduction in generalization error compared with the
corresponding SVM.”
SVM is a simpler model with a convex objective function, i.e. a global optimum is guaranteed.
RVM struggles with training complexity:
Bishop: “The principal disadvantage of the relevance vector
machine is the relatively long training times compared with the SVM.”
SVMs achieve sparsity via the maximum margin (classification) or the epsilon-tube (regression) approach, which is geometrically intuitive. RVM, on the other hand, achieves sparsity via special priors and uses a nontrivial approximate optimization of partial posteriors, which is arguably more complex.
The improved sparsity can be observed in the following plot which I reproduced from here using the sklearn-rvm package:
While SVR (left) is using 27 support vectors, RVR (right) uses only ten.
|
How does a Relevance Vector Machine (RVM) work?
$\newcommand{\wv}{\mathbf{w}}
\newcommand{\alv}{\boldsymbol{\alpha}}
\newcommand{\thv}{\boldsymbol{\theta}}
\newcommand{\muv}{\boldsymbol{\mu}}
\newcommand{\ev}{\mathbf{e}}
\newcommand{\fv}{\mathbf{f}
|
9,356
|
SVD of correlated matrix should be additive but doesn't appear to be
|
Note that 'bicluster' in this article refers to a subset of a matrix, "a subset of rows which exhibit similar behavior across a subset of columns, or vice versa." Identification of biclusters is commonly done in data mining algorithms. The authors are prosing a new 'correlated bicluster model' that is different from previous models used to identify these subsets. I know nothing about genetics, but the confusion here seems pretty clear and to come from two sources:
1. Use of the word 'additive'
There is nothing in this paper that implies that the two matrices given in the function's output should be 'additive', if by 'additive', additive inverses is what is meant by OP. The authors are not using the word additive in this sense. They are referring to obtaining a bicluster with an additive model, "where each row or column can be obtained by adding a constant to another row or column."
2. Misreading Proposition 4.3
Following from the comment by @StumpyJoePete, the proposition says that if both $R_I$ and $C_J$ are perfect biclusters with an additive model, then $X_{IJ}$ is a perfect correlated bicluster. The authors do not say that the opposite will be true. The authors do not argue that if $X_{IJ}$ is a perfect correlated bicluster, then $R_I$ and $C_J$ will be additive -- in either sense of the word 'additive'. They're not saying that $R_I$ and $C_J$ should be inversely additive or that they should be able to be fit with an additive model.
*Also, the example data comes from a completely different section of the paper than the proposition discussed in the question.
|
SVD of correlated matrix should be additive but doesn't appear to be
|
Note that 'bicluster' in this article refers to a subset of a matrix, "a subset of rows which exhibit similar behavior across a subset of columns, or vice versa." Identification of biclusters is commo
|
SVD of correlated matrix should be additive but doesn't appear to be
Note that 'bicluster' in this article refers to a subset of a matrix, "a subset of rows which exhibit similar behavior across a subset of columns, or vice versa." Identification of biclusters is commonly done in data mining algorithms. The authors are prosing a new 'correlated bicluster model' that is different from previous models used to identify these subsets. I know nothing about genetics, but the confusion here seems pretty clear and to come from two sources:
1. Use of the word 'additive'
There is nothing in this paper that implies that the two matrices given in the function's output should be 'additive', if by 'additive', additive inverses is what is meant by OP. The authors are not using the word additive in this sense. They are referring to obtaining a bicluster with an additive model, "where each row or column can be obtained by adding a constant to another row or column."
2. Misreading Proposition 4.3
Following from the comment by @StumpyJoePete, the proposition says that if both $R_I$ and $C_J$ are perfect biclusters with an additive model, then $X_{IJ}$ is a perfect correlated bicluster. The authors do not say that the opposite will be true. The authors do not argue that if $X_{IJ}$ is a perfect correlated bicluster, then $R_I$ and $C_J$ will be additive -- in either sense of the word 'additive'. They're not saying that $R_I$ and $C_J$ should be inversely additive or that they should be able to be fit with an additive model.
*Also, the example data comes from a completely different section of the paper than the proposition discussed in the question.
|
SVD of correlated matrix should be additive but doesn't appear to be
Note that 'bicluster' in this article refers to a subset of a matrix, "a subset of rows which exhibit similar behavior across a subset of columns, or vice versa." Identification of biclusters is commo
|
9,357
|
When is binomial distribution function above/below its limiting Poisson distribution function?
|
With regard to the following:
the mean of a Binomial dist is $np$
the variance is $np(1-p)$
the mean of a Poisson dist is $\lambda$, which we can imagine as $n\times p$
the variance of a Poisson is the same as the mean
Now, if a Poisson is the limit to a Binomial with parameters $n$ and $p$, such that $n$ increases to infinity and $p$ decreases to zero while their product remains constant, then assuming that $n$ and $p$ are not converged to their respective limits, the expression $np$ is always greater than $np(1-p)$, therefore the variance of Binomial is less than that of Poisson. That would imply that the Binomial is below in the tails and above elsewhere.
|
When is binomial distribution function above/below its limiting Poisson distribution function?
|
With regard to the following:
the mean of a Binomial dist is $np$
the variance is $np(1-p)$
the mean of a Poisson dist is $\lambda$, which we can imagine as $n\times p$
the variance of a Poisson is t
|
When is binomial distribution function above/below its limiting Poisson distribution function?
With regard to the following:
the mean of a Binomial dist is $np$
the variance is $np(1-p)$
the mean of a Poisson dist is $\lambda$, which we can imagine as $n\times p$
the variance of a Poisson is the same as the mean
Now, if a Poisson is the limit to a Binomial with parameters $n$ and $p$, such that $n$ increases to infinity and $p$ decreases to zero while their product remains constant, then assuming that $n$ and $p$ are not converged to their respective limits, the expression $np$ is always greater than $np(1-p)$, therefore the variance of Binomial is less than that of Poisson. That would imply that the Binomial is below in the tails and above elsewhere.
|
When is binomial distribution function above/below its limiting Poisson distribution function?
With regard to the following:
the mean of a Binomial dist is $np$
the variance is $np(1-p)$
the mean of a Poisson dist is $\lambda$, which we can imagine as $n\times p$
the variance of a Poisson is t
|
9,358
|
What are disadvantages of using the lasso for variable selection for regression?
|
There is NO reason to do stepwise selection. It's just wrong.
LASSO/LAR are the best automatic methods. But they are automatic methods. They let the analyst not think.
In many analyses, some variables should be in the model REGARDLESS of any measure of significance. Sometimes they are necessary control variables. Other times, finding a small effect can be substantively important.
|
What are disadvantages of using the lasso for variable selection for regression?
|
There is NO reason to do stepwise selection. It's just wrong.
LASSO/LAR are the best automatic methods. But they are automatic methods. They let the analyst not think.
In many analyses, some variab
|
What are disadvantages of using the lasso for variable selection for regression?
There is NO reason to do stepwise selection. It's just wrong.
LASSO/LAR are the best automatic methods. But they are automatic methods. They let the analyst not think.
In many analyses, some variables should be in the model REGARDLESS of any measure of significance. Sometimes they are necessary control variables. Other times, finding a small effect can be substantively important.
|
What are disadvantages of using the lasso for variable selection for regression?
There is NO reason to do stepwise selection. It's just wrong.
LASSO/LAR are the best automatic methods. But they are automatic methods. They let the analyst not think.
In many analyses, some variab
|
9,359
|
What are disadvantages of using the lasso for variable selection for regression?
|
If you only care about prediction error and don't care about interpretability, casual-inference, model-simplicity, coefficients' tests, etc, why do you still want to use linear regression model?
You can use something like boosting on decision trees or support vector regression and get better prediction quality and still avoid overfitting in both mentioned cases. That is Lasso may not be the best choice to get best prediction quality.
If my understanding is correct, Lasso is intended for situations when you are still interested in the model itself, not only predictions. That is - see selected variables and their coefficients, interpret in some way etc. And for this - Lasso may not be the best choice in certain situations as discussed in other questions here.
|
What are disadvantages of using the lasso for variable selection for regression?
|
If you only care about prediction error and don't care about interpretability, casual-inference, model-simplicity, coefficients' tests, etc, why do you still want to use linear regression model?
You
|
What are disadvantages of using the lasso for variable selection for regression?
If you only care about prediction error and don't care about interpretability, casual-inference, model-simplicity, coefficients' tests, etc, why do you still want to use linear regression model?
You can use something like boosting on decision trees or support vector regression and get better prediction quality and still avoid overfitting in both mentioned cases. That is Lasso may not be the best choice to get best prediction quality.
If my understanding is correct, Lasso is intended for situations when you are still interested in the model itself, not only predictions. That is - see selected variables and their coefficients, interpret in some way etc. And for this - Lasso may not be the best choice in certain situations as discussed in other questions here.
|
What are disadvantages of using the lasso for variable selection for regression?
If you only care about prediction error and don't care about interpretability, casual-inference, model-simplicity, coefficients' tests, etc, why do you still want to use linear regression model?
You
|
9,360
|
What are disadvantages of using the lasso for variable selection for regression?
|
LASSO encourages shrinking of coefficients to 0, i.e. dropping those variates from your model. On contrast, other regularization techniques like a ridge tend to keep all variates.
So I'd recommend to think about whether this dropping makes sense for your data. E.g. consider setting up a clinical diagnostic test either on gene microarray data or on vibrational spectroscopic data.
You'd expect some genes to carry relevant information, but lots of other genes are just noise wrt. your application. Dropping those variates is a perfectly sensible idea.
By contrast, vibrational spectroscopic data sets (while usually having similar dimensions compared to microarray data) tend to have the relevant information "smeared" over large parts of the spectrum (correlation). In this situation, asking the regularization to drop variates is not a particularly sensible approach. The more so, as other regularization techniques like PLS are more adapted to this type of data.
The Elements of Statistical Learning gives a good discussion of the LASSO, and contrasts it to other regularization techniques.
|
What are disadvantages of using the lasso for variable selection for regression?
|
LASSO encourages shrinking of coefficients to 0, i.e. dropping those variates from your model. On contrast, other regularization techniques like a ridge tend to keep all variates.
So I'd recommend to
|
What are disadvantages of using the lasso for variable selection for regression?
LASSO encourages shrinking of coefficients to 0, i.e. dropping those variates from your model. On contrast, other regularization techniques like a ridge tend to keep all variates.
So I'd recommend to think about whether this dropping makes sense for your data. E.g. consider setting up a clinical diagnostic test either on gene microarray data or on vibrational spectroscopic data.
You'd expect some genes to carry relevant information, but lots of other genes are just noise wrt. your application. Dropping those variates is a perfectly sensible idea.
By contrast, vibrational spectroscopic data sets (while usually having similar dimensions compared to microarray data) tend to have the relevant information "smeared" over large parts of the spectrum (correlation). In this situation, asking the regularization to drop variates is not a particularly sensible approach. The more so, as other regularization techniques like PLS are more adapted to this type of data.
The Elements of Statistical Learning gives a good discussion of the LASSO, and contrasts it to other regularization techniques.
|
What are disadvantages of using the lasso for variable selection for regression?
LASSO encourages shrinking of coefficients to 0, i.e. dropping those variates from your model. On contrast, other regularization techniques like a ridge tend to keep all variates.
So I'd recommend to
|
9,361
|
What are disadvantages of using the lasso for variable selection for regression?
|
This is already quite an old question but I feel that in the meantime most of the answers here are quite outdated (and the one that's checked as the correct answer is plain wrong imho).
First, in terms of getting good prediction performance it is not universally true that LASSO is always better than stepwise.
The paper "Extended Comparisons of Best Subset Selection, Forward Stepwise Selection, and the Lasso" by Hastie et al (2017) provides an extensive comparison of forward stepwise, LASSO and some LASSO variants like the relaxed LASSO as well as best subset, and they show that stepwise is sometimes better than LASSO. A variant of LASSO though --- relaxed LASSO - was the one that produced the highest model prediction accuracy under the widest range of circumstances. The conclusion about which is best depends a lot on what you consider best though, e.g. whether this would be highest prediction accuracy or selecting the fewest false positive variables.
There is a whole zoo of sparse learning methods though, most of which are better than LASSO. E.g. there is Meinhausen's relaxed LASSO, adaptive LASSO and SCAD and MCP penalized regression as implemented in the ncvreg package, which all have less bias than standard LASSO and so are preferrable. Furthermore, if you are interest in the absolute sparsest solution with the best prediction performance then L0 penalized regression (aka best subset, i.e. based on penalization of the nr of nonzero coefficients as opposed to the sum of the absolute value of the coefficients in LASSO) is better than LASSO, see e.g. the l0ara package which approximates L0 penalized GLMs using an iterative adaptive ridge procedure, and which unlike LASSO also works very well with highly collinear variables, and the L0Learn package, which can fit L0 penalized regression models using coordinate descent, potentially in combination with an L2 penalty to regularize collinearity.
So to come back to your original question: why not use LASSO for variable selection? :
because the coefficients will be highly biased, which is improved in relaxed LASSO, MCP and SCAD penalized regression, and resolved completely in L0 penalized regression (which has a full oracle property, ie it can pick out both the causal variables and retun unbiased coefficients, also for $p > n$ cases)
because it tends to produce way more false positives than L0 penalized regression (in my tests l0ara performs best then, ie iterative adaptive ridge, followed by L0Learn)
because it cannot deal well with collinear variables (it would essentially just randomly select one of the collinear variables) - iterative adapative ridge / l0ara and the L0L2 penalties in L0Learn are much better at dealing with that.
Of course, in general, you'll still have to use cross validation to tune your regularization parameter(s) to get optimal prediction performance, but that's not an issue. And you can even do high dimensional inference on your parameters and calculate 95% confidence intervals on your coefficients if you like via nonparametric bootstrapping (even taking into account uncertainty on the selection of the optimal regularization if you do your cross validation also on each bootstrapped dataset, though that becomes quite slow then).
Computationally LASSO is not slower to fit than stepwise approaches btw, certainly not if one uses highly optimized code that uses warm starts to optimize your LASSO regularization (you can compare yourself using the fs command for forward stepwise and lasso for LASSO in the bestsubset package). The fact that stepwise approaches are still popular probably has to do with the mistaken belief of many that one could then just keep your final model and report it's associated p values - which in fact is not a correct thing to do, as this doesn't take into account the uncertainty introduced by your model selection, resulting in way too optimistic p values.
Hope this helps?
|
What are disadvantages of using the lasso for variable selection for regression?
|
This is already quite an old question but I feel that in the meantime most of the answers here are quite outdated (and the one that's checked as the correct answer is plain wrong imho).
First, in ter
|
What are disadvantages of using the lasso for variable selection for regression?
This is already quite an old question but I feel that in the meantime most of the answers here are quite outdated (and the one that's checked as the correct answer is plain wrong imho).
First, in terms of getting good prediction performance it is not universally true that LASSO is always better than stepwise.
The paper "Extended Comparisons of Best Subset Selection, Forward Stepwise Selection, and the Lasso" by Hastie et al (2017) provides an extensive comparison of forward stepwise, LASSO and some LASSO variants like the relaxed LASSO as well as best subset, and they show that stepwise is sometimes better than LASSO. A variant of LASSO though --- relaxed LASSO - was the one that produced the highest model prediction accuracy under the widest range of circumstances. The conclusion about which is best depends a lot on what you consider best though, e.g. whether this would be highest prediction accuracy or selecting the fewest false positive variables.
There is a whole zoo of sparse learning methods though, most of which are better than LASSO. E.g. there is Meinhausen's relaxed LASSO, adaptive LASSO and SCAD and MCP penalized regression as implemented in the ncvreg package, which all have less bias than standard LASSO and so are preferrable. Furthermore, if you are interest in the absolute sparsest solution with the best prediction performance then L0 penalized regression (aka best subset, i.e. based on penalization of the nr of nonzero coefficients as opposed to the sum of the absolute value of the coefficients in LASSO) is better than LASSO, see e.g. the l0ara package which approximates L0 penalized GLMs using an iterative adaptive ridge procedure, and which unlike LASSO also works very well with highly collinear variables, and the L0Learn package, which can fit L0 penalized regression models using coordinate descent, potentially in combination with an L2 penalty to regularize collinearity.
So to come back to your original question: why not use LASSO for variable selection? :
because the coefficients will be highly biased, which is improved in relaxed LASSO, MCP and SCAD penalized regression, and resolved completely in L0 penalized regression (which has a full oracle property, ie it can pick out both the causal variables and retun unbiased coefficients, also for $p > n$ cases)
because it tends to produce way more false positives than L0 penalized regression (in my tests l0ara performs best then, ie iterative adaptive ridge, followed by L0Learn)
because it cannot deal well with collinear variables (it would essentially just randomly select one of the collinear variables) - iterative adapative ridge / l0ara and the L0L2 penalties in L0Learn are much better at dealing with that.
Of course, in general, you'll still have to use cross validation to tune your regularization parameter(s) to get optimal prediction performance, but that's not an issue. And you can even do high dimensional inference on your parameters and calculate 95% confidence intervals on your coefficients if you like via nonparametric bootstrapping (even taking into account uncertainty on the selection of the optimal regularization if you do your cross validation also on each bootstrapped dataset, though that becomes quite slow then).
Computationally LASSO is not slower to fit than stepwise approaches btw, certainly not if one uses highly optimized code that uses warm starts to optimize your LASSO regularization (you can compare yourself using the fs command for forward stepwise and lasso for LASSO in the bestsubset package). The fact that stepwise approaches are still popular probably has to do with the mistaken belief of many that one could then just keep your final model and report it's associated p values - which in fact is not a correct thing to do, as this doesn't take into account the uncertainty introduced by your model selection, resulting in way too optimistic p values.
Hope this helps?
|
What are disadvantages of using the lasso for variable selection for regression?
This is already quite an old question but I feel that in the meantime most of the answers here are quite outdated (and the one that's checked as the correct answer is plain wrong imho).
First, in ter
|
9,362
|
What are disadvantages of using the lasso for variable selection for regression?
|
If two predictors are highly correlated LASSO can end up dropping one rather arbitrarily. That's not very good when you're wanting to make predictions for a population where those two predictors aren't highly correlated, & perhaps a reason for preferring ridge regression in those circumstances.
You might also think standardization of predictors (to say when coefficients are "big" or "small") rather arbitrary & be puzzled (like me) about sensible ways to standardize categorical predictors.
|
What are disadvantages of using the lasso for variable selection for regression?
|
If two predictors are highly correlated LASSO can end up dropping one rather arbitrarily. That's not very good when you're wanting to make predictions for a population where those two predictors aren'
|
What are disadvantages of using the lasso for variable selection for regression?
If two predictors are highly correlated LASSO can end up dropping one rather arbitrarily. That's not very good when you're wanting to make predictions for a population where those two predictors aren't highly correlated, & perhaps a reason for preferring ridge regression in those circumstances.
You might also think standardization of predictors (to say when coefficients are "big" or "small") rather arbitrary & be puzzled (like me) about sensible ways to standardize categorical predictors.
|
What are disadvantages of using the lasso for variable selection for regression?
If two predictors are highly correlated LASSO can end up dropping one rather arbitrarily. That's not very good when you're wanting to make predictions for a population where those two predictors aren'
|
9,363
|
What are disadvantages of using the lasso for variable selection for regression?
|
Lasso is only useful if you're restricting yourself to consider models which are linear in the parameters to be estimated. Stated another way, the lasso does not evaluate whether you have chosen the correct form of the relationship between the independent and dependent variable(s).
It is very plausible that there may be nonlinear, interactive or polynomial effects in an arbitrary data set. However, these alternative model specifications will only be evaluated if the user conducts that analysis; the lasso is not a substitute for doing so.
For a simple example of how this can go wrong, consider a data set in which disjoint intervals of the independent variable will predict alternating high and low values of the dependent variable. This will be challenging to sort out using conventional linear models, since there is not a linear effect in the manifest variables present for analysis (but some transformation of the manifest variables may be helpful). Left in its manifest form, the lasso will incorrectly conclude that this feature is extraneous and zero out its coefficient because there is no linear relationship. On the other hand, because there are axis-aligned splits in the data, a tree-based model like a random forest will probably do pretty well.
|
What are disadvantages of using the lasso for variable selection for regression?
|
Lasso is only useful if you're restricting yourself to consider models which are linear in the parameters to be estimated. Stated another way, the lasso does not evaluate whether you have chosen the c
|
What are disadvantages of using the lasso for variable selection for regression?
Lasso is only useful if you're restricting yourself to consider models which are linear in the parameters to be estimated. Stated another way, the lasso does not evaluate whether you have chosen the correct form of the relationship between the independent and dependent variable(s).
It is very plausible that there may be nonlinear, interactive or polynomial effects in an arbitrary data set. However, these alternative model specifications will only be evaluated if the user conducts that analysis; the lasso is not a substitute for doing so.
For a simple example of how this can go wrong, consider a data set in which disjoint intervals of the independent variable will predict alternating high and low values of the dependent variable. This will be challenging to sort out using conventional linear models, since there is not a linear effect in the manifest variables present for analysis (but some transformation of the manifest variables may be helpful). Left in its manifest form, the lasso will incorrectly conclude that this feature is extraneous and zero out its coefficient because there is no linear relationship. On the other hand, because there are axis-aligned splits in the data, a tree-based model like a random forest will probably do pretty well.
|
What are disadvantages of using the lasso for variable selection for regression?
Lasso is only useful if you're restricting yourself to consider models which are linear in the parameters to be estimated. Stated another way, the lasso does not evaluate whether you have chosen the c
|
9,364
|
What are disadvantages of using the lasso for variable selection for regression?
|
One practical disadvantage of lasso and other regularization techniques is finding the optimal regularization coefficient, lambda. Using cross validation to find this value can be just as expensive as stepwise selection techniques.
|
What are disadvantages of using the lasso for variable selection for regression?
|
One practical disadvantage of lasso and other regularization techniques is finding the optimal regularization coefficient, lambda. Using cross validation to find this value can be just as expensive as
|
What are disadvantages of using the lasso for variable selection for regression?
One practical disadvantage of lasso and other regularization techniques is finding the optimal regularization coefficient, lambda. Using cross validation to find this value can be just as expensive as stepwise selection techniques.
|
What are disadvantages of using the lasso for variable selection for regression?
One practical disadvantage of lasso and other regularization techniques is finding the optimal regularization coefficient, lambda. Using cross validation to find this value can be just as expensive as
|
9,365
|
What are disadvantages of using the lasso for variable selection for regression?
|
I am not a LASSO expert but I am an expert in time series. If you have time series data or spatial data then I would studiously avoid a solution that was predicated on independent observations. Furthermore if there are unknown deterministic effects that have played havoc with your data (level shifts / time trends etc) then LASSO would be even less a good hammer. In closing when you have time series data you often need to segment the data when faced with parameters or error variance that change over time.
|
What are disadvantages of using the lasso for variable selection for regression?
|
I am not a LASSO expert but I am an expert in time series. If you have time series data or spatial data then I would studiously avoid a solution that was predicated on independent observations. Furthe
|
What are disadvantages of using the lasso for variable selection for regression?
I am not a LASSO expert but I am an expert in time series. If you have time series data or spatial data then I would studiously avoid a solution that was predicated on independent observations. Furthermore if there are unknown deterministic effects that have played havoc with your data (level shifts / time trends etc) then LASSO would be even less a good hammer. In closing when you have time series data you often need to segment the data when faced with parameters or error variance that change over time.
|
What are disadvantages of using the lasso for variable selection for regression?
I am not a LASSO expert but I am an expert in time series. If you have time series data or spatial data then I would studiously avoid a solution that was predicated on independent observations. Furthe
|
9,366
|
What are disadvantages of using the lasso for variable selection for regression?
|
One big one is the difficulty of doing hypothesis testing. You can't easily figure out which variables are statistically significant with Lasso. With stepwise regression, you can do hypothesis testing to some degree, if you're careful about your treatment of multiple testing.
|
What are disadvantages of using the lasso for variable selection for regression?
|
One big one is the difficulty of doing hypothesis testing. You can't easily figure out which variables are statistically significant with Lasso. With stepwise regression, you can do hypothesis testi
|
What are disadvantages of using the lasso for variable selection for regression?
One big one is the difficulty of doing hypothesis testing. You can't easily figure out which variables are statistically significant with Lasso. With stepwise regression, you can do hypothesis testing to some degree, if you're careful about your treatment of multiple testing.
|
What are disadvantages of using the lasso for variable selection for regression?
One big one is the difficulty of doing hypothesis testing. You can't easily figure out which variables are statistically significant with Lasso. With stepwise regression, you can do hypothesis testi
|
9,367
|
What are disadvantages of using the lasso for variable selection for regression?
|
I have always found variable reduction techniques hurting the predictability, especially for multi classification. Stepwise elimination methods are also not very effective with highly correlated predictors, they are time consuming too. It is a tough area to deal with and it should be done differently on case to case basis. In my experience the dimensionality reduction techniques like LDA or PLS worked well, however they demand huge memory allocation if the number of predictors are too large in number. Even running LASSO on large size will demand huge memory allocation. Hence we should continuously look for more creative statistical based approaches for reducing large size of number of predictors.
|
What are disadvantages of using the lasso for variable selection for regression?
|
I have always found variable reduction techniques hurting the predictability, especially for multi classification. Stepwise elimination methods are also not very effective with highly correlated predi
|
What are disadvantages of using the lasso for variable selection for regression?
I have always found variable reduction techniques hurting the predictability, especially for multi classification. Stepwise elimination methods are also not very effective with highly correlated predictors, they are time consuming too. It is a tough area to deal with and it should be done differently on case to case basis. In my experience the dimensionality reduction techniques like LDA or PLS worked well, however they demand huge memory allocation if the number of predictors are too large in number. Even running LASSO on large size will demand huge memory allocation. Hence we should continuously look for more creative statistical based approaches for reducing large size of number of predictors.
|
What are disadvantages of using the lasso for variable selection for regression?
I have always found variable reduction techniques hurting the predictability, especially for multi classification. Stepwise elimination methods are also not very effective with highly correlated predi
|
9,368
|
What are disadvantages of using the lasso for variable selection for regression?
|
There is a simple reason why not using LASSO for variable selection. It just does not work as well as advertised. This is due to its fitting algorithm that includes a penalty factor that penalizes the model against higher regression coefficients. It seems like a good idea, as people think it always reduces model overfitting, and improves predictions (on new data). In reality it very often does the opposite ... increase model under-fitting and weakens prediction accuracy. You can see many examples of that by searching the Internet for Images and searching specifically for "LASSO MSE graph." Whenever such graphs show the lowest MSE at the beginning of the X-axis, it shows a LASSO that has failed (increase model under-fitting).
The above unintended consequences are due to the penalty algorithm. Because of it LASSO has no way of distinguishing between a strong causal variable with predictive information and an associated high regression coefficient and a weak variable with no explanatory or predictive information value that has a low regression coefficient. Often, LASSO will prefer the weak variable over the strong causal variable. Also, it may at times even cause to shift the directional signs of variables (shifting from one direction that makes sense to an opposite direction that does not). You can see many examples of that by searching the Internet for Images and searching specifically for "LASSO coefficient path".
|
What are disadvantages of using the lasso for variable selection for regression?
|
There is a simple reason why not using LASSO for variable selection. It just does not work as well as advertised. This is due to its fitting algorithm that includes a penalty factor that penalizes t
|
What are disadvantages of using the lasso for variable selection for regression?
There is a simple reason why not using LASSO for variable selection. It just does not work as well as advertised. This is due to its fitting algorithm that includes a penalty factor that penalizes the model against higher regression coefficients. It seems like a good idea, as people think it always reduces model overfitting, and improves predictions (on new data). In reality it very often does the opposite ... increase model under-fitting and weakens prediction accuracy. You can see many examples of that by searching the Internet for Images and searching specifically for "LASSO MSE graph." Whenever such graphs show the lowest MSE at the beginning of the X-axis, it shows a LASSO that has failed (increase model under-fitting).
The above unintended consequences are due to the penalty algorithm. Because of it LASSO has no way of distinguishing between a strong causal variable with predictive information and an associated high regression coefficient and a weak variable with no explanatory or predictive information value that has a low regression coefficient. Often, LASSO will prefer the weak variable over the strong causal variable. Also, it may at times even cause to shift the directional signs of variables (shifting from one direction that makes sense to an opposite direction that does not). You can see many examples of that by searching the Internet for Images and searching specifically for "LASSO coefficient path".
|
What are disadvantages of using the lasso for variable selection for regression?
There is a simple reason why not using LASSO for variable selection. It just does not work as well as advertised. This is due to its fitting algorithm that includes a penalty factor that penalizes t
|
9,369
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
|
Your premise that the elapsing of 40 years means that "surely things have changed" is quite dubious in a field relating to applied mathematics. In mathematical work it is often the case that early research on a model form provides all of its essential properties and theory pretty well, and then subsequent research makes smaller innovations/additions with diminishing marginal returns. We are still using mathematical rules from Euclid's Elements (circa 300BC) in many applied mathematical problems today, and while new geometries have been developed since this time, the subject certainly hasn't been transformed substantially every 40 years hence. In any case, I'll try to give you a rough guide to what I think are the most important developments in the field since Nelder and McCullagh's book.
In my view, the biggest change that has occurred in the field since this time is not so much extension of theory for GLMs (though there have been some marginal advances), but the further development and popularising of competing models, some of which are extensions of GLMs and some of which are contrary model forms. In particular, the past 40 years has seen a rapid increase in the use of GLMMs and copula methods.
Generalised Linear Mixed Models (GLMMs): Generalised linear mixed models (GLMMs) provide an extension of GLMs where there are added "random effects". You can find a nice review of these models in Dean and Nielsen (2007). These models were popularised in the statistics profession in the 1990s with a series of publications showing fitting and inference methods (see e.g., Breslow and Clayton 1993, Breslow and Lin 1995, Lin and Breslow 1996 and Lin and Zhang 1999). Later work in the 2000s gave good overviews of these models, including several textbooks on the subject. These models are now seen as a useful extension of GLMs that can allow for simpler modelling of correlated errors based on explanatory variables in the model. They are now widely used in applied statistics work in a range of fields and are usually included in university programs in statistics.
Copula methods: Copula methods were first introduced in Sklar (1959) but they didn't really start being used until later. The first statsitical conference on copula methods occurred in 1990 and they started being used more in finance after they were popularised by Li (2000). It is only within the last few decades that copula models have become broadly known in the statistics profession, and probably only in the last decade or so that they've begun to creep into university programs. These models are now presented as an alternative means of modelling the kinds of problems that might previously have been modelled using GLMs.
Some other major changes are set out in the other (excellent) answers below.
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
|
Your premise that the elapsing of 40 years means that "surely things have changed" is quite dubious in a field relating to applied mathematics. In mathematical work it is often the case that early re
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
Your premise that the elapsing of 40 years means that "surely things have changed" is quite dubious in a field relating to applied mathematics. In mathematical work it is often the case that early research on a model form provides all of its essential properties and theory pretty well, and then subsequent research makes smaller innovations/additions with diminishing marginal returns. We are still using mathematical rules from Euclid's Elements (circa 300BC) in many applied mathematical problems today, and while new geometries have been developed since this time, the subject certainly hasn't been transformed substantially every 40 years hence. In any case, I'll try to give you a rough guide to what I think are the most important developments in the field since Nelder and McCullagh's book.
In my view, the biggest change that has occurred in the field since this time is not so much extension of theory for GLMs (though there have been some marginal advances), but the further development and popularising of competing models, some of which are extensions of GLMs and some of which are contrary model forms. In particular, the past 40 years has seen a rapid increase in the use of GLMMs and copula methods.
Generalised Linear Mixed Models (GLMMs): Generalised linear mixed models (GLMMs) provide an extension of GLMs where there are added "random effects". You can find a nice review of these models in Dean and Nielsen (2007). These models were popularised in the statistics profession in the 1990s with a series of publications showing fitting and inference methods (see e.g., Breslow and Clayton 1993, Breslow and Lin 1995, Lin and Breslow 1996 and Lin and Zhang 1999). Later work in the 2000s gave good overviews of these models, including several textbooks on the subject. These models are now seen as a useful extension of GLMs that can allow for simpler modelling of correlated errors based on explanatory variables in the model. They are now widely used in applied statistics work in a range of fields and are usually included in university programs in statistics.
Copula methods: Copula methods were first introduced in Sklar (1959) but they didn't really start being used until later. The first statsitical conference on copula methods occurred in 1990 and they started being used more in finance after they were popularised by Li (2000). It is only within the last few decades that copula models have become broadly known in the statistics profession, and probably only in the last decade or so that they've begun to creep into university programs. These models are now presented as an alternative means of modelling the kinds of problems that might previously have been modelled using GLMs.
Some other major changes are set out in the other (excellent) answers below.
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
Your premise that the elapsing of 40 years means that "surely things have changed" is quite dubious in a field relating to applied mathematics. In mathematical work it is often the case that early re
|
9,370
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
|
In addition to Ben's great answer (+1):
Penalised regression models ($L_1$, $L_2$, elastic net, SCAD (Smoothly clipped absolute deviation), LARS (least-angle regression), MCP (Multiple Change Points), PCR (Principal Component Regression), PLS (Partial least squares) etc.) really came to the fore and became especially relevant for $n\ll p$ applications. While it can be argued that Hoerl & Kennard's Ridge regression: Biased estimation for nonorthogonal problems came out in 1970 (and actually Wold's work on PLS was in 1966), it was until the last 20 to 25 years that most of the adoption and implications of these techniques became prominent within Statistics programmes and curricula.
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
|
In addition to Ben's great answer (+1):
Penalised regression models ($L_1$, $L_2$, elastic net, SCAD (Smoothly clipped absolute deviation), LARS (least-angle regression), MCP (Multiple Change Points)
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
In addition to Ben's great answer (+1):
Penalised regression models ($L_1$, $L_2$, elastic net, SCAD (Smoothly clipped absolute deviation), LARS (least-angle regression), MCP (Multiple Change Points), PCR (Principal Component Regression), PLS (Partial least squares) etc.) really came to the fore and became especially relevant for $n\ll p$ applications. While it can be argued that Hoerl & Kennard's Ridge regression: Biased estimation for nonorthogonal problems came out in 1970 (and actually Wold's work on PLS was in 1966), it was until the last 20 to 25 years that most of the adoption and implications of these techniques became prominent within Statistics programmes and curricula.
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
In addition to Ben's great answer (+1):
Penalised regression models ($L_1$, $L_2$, elastic net, SCAD (Smoothly clipped absolute deviation), LARS (least-angle regression), MCP (Multiple Change Points)
|
9,371
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
|
To add to Ben's great answer, since Nelder and McCullagh's GLMs (1983) is mentioned, I think it's fair to say that one important development after that was the extension of the GLM idea to other families of distributions, that generalize the single parameter exponential family.
Important examples include both Beta and Dirichlet regressions, which are not GLMs in the N&M sense (see Why Beta/Dirichlet Regression are not considered Generalized Linear Models?). Both are important to analyze continuous compositional data, in univariate and multivariate senses, respectively, as alternatives to log-ratio analysis. Here are the respective references:
Ferrari, Silvia, and Francisco Cribari-Neto. "Beta regression for modelling rates and proportions." Journal of applied statistics 31, no. 7 (2004): 799-815.
Hijazi, Rafiq Hamed. Analysis of compositional data using Dirichlet covariate models (thesis). American University, 2003.
The Bayesian treatment of conditional models is much more direct, but only more recently the machinery (i.e. software and hardware) made it accessible to be used by most (BUGS was release in the 90s, for example). I cannot pinpoint a single reference for this however, but reading on Bayesian GLMs can be of help.
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
|
To add to Ben's great answer, since Nelder and McCullagh's GLMs (1983) is mentioned, I think it's fair to say that one important development after that was the extension of the GLM idea to other famil
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
To add to Ben's great answer, since Nelder and McCullagh's GLMs (1983) is mentioned, I think it's fair to say that one important development after that was the extension of the GLM idea to other families of distributions, that generalize the single parameter exponential family.
Important examples include both Beta and Dirichlet regressions, which are not GLMs in the N&M sense (see Why Beta/Dirichlet Regression are not considered Generalized Linear Models?). Both are important to analyze continuous compositional data, in univariate and multivariate senses, respectively, as alternatives to log-ratio analysis. Here are the respective references:
Ferrari, Silvia, and Francisco Cribari-Neto. "Beta regression for modelling rates and proportions." Journal of applied statistics 31, no. 7 (2004): 799-815.
Hijazi, Rafiq Hamed. Analysis of compositional data using Dirichlet covariate models (thesis). American University, 2003.
The Bayesian treatment of conditional models is much more direct, but only more recently the machinery (i.e. software and hardware) made it accessible to be used by most (BUGS was release in the 90s, for example). I cannot pinpoint a single reference for this however, but reading on Bayesian GLMs can be of help.
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
To add to Ben's great answer, since Nelder and McCullagh's GLMs (1983) is mentioned, I think it's fair to say that one important development after that was the extension of the GLM idea to other famil
|
9,372
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
|
Hence, what would be the most important developments since Nelder and McCullagh's book came out regarding GLM theory and application? What am I missing from just reading that book? How should I supplement my knowledge?
Numerical methods if you want to implement the theory on your own.
Computers are now more powerful and computational methods have advanced.
For specific examples,
Firebug mentioned this in their answer about Bayesian methods.
Bolker et al. (2009) include a high-level overview of different methods in their article about GLMMs.
Personally, I would look at two specific areas for numerical methods:
The approach used for speed and larger datasets. For example, Stan is much faster than JAGS for Bayesian methods under most situations. Likewise, Julia can be quicker than R. Both Stan and Julia were created as response to people wanted quicker languages.
The assumptions of different GLM methods for ideas such as degrees for freedom and treatment of variance structures.
My own experience with Stan has shown me that mathematical ideas can be sped up in computer languages using methods that seem strange to me and not counter intuitively. Browse the Stan forum for discussion and examples such as the "folk theorem".
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
|
Hence, what would be the most important developments since Nelder and McCullagh's book came out regarding GLM theory and application? What am I missing from just reading that book? How should I supple
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?
Hence, what would be the most important developments since Nelder and McCullagh's book came out regarding GLM theory and application? What am I missing from just reading that book? How should I supplement my knowledge?
Numerical methods if you want to implement the theory on your own.
Computers are now more powerful and computational methods have advanced.
For specific examples,
Firebug mentioned this in their answer about Bayesian methods.
Bolker et al. (2009) include a high-level overview of different methods in their article about GLMMs.
Personally, I would look at two specific areas for numerical methods:
The approach used for speed and larger datasets. For example, Stan is much faster than JAGS for Bayesian methods under most situations. Likewise, Julia can be quicker than R. Both Stan and Julia were created as response to people wanted quicker languages.
The assumptions of different GLM methods for ideas such as degrees for freedom and treatment of variance structures.
My own experience with Stan has shown me that mathematical ideas can be sped up in computer languages using methods that seem strange to me and not counter intuitively. Browse the Stan forum for discussion and examples such as the "folk theorem".
|
What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old
Hence, what would be the most important developments since Nelder and McCullagh's book came out regarding GLM theory and application? What am I missing from just reading that book? How should I supple
|
9,373
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
Obviously, k-means needs to be able to compute means.
However, there is a well-known variation of it known as k-medoids or PAM (Partitioning Around Medoids), where the medoid is the existing object most central to the cluster. K-medoids only needs the pairwise distances.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
Obviously, k-means needs to be able to compute means.
However, there is a well-known variation of it known as k-medoids or PAM (Partitioning Around Medoids), where the medoid is the existing object mo
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
Obviously, k-means needs to be able to compute means.
However, there is a well-known variation of it known as k-medoids or PAM (Partitioning Around Medoids), where the medoid is the existing object most central to the cluster. K-medoids only needs the pairwise distances.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
Obviously, k-means needs to be able to compute means.
However, there is a well-known variation of it known as k-medoids or PAM (Partitioning Around Medoids), where the medoid is the existing object mo
|
9,374
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
You are exactly describing the problem setting of kernel $k$-means; when you cannot represent a data point as a Euclidean vector, but if you can still calculate (or define) the inner product between two data points then you can kernelize the algorithm. The following webpage provides brief description of the algorithm:
Kernel $k$-means page
This kernel trick is a very popular and fundamental idea in Statistics and machine learning.
Wiki page on the kernel trick
If you are interested, the book Learning with Kernels from by Bernhard Schölkopf and Alexander J. Smola will be a very nice introduction.
This note from Max Welling seems very nice; also, if you are using R you can take a look at this R package.
MDS might be a one way to solve your problem, but it does not directly attack the problem you want to solve; while kernel k-means does.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
You are exactly describing the problem setting of kernel $k$-means; when you cannot represent a data point as a Euclidean vector, but if you can still calculate (or define) the inner product between t
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
You are exactly describing the problem setting of kernel $k$-means; when you cannot represent a data point as a Euclidean vector, but if you can still calculate (or define) the inner product between two data points then you can kernelize the algorithm. The following webpage provides brief description of the algorithm:
Kernel $k$-means page
This kernel trick is a very popular and fundamental idea in Statistics and machine learning.
Wiki page on the kernel trick
If you are interested, the book Learning with Kernels from by Bernhard Schölkopf and Alexander J. Smola will be a very nice introduction.
This note from Max Welling seems very nice; also, if you are using R you can take a look at this R package.
MDS might be a one way to solve your problem, but it does not directly attack the problem you want to solve; while kernel k-means does.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
You are exactly describing the problem setting of kernel $k$-means; when you cannot represent a data point as a Euclidean vector, but if you can still calculate (or define) the inner product between t
|
9,375
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
@gung is absolutely correct suggesting you multidimensional scaling (MDS) as a preliminary tool to create points X dimensions data out of distance matrix. I'm to add just few strokes. K-means clustering implies euclidean distances. MDS will give you points-in-dimensions coordinates thereby guaranteeing you euclidean distances. You should use metric MDS and request number of dimensions as large as possible, because your aim is to minimize error of reconstracting the data, not to map it in 2D or 3D.
What if you don't have MDS software at hand but have some matrix functions such as eigenvalue decomposition or singular-value decomposition? Then you could do simple metric MDS yourself - Torgerson MDS, also known as Principal Coordinates analysis (PCoA). It amounts to a bit "twisted" Principal Components analysis. I won't be describing it here, although it is quite simple. You can read about it in many places, e.g. here.
Finally, it is possible to program "K-means for distance matrix input" directly - without calling or writing functions doing PCoA or another metric MDS. We know, that (a) the sum of squared deviations from centroid is equal to the sum of pairwise squared Euclidean distances divided by the number of points; and (b) know how to compute distances between cluster centroids out of the distance matrix; (c) and we further know how Sums-of-squares are interrelated in K-means. All it together makes the writing of the algorithm you want a straightforward and not a complex undertaking. One should remember though that K-means is for Euclidean distances / euclidean space only. Use K-medoids or other methods for non-euclidean distances.
A similar question.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
@gung is absolutely correct suggesting you multidimensional scaling (MDS) as a preliminary tool to create points X dimensions data out of distance matrix. I'm to add just few strokes. K-means clusteri
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
@gung is absolutely correct suggesting you multidimensional scaling (MDS) as a preliminary tool to create points X dimensions data out of distance matrix. I'm to add just few strokes. K-means clustering implies euclidean distances. MDS will give you points-in-dimensions coordinates thereby guaranteeing you euclidean distances. You should use metric MDS and request number of dimensions as large as possible, because your aim is to minimize error of reconstracting the data, not to map it in 2D or 3D.
What if you don't have MDS software at hand but have some matrix functions such as eigenvalue decomposition or singular-value decomposition? Then you could do simple metric MDS yourself - Torgerson MDS, also known as Principal Coordinates analysis (PCoA). It amounts to a bit "twisted" Principal Components analysis. I won't be describing it here, although it is quite simple. You can read about it in many places, e.g. here.
Finally, it is possible to program "K-means for distance matrix input" directly - without calling or writing functions doing PCoA or another metric MDS. We know, that (a) the sum of squared deviations from centroid is equal to the sum of pairwise squared Euclidean distances divided by the number of points; and (b) know how to compute distances between cluster centroids out of the distance matrix; (c) and we further know how Sums-of-squares are interrelated in K-means. All it together makes the writing of the algorithm you want a straightforward and not a complex undertaking. One should remember though that K-means is for Euclidean distances / euclidean space only. Use K-medoids or other methods for non-euclidean distances.
A similar question.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
@gung is absolutely correct suggesting you multidimensional scaling (MDS) as a preliminary tool to create points X dimensions data out of distance matrix. I'm to add just few strokes. K-means clusteri
|
9,376
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
I certainly don't know how it's "normally" done, and for the record, I don't know much about cluster analysis. However, are you familiar with Multidimensional Scaling? (Here's another reference, the wiki, and you could search CV under the multidimensional-scaling tag.) Multidimensional scaling takes in a matrix of pairwise distances, which sounds like your situation. From the MDS, you can get the locations of the objects in the lowest-dimensional space necessary to adequately represent them. I would guess you could use those locations to do a subsequent cluster analysis like k-means; alternatively, once you had the output, you might no longer need the CA.
I don't know if you use R, but here is the task view for Psychometrics, which includes a section on MDS in R. Hope that helps.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
I certainly don't know how it's "normally" done, and for the record, I don't know much about cluster analysis. However, are you familiar with Multidimensional Scaling? (Here's another reference, the
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
I certainly don't know how it's "normally" done, and for the record, I don't know much about cluster analysis. However, are you familiar with Multidimensional Scaling? (Here's another reference, the wiki, and you could search CV under the multidimensional-scaling tag.) Multidimensional scaling takes in a matrix of pairwise distances, which sounds like your situation. From the MDS, you can get the locations of the objects in the lowest-dimensional space necessary to adequately represent them. I would guess you could use those locations to do a subsequent cluster analysis like k-means; alternatively, once you had the output, you might no longer need the CA.
I don't know if you use R, but here is the task view for Psychometrics, which includes a section on MDS in R. Hope that helps.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
I certainly don't know how it's "normally" done, and for the record, I don't know much about cluster analysis. However, are you familiar with Multidimensional Scaling? (Here's another reference, the
|
9,377
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
Optimal Cluster Preserving Embedding of Nonmetric Proximity Data should fit your case. The paper shows how you can obtain a metric vector representation of your objects given only a matrix of pairwise dissimilarity function such that the cluster assignments will be preserved for a range of clustering algorithms, including $k$-means.
In your case, what you basically need to do is:
Have your dissimilarity matrix $D$ with zero self-dissimilarity.
In case it is not symmetric already, symmetrize by averaging $D_{ij}$ and $D_{ji}$.
center it (i.e. subtract row and column mean) to obtain $D^c$
Calculate $S^c = -\frac{1}{2}D^c$
Perform a spectral shift: Subtract the $S^c$'s smallest eigenvalue from $S^c$'s spectrum to ensure it becomes positive-semidefinite. Do this to obtain $\tilde S^c$.
Calculate the eigenvector decomposition of $\tilde S^c = V \Lambda V^\top$.
Restore a vector representation in a $n-1$-dimensional metric space of your data: $X = V\Lambda^{1/2}$.
This assumes that $n$ is not too large. If it is, additionally doing PCAwill give you a more meaningful representation of the data. (The paper describes how to do this, too).
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
Optimal Cluster Preserving Embedding of Nonmetric Proximity Data should fit your case. The paper shows how you can obtain a metric vector representation of your objects given only a matrix of pairwise
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
Optimal Cluster Preserving Embedding of Nonmetric Proximity Data should fit your case. The paper shows how you can obtain a metric vector representation of your objects given only a matrix of pairwise dissimilarity function such that the cluster assignments will be preserved for a range of clustering algorithms, including $k$-means.
In your case, what you basically need to do is:
Have your dissimilarity matrix $D$ with zero self-dissimilarity.
In case it is not symmetric already, symmetrize by averaging $D_{ij}$ and $D_{ji}$.
center it (i.e. subtract row and column mean) to obtain $D^c$
Calculate $S^c = -\frac{1}{2}D^c$
Perform a spectral shift: Subtract the $S^c$'s smallest eigenvalue from $S^c$'s spectrum to ensure it becomes positive-semidefinite. Do this to obtain $\tilde S^c$.
Calculate the eigenvector decomposition of $\tilde S^c = V \Lambda V^\top$.
Restore a vector representation in a $n-1$-dimensional metric space of your data: $X = V\Lambda^{1/2}$.
This assumes that $n$ is not too large. If it is, additionally doing PCAwill give you a more meaningful representation of the data. (The paper describes how to do this, too).
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
Optimal Cluster Preserving Embedding of Nonmetric Proximity Data should fit your case. The paper shows how you can obtain a metric vector representation of your objects given only a matrix of pairwise
|
9,378
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
Your data can also be viewed as a network, and you can use one of the many network clustering algorithms available. For this you would probably need to apply a threshold on the edge weights, and transform distances to similarities. It is not the 'statistics' way of doing things, but cluster analysis is an underspecified problem to begin with, and as explorative tools network clustering algorithms perform very well.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
Your data can also be viewed as a network, and you can use one of the many network clustering algorithms available. For this you would probably need to apply a threshold on the edge weights, and trans
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
Your data can also be viewed as a network, and you can use one of the many network clustering algorithms available. For this you would probably need to apply a threshold on the edge weights, and transform distances to similarities. It is not the 'statistics' way of doing things, but cluster analysis is an underspecified problem to begin with, and as explorative tools network clustering algorithms perform very well.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
Your data can also be viewed as a network, and you can use one of the many network clustering algorithms available. For this you would probably need to apply a threshold on the edge weights, and trans
|
9,379
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
I don't know why it is so uncommon in literature, however the solution suggested by @gung and @ttnphns (first projecting your pairwise distances into a Euclidean space using Principal Coordinates Analysis, for example through this package if you use R, and then doing K-means usual way) is simple and doesn't require specialized algorithms. I personally used it here embedded in an optimization framework and it worked fairly well.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
I don't know why it is so uncommon in literature, however the solution suggested by @gung and @ttnphns (first projecting your pairwise distances into a Euclidean space using Principal Coordinates Anal
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
I don't know why it is so uncommon in literature, however the solution suggested by @gung and @ttnphns (first projecting your pairwise distances into a Euclidean space using Principal Coordinates Analysis, for example through this package if you use R, and then doing K-means usual way) is simple and doesn't require specialized algorithms. I personally used it here embedded in an optimization framework and it worked fairly well.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
I don't know why it is so uncommon in literature, however the solution suggested by @gung and @ttnphns (first projecting your pairwise distances into a Euclidean space using Principal Coordinates Anal
|
9,380
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
|
With regard to clustering and MDS I would suggest the following resources:
Numerical Ecology (Pierre Legendre and Louis Legendre): http://www.sciencedirect.com/science/bookseries/01678892/20 or http://tinyurl.com/cgrdfqk (google books)
-- chapter on 'Ecological resemblance'
Cluster Analysis (Brian S. Everitt, Sabine Landau, Morven Leese, Daniel Stahl): http://tinyurl.com/bld7k8h (google books)
-- chapter on 'Measurement of proximity'
Course 'Biostatistics-II, Multivariate Methods' by Prof. Brian C. McCarthy at Ohio University: http://www.ohio.edu/plantbio/staff/mccarthy/multivariate/multivariate.htm
These references also nicely cover the topics of similarity and distance functions (proximity measures) for binary and continuous data.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
|
With regard to clustering and MDS I would suggest the following resources:
Numerical Ecology (Pierre Legendre and Louis Legendre): http://www.sciencedirect.com/science/bookseries/01678892/20 or http:
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data
With regard to clustering and MDS I would suggest the following resources:
Numerical Ecology (Pierre Legendre and Louis Legendre): http://www.sciencedirect.com/science/bookseries/01678892/20 or http://tinyurl.com/cgrdfqk (google books)
-- chapter on 'Ecological resemblance'
Cluster Analysis (Brian S. Everitt, Sabine Landau, Morven Leese, Daniel Stahl): http://tinyurl.com/bld7k8h (google books)
-- chapter on 'Measurement of proximity'
Course 'Biostatistics-II, Multivariate Methods' by Prof. Brian C. McCarthy at Ohio University: http://www.ohio.edu/plantbio/staff/mccarthy/multivariate/multivariate.htm
These references also nicely cover the topics of similarity and distance functions (proximity measures) for binary and continuous data.
|
Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features da
With regard to clustering and MDS I would suggest the following resources:
Numerical Ecology (Pierre Legendre and Louis Legendre): http://www.sciencedirect.com/science/bookseries/01678892/20 or http:
|
9,381
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
|
There are two main approaches to the New Causal Revolution. One is the graphical approach (as in, directed acyclic graphs), championed by Judea Pearl. The other is the potential outcomes framework, championed by Donald Rubin.
For the graphical approach, I recommend these books in this order:
The Book of Why, by Pearl and MacKenzie. Prerequisite: introductory statistics.
Causal Inference in Statistics: A Primer, by Pearl, Glymour, and Jewell. Prerequisites: the full calculus sequence, followed by mathematical statistics.
Causality: Models, Reasoning, and Inference, 2nd Ed., by Pearl. This book is extremely difficult (I have not read it, though I have skimmed in parts) but has almost everything in there. One recent development not in this book is the maximal ancestor graph approach. Prerequisites: first mathematical statistics, then Bayesian statistics (I would recommend first Bayesian Statistics for Beginners: a step-by-step approach and then Introduction to Bayesian Statistics, 3rd Ed.; and finally Bayesian networks). Pearl's book has accompanying homework sets on Pearl's webpage: go to CAUSALITY, then 7. Viewgraphs and homeworks for instructors. Indeed, Pearl's UCLA webpage has errata for all three of the above books.
For the potential outcomes framework, the main book appears to be Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction, by Rubin and Imbens. I have not read it; but the prerequisites appear to be mathematical statistics at least - analysis and design of experiments wouldn't hurt, nor would Bayesian statistics (see #3 above for recommendations there). One weakness of this book is that it has no exercises or errata page.
The two approaches have different strengths and weaknesses, but as noted by Carlos in his comment, they are theoretically unified via Structural Causal Modeling - addressed in several of the books above.
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
|
There are two main approaches to the New Causal Revolution. One is the graphical approach (as in, directed acyclic graphs), championed by Judea Pearl. The other is the potential outcomes framework, ch
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
There are two main approaches to the New Causal Revolution. One is the graphical approach (as in, directed acyclic graphs), championed by Judea Pearl. The other is the potential outcomes framework, championed by Donald Rubin.
For the graphical approach, I recommend these books in this order:
The Book of Why, by Pearl and MacKenzie. Prerequisite: introductory statistics.
Causal Inference in Statistics: A Primer, by Pearl, Glymour, and Jewell. Prerequisites: the full calculus sequence, followed by mathematical statistics.
Causality: Models, Reasoning, and Inference, 2nd Ed., by Pearl. This book is extremely difficult (I have not read it, though I have skimmed in parts) but has almost everything in there. One recent development not in this book is the maximal ancestor graph approach. Prerequisites: first mathematical statistics, then Bayesian statistics (I would recommend first Bayesian Statistics for Beginners: a step-by-step approach and then Introduction to Bayesian Statistics, 3rd Ed.; and finally Bayesian networks). Pearl's book has accompanying homework sets on Pearl's webpage: go to CAUSALITY, then 7. Viewgraphs and homeworks for instructors. Indeed, Pearl's UCLA webpage has errata for all three of the above books.
For the potential outcomes framework, the main book appears to be Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction, by Rubin and Imbens. I have not read it; but the prerequisites appear to be mathematical statistics at least - analysis and design of experiments wouldn't hurt, nor would Bayesian statistics (see #3 above for recommendations there). One weakness of this book is that it has no exercises or errata page.
The two approaches have different strengths and weaknesses, but as noted by Carlos in his comment, they are theoretically unified via Structural Causal Modeling - addressed in several of the books above.
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
There are two main approaches to the New Causal Revolution. One is the graphical approach (as in, directed acyclic graphs), championed by Judea Pearl. The other is the potential outcomes framework, ch
|
9,382
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
|
Causal inference is a part of statistical inference, so it falls within the field of statistics. Causal inference generally requires inference of statistical associations under an appropriate experimental structure that limits statistical associations to certain structures. This is dealt with in specialist books that look at the interaction of causality and probability, most notably the excellent works of Judea Pearl (see e.g., Pearl 2009, Pearl 2015, and Pearl, Glymour and Jewell 2016) and the potential-outcome framework of Donald Rubin (see e.g., Holland 1986, Rubin 1991, Rubin 2005). Pearl has criticised the statistical profession for paying insufficient attention to this material (see related question here), but his works nevertheless fall within the field of statistics and they can properly be regarded as contributions in the interface of probability, causality, and statistics.
As you will see from reading these works, it is possible to augment traditional probability theory by adding an operator to represent an action/intervention in the system (called the "do" operator), which allows causality to be built into the analysis at an axiomatic level. This is a useful extension of traditional probability theory. Presently, the statistics curriculum for students does not incorporate much of this material, except in some specialist classes that occur late in the program. It is my hope that this extension to probability theory will eventually be built into the statistical curriculum in a more cohesive manner, so that students become fluent in causal reasoning earlier on in their statistical studies, rather than seeing it as an add-on that they encounter only later in their career.
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
|
Causal inference is a part of statistical inference, so it falls within the field of statistics. Causal inference generally requires inference of statistical associations under an appropriate experim
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
Causal inference is a part of statistical inference, so it falls within the field of statistics. Causal inference generally requires inference of statistical associations under an appropriate experimental structure that limits statistical associations to certain structures. This is dealt with in specialist books that look at the interaction of causality and probability, most notably the excellent works of Judea Pearl (see e.g., Pearl 2009, Pearl 2015, and Pearl, Glymour and Jewell 2016) and the potential-outcome framework of Donald Rubin (see e.g., Holland 1986, Rubin 1991, Rubin 2005). Pearl has criticised the statistical profession for paying insufficient attention to this material (see related question here), but his works nevertheless fall within the field of statistics and they can properly be regarded as contributions in the interface of probability, causality, and statistics.
As you will see from reading these works, it is possible to augment traditional probability theory by adding an operator to represent an action/intervention in the system (called the "do" operator), which allows causality to be built into the analysis at an axiomatic level. This is a useful extension of traditional probability theory. Presently, the statistics curriculum for students does not incorporate much of this material, except in some specialist classes that occur late in the program. It is my hope that this extension to probability theory will eventually be built into the statistical curriculum in a more cohesive manner, so that students become fluent in causal reasoning earlier on in their statistical studies, rather than seeing it as an add-on that they encounter only later in their career.
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
Causal inference is a part of statistical inference, so it falls within the field of statistics. Causal inference generally requires inference of statistical associations under an appropriate experim
|
9,383
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
|
Adrian Keister provided a great answer. My answer continues his. It took me a while to realize that the 2 different approaches to causal inference (graphical approach and potential outcomes) are complementary. To get the best appreciation for how these 2 approaches to causal inference work together I would recommend reading Morgan & Winship "Counterfactuals and Causal Inference". From this book you will learn that there are 3 main ways to estimate causal effects: 1) backdoor criterion, 2) instrumental variables, and 3) front-door criterion.
While there are 3 methods, the overwhelming majority of causal inference journal articles in econometrics and social science use method#2: instrumental variables. Incidentally, for the instrumental variable approach the DAG is in many ways unnecessary because it always has the same skeleton and can be easily described in words. One may say that for IV a DAG is crucial; yes it is because it must look like the one below (Z is the instrument). But since all IV DAGs must look like this, how crucial is the DAG in IV and what role does it play other than being a nice visualization? A DAG is crucial for method#1: backdoor criterion. But in practice, it is difficult to argue convincingly that a suitable DAG has been constructed. In econometrics or social science you will hardly find a journal article using this method. And if you do, it is almost certainly not going to contain a DAG. From what I've seen this method is used successfully quite often in the medical field. For method#3: front-door criterion the DAG is usually relatively simple, with only a couple front-door paths, and thus it can be easily described in words. So, at the end of the day, the graphical approach is a nice add-on but unless you are estimating causal effects using backdoor criterion (which I find to be rare outside the medical field) or with an elaborate front-door criterion (also relatively rare) a DAG isn't crucial. In contrast, the potential outcomes framework underlies the very substance of causal inference and, frankly, you can't even define causal inference without it. The 2 books by Angrist and Pischke are somewhat unambiguously the best introduction to the potential outcomes approach (in econometrics and social science); the book by Hernan and Robins seems to be highly valued as well, particularly in public health/medical field (but I haven't read it in full). What I consider to be the most valuable contribution of the graphical approach camp is to raise awareness around collider variables; some of its implications (e.g. endogenous selection bias) are critical, top of mind considerations in causal inference across disciplines.
My favorite resources:
Here is a terrific video series by Abadie, Angrist, and Walters at AEA on Cross-Sectional Econometrics, which can serve as an introduction to the potential outcome framework: https://www.aeaweb.org/conference/cont-ed/2017-webcasts
Here is an equally terrific video introduction to the graphical method - an edX course by Miguel Hernan with some incredibly interesting practical examples (primarily from epidemiology) https://www.edx.org/course/causal-diagrams-draw-your-assumptions-before-your
(diagram credit: https://donskerclass.github.io/EconometricsII/ControlandIV.html)
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
|
Adrian Keister provided a great answer. My answer continues his. It took me a while to realize that the 2 different approaches to causal inference (graphical approach and potential outcomes) are compl
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
Adrian Keister provided a great answer. My answer continues his. It took me a while to realize that the 2 different approaches to causal inference (graphical approach and potential outcomes) are complementary. To get the best appreciation for how these 2 approaches to causal inference work together I would recommend reading Morgan & Winship "Counterfactuals and Causal Inference". From this book you will learn that there are 3 main ways to estimate causal effects: 1) backdoor criterion, 2) instrumental variables, and 3) front-door criterion.
While there are 3 methods, the overwhelming majority of causal inference journal articles in econometrics and social science use method#2: instrumental variables. Incidentally, for the instrumental variable approach the DAG is in many ways unnecessary because it always has the same skeleton and can be easily described in words. One may say that for IV a DAG is crucial; yes it is because it must look like the one below (Z is the instrument). But since all IV DAGs must look like this, how crucial is the DAG in IV and what role does it play other than being a nice visualization? A DAG is crucial for method#1: backdoor criterion. But in practice, it is difficult to argue convincingly that a suitable DAG has been constructed. In econometrics or social science you will hardly find a journal article using this method. And if you do, it is almost certainly not going to contain a DAG. From what I've seen this method is used successfully quite often in the medical field. For method#3: front-door criterion the DAG is usually relatively simple, with only a couple front-door paths, and thus it can be easily described in words. So, at the end of the day, the graphical approach is a nice add-on but unless you are estimating causal effects using backdoor criterion (which I find to be rare outside the medical field) or with an elaborate front-door criterion (also relatively rare) a DAG isn't crucial. In contrast, the potential outcomes framework underlies the very substance of causal inference and, frankly, you can't even define causal inference without it. The 2 books by Angrist and Pischke are somewhat unambiguously the best introduction to the potential outcomes approach (in econometrics and social science); the book by Hernan and Robins seems to be highly valued as well, particularly in public health/medical field (but I haven't read it in full). What I consider to be the most valuable contribution of the graphical approach camp is to raise awareness around collider variables; some of its implications (e.g. endogenous selection bias) are critical, top of mind considerations in causal inference across disciplines.
My favorite resources:
Here is a terrific video series by Abadie, Angrist, and Walters at AEA on Cross-Sectional Econometrics, which can serve as an introduction to the potential outcome framework: https://www.aeaweb.org/conference/cont-ed/2017-webcasts
Here is an equally terrific video introduction to the graphical method - an edX course by Miguel Hernan with some incredibly interesting practical examples (primarily from epidemiology) https://www.edx.org/course/causal-diagrams-draw-your-assumptions-before-your
(diagram credit: https://donskerclass.github.io/EconometricsII/ControlandIV.html)
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
Adrian Keister provided a great answer. My answer continues his. It took me a while to realize that the 2 different approaches to causal inference (graphical approach and potential outcomes) are compl
|
9,384
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
|
Simple answer. Yes - the scientific method is there to help FIND and confirm causal relationships. It requires an hypothesis, then a controlled experiment, then a (statistically verified) conclusion. As data are gathered to support the hypothesis, it becomes more and more certain that "x" causes "y".
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
|
Simple answer. Yes - the scientific method is there to help FIND and confirm causal relationships. It requires an hypothesis, then a controlled experiment, then a (statistically verified) conclusion.
|
Is there any theory or field of study that concerns itself with modeling causation rather than correlation?
Simple answer. Yes - the scientific method is there to help FIND and confirm causal relationships. It requires an hypothesis, then a controlled experiment, then a (statistically verified) conclusion. As data are gathered to support the hypothesis, it becomes more and more certain that "x" causes "y".
|
Is there any theory or field of study that concerns itself with modeling causation rather than corre
Simple answer. Yes - the scientific method is there to help FIND and confirm causal relationships. It requires an hypothesis, then a controlled experiment, then a (statistically verified) conclusion.
|
9,385
|
Book recommendations for multivariate analysis
|
Off the top of my head, I would say that the following general purpose books are rather interesting as a first start:
Izenman, J. Modern Multivariate Statistical Techniques: Regression, Classification, and Manifold Learning. Springer. companion website
Tinsley, H. and Brown, S. (2000). Handbook of Applied Multivariate Statistics and Mathematical Modeling. Academic Press.
There is also many applied textbook, like
Everitt, B.S. (2005). An R and S-Plus® Companion to Multivariate Analysis. Springer. companion website
It is difficult to suggest you specific books as there are many ones that are domain-specific (e.g. social sciences, machine learning, categorical data, biomedical data).
|
Book recommendations for multivariate analysis
|
Off the top of my head, I would say that the following general purpose books are rather interesting as a first start:
Izenman, J. Modern Multivariate Statistical Techniques: Regression, Classificatio
|
Book recommendations for multivariate analysis
Off the top of my head, I would say that the following general purpose books are rather interesting as a first start:
Izenman, J. Modern Multivariate Statistical Techniques: Regression, Classification, and Manifold Learning. Springer. companion website
Tinsley, H. and Brown, S. (2000). Handbook of Applied Multivariate Statistics and Mathematical Modeling. Academic Press.
There is also many applied textbook, like
Everitt, B.S. (2005). An R and S-Plus® Companion to Multivariate Analysis. Springer. companion website
It is difficult to suggest you specific books as there are many ones that are domain-specific (e.g. social sciences, machine learning, categorical data, biomedical data).
|
Book recommendations for multivariate analysis
Off the top of my head, I would say that the following general purpose books are rather interesting as a first start:
Izenman, J. Modern Multivariate Statistical Techniques: Regression, Classificatio
|
9,386
|
Book recommendations for multivariate analysis
|
Almost the same question was asked recently on the ISOSTAT listserver (frequented by college professors):
If you had a strong undergraduate student who was interested in learning about various multivariate methods (e.g. PCA, MANOVA, discriminant analysis, ...) is there a good, accessible book you might recommend she/he purchase?
Here are the responses:
Perhaps "Applied Multivariate Data Analysis", 2nd edition, by Everitt, B. and Dunn, G. (2001), published by Arnold. [Roger Johnson]
Rencher's Methods of Multivariate Analysis is a great resource. I think a strong undergraduate student could grasp the material. [Philip Yates]. I'm fond of Rencher's approach. He offers good intuition and examples. But the matrix algebra can get pretty thick; I'm not sure "accessible" is an adjective I'd use. Nevertheless, I've taught undergrads successfully with his book. His second edition is a good improvement over the first. [Paul Velleman]
Applied Multivariate Statistics by Johnson and Wichern. [Brad Hartlaub]
I haven't done much with it, but I do like the idea of using modern techniques and modern data sets: Modern Multivariate Statistical Techniques by Alan Julian Izenman. (I own the book, it has the topics you are looking for, and the text seems accessible.) [Johanna Hardin]
|
Book recommendations for multivariate analysis
|
Almost the same question was asked recently on the ISOSTAT listserver (frequented by college professors):
If you had a strong undergraduate student who was interested in learning about various multiv
|
Book recommendations for multivariate analysis
Almost the same question was asked recently on the ISOSTAT listserver (frequented by college professors):
If you had a strong undergraduate student who was interested in learning about various multivariate methods (e.g. PCA, MANOVA, discriminant analysis, ...) is there a good, accessible book you might recommend she/he purchase?
Here are the responses:
Perhaps "Applied Multivariate Data Analysis", 2nd edition, by Everitt, B. and Dunn, G. (2001), published by Arnold. [Roger Johnson]
Rencher's Methods of Multivariate Analysis is a great resource. I think a strong undergraduate student could grasp the material. [Philip Yates]. I'm fond of Rencher's approach. He offers good intuition and examples. But the matrix algebra can get pretty thick; I'm not sure "accessible" is an adjective I'd use. Nevertheless, I've taught undergrads successfully with his book. His second edition is a good improvement over the first. [Paul Velleman]
Applied Multivariate Statistics by Johnson and Wichern. [Brad Hartlaub]
I haven't done much with it, but I do like the idea of using modern techniques and modern data sets: Modern Multivariate Statistical Techniques by Alan Julian Izenman. (I own the book, it has the topics you are looking for, and the text seems accessible.) [Johanna Hardin]
|
Book recommendations for multivariate analysis
Almost the same question was asked recently on the ISOSTAT listserver (frequented by college professors):
If you had a strong undergraduate student who was interested in learning about various multiv
|
9,387
|
Book recommendations for multivariate analysis
|
Here are some of my books on that field (in alphabetical order).
AFIFI, A., CLARK, V. Computer-Aided
Multivariate Analysis. CHAPMAN & HALL, 2000
AGRESTI, A. Categorical Data Analysis. WILEY, 2002
HAIR, Multivariate Data Analysis. 6th Ed.
ΗÄRDLE, W., SIMAR, L. Applied Multivariate Statistical Analysis. SPRINGER, 2007.
HARLOW, L. The Essence of Multivariate Thinking. LAWRENCE ERLBAUM ASSOCIATES, INC., 2005
GELMAN, A., HILL, J. Data Analysis
Using Regression and
Multilevel/Hierarchical Models.
CAMBRIDGE UNIVERSITY PRESS, 2007.
IZENMAN, A. J. Modern Multivariate Statistical Techniques. SPRINGER, 2008
RENCHER, A. Methods of Multivariate analysis. SECOND ED., WILEY-INTERSCIENCE, 2007
TABACHNICK B., FIDELL, L. Using Multivariate Statistics. 5th Ed. Pearson Education. Inc, 2007.
TIMM, N. Applied Multivariate Analysis. SPRINGER, 2002
YANG, K., TREWN, J. Multivariate Statistical Methods in Quality Management. MCGRAW-HILL, 2004
|
Book recommendations for multivariate analysis
|
Here are some of my books on that field (in alphabetical order).
AFIFI, A., CLARK, V. Computer-Aided
Multivariate Analysis. CHAPMAN & HALL, 2000
AGRESTI, A. Categorical Data Analysis. WILEY, 2002
HA
|
Book recommendations for multivariate analysis
Here are some of my books on that field (in alphabetical order).
AFIFI, A., CLARK, V. Computer-Aided
Multivariate Analysis. CHAPMAN & HALL, 2000
AGRESTI, A. Categorical Data Analysis. WILEY, 2002
HAIR, Multivariate Data Analysis. 6th Ed.
ΗÄRDLE, W., SIMAR, L. Applied Multivariate Statistical Analysis. SPRINGER, 2007.
HARLOW, L. The Essence of Multivariate Thinking. LAWRENCE ERLBAUM ASSOCIATES, INC., 2005
GELMAN, A., HILL, J. Data Analysis
Using Regression and
Multilevel/Hierarchical Models.
CAMBRIDGE UNIVERSITY PRESS, 2007.
IZENMAN, A. J. Modern Multivariate Statistical Techniques. SPRINGER, 2008
RENCHER, A. Methods of Multivariate analysis. SECOND ED., WILEY-INTERSCIENCE, 2007
TABACHNICK B., FIDELL, L. Using Multivariate Statistics. 5th Ed. Pearson Education. Inc, 2007.
TIMM, N. Applied Multivariate Analysis. SPRINGER, 2002
YANG, K., TREWN, J. Multivariate Statistical Methods in Quality Management. MCGRAW-HILL, 2004
|
Book recommendations for multivariate analysis
Here are some of my books on that field (in alphabetical order).
AFIFI, A., CLARK, V. Computer-Aided
Multivariate Analysis. CHAPMAN & HALL, 2000
AGRESTI, A. Categorical Data Analysis. WILEY, 2002
HA
|
9,388
|
Book recommendations for multivariate analysis
|
JOHNSON R., WICHERN D., Applied Multivariate Statistical Analysis, is what we used in our undergraduate Multivariate class at UC Davis, and it does a pretty good job (though it's a bit pricey).
|
Book recommendations for multivariate analysis
|
JOHNSON R., WICHERN D., Applied Multivariate Statistical Analysis, is what we used in our undergraduate Multivariate class at UC Davis, and it does a pretty good job (though it's a bit pricey).
|
Book recommendations for multivariate analysis
JOHNSON R., WICHERN D., Applied Multivariate Statistical Analysis, is what we used in our undergraduate Multivariate class at UC Davis, and it does a pretty good job (though it's a bit pricey).
|
Book recommendations for multivariate analysis
JOHNSON R., WICHERN D., Applied Multivariate Statistical Analysis, is what we used in our undergraduate Multivariate class at UC Davis, and it does a pretty good job (though it's a bit pricey).
|
9,389
|
Book recommendations for multivariate analysis
|
"An Introduction to Multivariate Statistical Analysis" Third edition by T. W. Anderson .
Wiley series in Probability and Statistics.
|
Book recommendations for multivariate analysis
|
"An Introduction to Multivariate Statistical Analysis" Third edition by T. W. Anderson .
Wiley series in Probability and Statistics.
|
Book recommendations for multivariate analysis
"An Introduction to Multivariate Statistical Analysis" Third edition by T. W. Anderson .
Wiley series in Probability and Statistics.
|
Book recommendations for multivariate analysis
"An Introduction to Multivariate Statistical Analysis" Third edition by T. W. Anderson .
Wiley series in Probability and Statistics.
|
9,390
|
Book recommendations for multivariate analysis
|
Hands down best basic text on multivariate regression is (still) Cohen, J., Cohen, P., West, S.G. & Aiken, L.S. Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, (L. Erlbaum Associates, Mahwah, N.J., 2003).
Cohen made his name in statistics yet was a psychologist; still if you want social psychology-focused treatment of multivariate, one not limited to multivariate regression (although it definitely favors it over ANOVA & MANOVA, which ought to be banned by some sort of Intellectual Human Rights Commission), then your best bet is Judd, C.M., McClelland, G.H. & Ryan, C.S. Data analysis : a model comparison approach, (Routledge/Taylor and Francis, New York, NY, 2008). Judd also has a very very good chapter on multivariate regression in Judd, C.M. Everyday Data Analysis in Social Psychology: Comparisons of Linear Models. in Handbook of research methods in social and personality psychology (eds. Reis, H.T. & Judd, C.M.) 370-392 (Cambridge University Press, New York, 2000).
I agree that Gelman, A. & Hill, J. Data Analysis Using Regression and Multilevel/Hierarchical Models, (Cambridge University Press, Cambridge ; New York, 2007), is amazing, but it is really more geared to someone already comfortable w/ basics of multivariate regression--it's primarily about multilevel modeling. Also is focused on observational study methodology--not experimental (Judd is best for that; Cohen okay too.
If you want something on interactions in multivariate -- which you likely will if you are using experimental methods -- then best two texts are Aiken, L.S., West, S.G. & Reno, R.R. Multiple Regression: Testing and Interpreting Interactions, (Sage Publications, Newbury Park, Calif., 1991) & Jaccard, J. & Turrisi, R. Interaction Effects in Multiple Regression, (Sage Publications, Thousand Oaks, Calif., 2003). (Both Cohen & Cohen & Judd do treat this topic, though.)
On "free" side, you probably know about http://faculty.chass.ncsu.edu/garson/PA765/statnote.htm
Last bit of advice: Never ever split your continuous variables!!! It's amazing how many social psychologists, used to ANOVA, still do this even as they make use of multivariate techniques such as regression analysis!
|
Book recommendations for multivariate analysis
|
Hands down best basic text on multivariate regression is (still) Cohen, J., Cohen, P., West, S.G. & Aiken, L.S. Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, (L. Erlbau
|
Book recommendations for multivariate analysis
Hands down best basic text on multivariate regression is (still) Cohen, J., Cohen, P., West, S.G. & Aiken, L.S. Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, (L. Erlbaum Associates, Mahwah, N.J., 2003).
Cohen made his name in statistics yet was a psychologist; still if you want social psychology-focused treatment of multivariate, one not limited to multivariate regression (although it definitely favors it over ANOVA & MANOVA, which ought to be banned by some sort of Intellectual Human Rights Commission), then your best bet is Judd, C.M., McClelland, G.H. & Ryan, C.S. Data analysis : a model comparison approach, (Routledge/Taylor and Francis, New York, NY, 2008). Judd also has a very very good chapter on multivariate regression in Judd, C.M. Everyday Data Analysis in Social Psychology: Comparisons of Linear Models. in Handbook of research methods in social and personality psychology (eds. Reis, H.T. & Judd, C.M.) 370-392 (Cambridge University Press, New York, 2000).
I agree that Gelman, A. & Hill, J. Data Analysis Using Regression and Multilevel/Hierarchical Models, (Cambridge University Press, Cambridge ; New York, 2007), is amazing, but it is really more geared to someone already comfortable w/ basics of multivariate regression--it's primarily about multilevel modeling. Also is focused on observational study methodology--not experimental (Judd is best for that; Cohen okay too.
If you want something on interactions in multivariate -- which you likely will if you are using experimental methods -- then best two texts are Aiken, L.S., West, S.G. & Reno, R.R. Multiple Regression: Testing and Interpreting Interactions, (Sage Publications, Newbury Park, Calif., 1991) & Jaccard, J. & Turrisi, R. Interaction Effects in Multiple Regression, (Sage Publications, Thousand Oaks, Calif., 2003). (Both Cohen & Cohen & Judd do treat this topic, though.)
On "free" side, you probably know about http://faculty.chass.ncsu.edu/garson/PA765/statnote.htm
Last bit of advice: Never ever split your continuous variables!!! It's amazing how many social psychologists, used to ANOVA, still do this even as they make use of multivariate techniques such as regression analysis!
|
Book recommendations for multivariate analysis
Hands down best basic text on multivariate regression is (still) Cohen, J., Cohen, P., West, S.G. & Aiken, L.S. Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, (L. Erlbau
|
9,391
|
Book recommendations for multivariate analysis
|
Analyzing Multivariate Data by James Lattin, J Douglas Carroll and Paul E Green.
|
Book recommendations for multivariate analysis
|
Analyzing Multivariate Data by James Lattin, J Douglas Carroll and Paul E Green.
|
Book recommendations for multivariate analysis
Analyzing Multivariate Data by James Lattin, J Douglas Carroll and Paul E Green.
|
Book recommendations for multivariate analysis
Analyzing Multivariate Data by James Lattin, J Douglas Carroll and Paul E Green.
|
9,392
|
Book recommendations for multivariate analysis
|
Tabachnick is the most cited on Google Scholar
Hair (6th ed) has the most ratings (with a score above 4.5) on Amazon
I recommend Hair, as I've read it, and it is written in plain language.
If you are a student or staff at a university, then I would see if your school has an account with SpringerLink, as the Hardle book is on there for free.
|
Book recommendations for multivariate analysis
|
Tabachnick is the most cited on Google Scholar
Hair (6th ed) has the most ratings (with a score above 4.5) on Amazon
I recommend Hair, as I've read it, and it is written in plain language.
If you are
|
Book recommendations for multivariate analysis
Tabachnick is the most cited on Google Scholar
Hair (6th ed) has the most ratings (with a score above 4.5) on Amazon
I recommend Hair, as I've read it, and it is written in plain language.
If you are a student or staff at a university, then I would see if your school has an account with SpringerLink, as the Hardle book is on there for free.
|
Book recommendations for multivariate analysis
Tabachnick is the most cited on Google Scholar
Hair (6th ed) has the most ratings (with a score above 4.5) on Amazon
I recommend Hair, as I've read it, and it is written in plain language.
If you are
|
9,393
|
Book recommendations for multivariate analysis
|
Hastie, T., Tibshirani, R. and Friedman, J.: "The Elements of Statistical Learning: Data Mining, Inference, and Prediction.", Springer (book home page)
|
Book recommendations for multivariate analysis
|
Hastie, T., Tibshirani, R. and Friedman, J.: "The Elements of Statistical Learning: Data Mining, Inference, and Prediction.", Springer (book home page)
|
Book recommendations for multivariate analysis
Hastie, T., Tibshirani, R. and Friedman, J.: "The Elements of Statistical Learning: Data Mining, Inference, and Prediction.", Springer (book home page)
|
Book recommendations for multivariate analysis
Hastie, T., Tibshirani, R. and Friedman, J.: "The Elements of Statistical Learning: Data Mining, Inference, and Prediction.", Springer (book home page)
|
9,394
|
Book recommendations for multivariate analysis
|
If you look at Paul Hewison's webpage, you can find his free book on Multivariate Statistics and R. Another free book is by Wolfgang Hardle and Leopold Simar. I have been
working my way through Johnson and Wichern, a book that has been used in the US for
over twenty years; you will have to buy this book.
|
Book recommendations for multivariate analysis
|
If you look at Paul Hewison's webpage, you can find his free book on Multivariate Statistics and R. Another free book is by Wolfgang Hardle and Leopold Simar. I have been
working my way through Johnso
|
Book recommendations for multivariate analysis
If you look at Paul Hewison's webpage, you can find his free book on Multivariate Statistics and R. Another free book is by Wolfgang Hardle and Leopold Simar. I have been
working my way through Johnson and Wichern, a book that has been used in the US for
over twenty years; you will have to buy this book.
|
Book recommendations for multivariate analysis
If you look at Paul Hewison's webpage, you can find his free book on Multivariate Statistics and R. Another free book is by Wolfgang Hardle and Leopold Simar. I have been
working my way through Johnso
|
9,395
|
Book recommendations for multivariate analysis
|
One of my favorite one is Legendre & Legendre (2012). Numerical Ecology, 3rd edition.
They cover many statistical analyses and their information on multivariate analyses is particularly excellent. In addition they discuss R packages they created. Definitively a must!
Another excellent one is Quinn & Keough (2002) Experimental Design & Data Analysis for Biologists. It's also freely available on the link I provided!
|
Book recommendations for multivariate analysis
|
One of my favorite one is Legendre & Legendre (2012). Numerical Ecology, 3rd edition.
They cover many statistical analyses and their information on multivariate analyses is particularly excellent. In
|
Book recommendations for multivariate analysis
One of my favorite one is Legendre & Legendre (2012). Numerical Ecology, 3rd edition.
They cover many statistical analyses and their information on multivariate analyses is particularly excellent. In addition they discuss R packages they created. Definitively a must!
Another excellent one is Quinn & Keough (2002) Experimental Design & Data Analysis for Biologists. It's also freely available on the link I provided!
|
Book recommendations for multivariate analysis
One of my favorite one is Legendre & Legendre (2012). Numerical Ecology, 3rd edition.
They cover many statistical analyses and their information on multivariate analyses is particularly excellent. In
|
9,396
|
Can mean be less than half of median if all numbers are non-negative?
|
You are correct. This is one example of a general result called Markov's inequality, which says that for a non-negative random variable $X$ and number $a$,
$$P(X\geq a)\leq \frac{E[X]}{a}$$
If you plug in the median of $X$ for $a$ you get
$$P(X\geq \text{median})\leq \frac{E[X]}{\text{median}}$$
so
$$0.5\leq \frac{E[X]}{\text{median}}$$
and
$$ 0.5\times\text{median}\leq \text{mean}$$
Your argument is also roughly how Markov's inequality is proved.
|
Can mean be less than half of median if all numbers are non-negative?
|
You are correct. This is one example of a general result called Markov's inequality, which says that for a non-negative random variable $X$ and number $a$,
$$P(X\geq a)\leq \frac{E[X]}{a}$$
If you pl
|
Can mean be less than half of median if all numbers are non-negative?
You are correct. This is one example of a general result called Markov's inequality, which says that for a non-negative random variable $X$ and number $a$,
$$P(X\geq a)\leq \frac{E[X]}{a}$$
If you plug in the median of $X$ for $a$ you get
$$P(X\geq \text{median})\leq \frac{E[X]}{\text{median}}$$
so
$$0.5\leq \frac{E[X]}{\text{median}}$$
and
$$ 0.5\times\text{median}\leq \text{mean}$$
Your argument is also roughly how Markov's inequality is proved.
|
Can mean be less than half of median if all numbers are non-negative?
You are correct. This is one example of a general result called Markov's inequality, which says that for a non-negative random variable $X$ and number $a$,
$$P(X\geq a)\leq \frac{E[X]}{a}$$
If you pl
|
9,397
|
Can mean be less than half of median if all numbers are non-negative?
|
in a set of non-negative numbers, is it possible for the mean to be less than half of the median?
No. In fact, the mean cannot even be equal to half of the median (except if every value in the set is $0$).
the lowest possible mean is more than one half of the median
This is correct (again, assuming that not all values are $0$).
Here are two simple (yet rigorous) proofs. (These proofs ignore the case where every value in the set is $0$.)
Proof 1
Let $n$ be the number of values.
If $n$ is even, then the upper $n / 2$ values must all be at least the median. If they are all equal to the median, then the value just below the midpoint must also be equal to the median.
If $n$ is odd, then the values above the median, as well as the median itself, must all be at least the median; the number of such values is:
\begin{equation*}
\frac{n - 1}{2} + 1 = \frac{n + 1}{2} > \frac{n}{2}.
\end{equation*}
Either way, there are at least $n / 2$ values that are at least the median; the sum of these values, and therefore the sum of all the values, is at least:
\begin{equation*}
\frac{n}{2} \times \text{median}.
\end{equation*}
In fact, either there are more than $n / 2$ values, or at least some of the values are greater than the median (or both), so the sum is greater than the value of this expression.
Dividing this by $n$, we find that the mean is greater than:
\begin{equation*}
\frac{1}{2} \times \text{median}.
\end{equation*}
Proof 2
We will choose an arbitrary $m$, then construct a set with median $m$ and the minimum possible mean.
We start by doing one of the following:
(set has an odd number of values) Add $m$ to the set.
(set has an even number of values) Add two values, with mean $m$, to the set. Any two values with mean $m$ make the same contribution to the mean of the set, but for maximum flexibility when adding other values later, we should set both values to $m$.
We then choose an arbitrary $n$ and:
Add $n$ values that are at most $m$ to the set. To minimise the mean, we should set all these values to $0$.
Add $n$ values that are at least $m$ to the set. To minimise the mean, we should set all these values to $m$.
Note that these steps can construct a set of any size, with any median, and the constructed set has the minimum possible mean within these constraints.
If the set has an odd number of values, the mean of the set is:
\begin{equation*}
\frac{m + nm}{1 + 2n} = \frac{1 + n}{1 + 2n} m > \frac{1}{2} m.
\end{equation*}
If the set has an even number of values, the mean of the set is:
\begin{equation*}
\frac{2m + nm}{2 + 2n} = \frac{2 + n}{2 + 2n} m > \frac{1}{2} m.
\end{equation*}
This proof is designed to emphasise the role of the $0$, building on Carl Witthoft’s comment on another answer (emphasis added):
Interesting, since naively I'd think that shifting your dataset uniformly by a value $X$ would not affect median vs. mean. What's hidden here (if I get it right) is that a non-negative dataset is asymmetric, being bounded on one end only.
|
Can mean be less than half of median if all numbers are non-negative?
|
in a set of non-negative numbers, is it possible for the mean to be less than half of the median?
No. In fact, the mean cannot even be equal to half of the median (except if every value in the set is
|
Can mean be less than half of median if all numbers are non-negative?
in a set of non-negative numbers, is it possible for the mean to be less than half of the median?
No. In fact, the mean cannot even be equal to half of the median (except if every value in the set is $0$).
the lowest possible mean is more than one half of the median
This is correct (again, assuming that not all values are $0$).
Here are two simple (yet rigorous) proofs. (These proofs ignore the case where every value in the set is $0$.)
Proof 1
Let $n$ be the number of values.
If $n$ is even, then the upper $n / 2$ values must all be at least the median. If they are all equal to the median, then the value just below the midpoint must also be equal to the median.
If $n$ is odd, then the values above the median, as well as the median itself, must all be at least the median; the number of such values is:
\begin{equation*}
\frac{n - 1}{2} + 1 = \frac{n + 1}{2} > \frac{n}{2}.
\end{equation*}
Either way, there are at least $n / 2$ values that are at least the median; the sum of these values, and therefore the sum of all the values, is at least:
\begin{equation*}
\frac{n}{2} \times \text{median}.
\end{equation*}
In fact, either there are more than $n / 2$ values, or at least some of the values are greater than the median (or both), so the sum is greater than the value of this expression.
Dividing this by $n$, we find that the mean is greater than:
\begin{equation*}
\frac{1}{2} \times \text{median}.
\end{equation*}
Proof 2
We will choose an arbitrary $m$, then construct a set with median $m$ and the minimum possible mean.
We start by doing one of the following:
(set has an odd number of values) Add $m$ to the set.
(set has an even number of values) Add two values, with mean $m$, to the set. Any two values with mean $m$ make the same contribution to the mean of the set, but for maximum flexibility when adding other values later, we should set both values to $m$.
We then choose an arbitrary $n$ and:
Add $n$ values that are at most $m$ to the set. To minimise the mean, we should set all these values to $0$.
Add $n$ values that are at least $m$ to the set. To minimise the mean, we should set all these values to $m$.
Note that these steps can construct a set of any size, with any median, and the constructed set has the minimum possible mean within these constraints.
If the set has an odd number of values, the mean of the set is:
\begin{equation*}
\frac{m + nm}{1 + 2n} = \frac{1 + n}{1 + 2n} m > \frac{1}{2} m.
\end{equation*}
If the set has an even number of values, the mean of the set is:
\begin{equation*}
\frac{2m + nm}{2 + 2n} = \frac{2 + n}{2 + 2n} m > \frac{1}{2} m.
\end{equation*}
This proof is designed to emphasise the role of the $0$, building on Carl Witthoft’s comment on another answer (emphasis added):
Interesting, since naively I'd think that shifting your dataset uniformly by a value $X$ would not affect median vs. mean. What's hidden here (if I get it right) is that a non-negative dataset is asymmetric, being bounded on one end only.
|
Can mean be less than half of median if all numbers are non-negative?
in a set of non-negative numbers, is it possible for the mean to be less than half of the median?
No. In fact, the mean cannot even be equal to half of the median (except if every value in the set is
|
9,398
|
Empirical CDF vs CDF
|
Let $X$ be a random variable.
The cumulative distribution function $F(x)$ gives the $P(X \leq x)$.
An empirical cumulative distribution function function $G(x)$ gives $P(X \leq x)$ based on the observations in your sample.
The distinction is which probability measure is used. For the empirical CDF, you use the probability measure defined by the frequency counts in an empirical sample.
Simple example (coin flip):
Let $X$ be a random variable denoting the result of a single coin flip where $X=1$ denotes heads and $X=0$ denotes tails.
The CDF for a fair coin is given by:
$$ F(x) = \left\{ \begin{array}{ll} 0 & \text{for } x < 0\\ \frac{1}{2} & \text{for } 0 \leq x < 1 \\1 & \text{for } 1 \leq x \end{array} \right. $$
If you flipped 2 heads and 1 tail, the empirical CDF would be:
$$ G(x) = \left\{ \begin{array}{ll} 0 & \text{for } x < 0\\ \frac{2}{3} & \text{for } 0 \leq x < 1 \\1 & \text{for } 1 \leq x \end{array} \right. $$
The empirical CDF would reflect that in your sample, $2/3$ of your flips were heads.
Another example ($F$ is CDF for normal distribution):
Let $X$ be a normally distributed random variable with mean $0$ and standard deviation $1$.
The CDF is given by:
$$F(x) = \int_{-\infty}^x \frac{1}{\sqrt{2\pi}} e^{\frac{-x^2}{2}}$$
Let's say you had 3 IID draws and obtained the values $x_1 < x_2 < x_3$. The empirical CDF would be:
$$ G(y) = \left\{ \begin{array}{ll} 0 & \text{for } y < x_1\\ \frac{1}{3} & \text{for } x_1 \leq y < x_2 \\\frac{2}{3} & \text{for } x_2 \leq y < x_3 \\1 & \text{for } x_3 \leq y \end{array} \right. $$
With enough IID draws (and certain regularity conditions are satisfied), the empirical CDF would converge on the underlying CDF of the population.
|
Empirical CDF vs CDF
|
Let $X$ be a random variable.
The cumulative distribution function $F(x)$ gives the $P(X \leq x)$.
An empirical cumulative distribution function function $G(x)$ gives $P(X \leq x)$ based on the obser
|
Empirical CDF vs CDF
Let $X$ be a random variable.
The cumulative distribution function $F(x)$ gives the $P(X \leq x)$.
An empirical cumulative distribution function function $G(x)$ gives $P(X \leq x)$ based on the observations in your sample.
The distinction is which probability measure is used. For the empirical CDF, you use the probability measure defined by the frequency counts in an empirical sample.
Simple example (coin flip):
Let $X$ be a random variable denoting the result of a single coin flip where $X=1$ denotes heads and $X=0$ denotes tails.
The CDF for a fair coin is given by:
$$ F(x) = \left\{ \begin{array}{ll} 0 & \text{for } x < 0\\ \frac{1}{2} & \text{for } 0 \leq x < 1 \\1 & \text{for } 1 \leq x \end{array} \right. $$
If you flipped 2 heads and 1 tail, the empirical CDF would be:
$$ G(x) = \left\{ \begin{array}{ll} 0 & \text{for } x < 0\\ \frac{2}{3} & \text{for } 0 \leq x < 1 \\1 & \text{for } 1 \leq x \end{array} \right. $$
The empirical CDF would reflect that in your sample, $2/3$ of your flips were heads.
Another example ($F$ is CDF for normal distribution):
Let $X$ be a normally distributed random variable with mean $0$ and standard deviation $1$.
The CDF is given by:
$$F(x) = \int_{-\infty}^x \frac{1}{\sqrt{2\pi}} e^{\frac{-x^2}{2}}$$
Let's say you had 3 IID draws and obtained the values $x_1 < x_2 < x_3$. The empirical CDF would be:
$$ G(y) = \left\{ \begin{array}{ll} 0 & \text{for } y < x_1\\ \frac{1}{3} & \text{for } x_1 \leq y < x_2 \\\frac{2}{3} & \text{for } x_2 \leq y < x_3 \\1 & \text{for } x_3 \leq y \end{array} \right. $$
With enough IID draws (and certain regularity conditions are satisfied), the empirical CDF would converge on the underlying CDF of the population.
|
Empirical CDF vs CDF
Let $X$ be a random variable.
The cumulative distribution function $F(x)$ gives the $P(X \leq x)$.
An empirical cumulative distribution function function $G(x)$ gives $P(X \leq x)$ based on the obser
|
9,399
|
Empirical CDF vs CDF
|
Is there any difference between Empirical CDF and CDF?
Yes, they're different. An empirical cdf is a proper cdf, but empirical cdfs will always be discrete even when not drawn from a discrete distribution, while the cdf of a distribution can be other things besides discrete.
If you treat a sample as if it were a population of values, each one equally probable (i.e. place probability 1/n on each observation) then the cdf of that distribution would be the ECDF of the data.
Why does it called 'Empirical'?
It's an estimate of the population cdf based on the sample; specifically if you treat the proportions of the sample at each distinct data value and treat it like it was a probability in the population, you get the ECDF.
Empirical has a meaning something like "by observation rather than theory", and that's exactly what it means in this case ... using the observations to determine the distribution function.
|
Empirical CDF vs CDF
|
Is there any difference between Empirical CDF and CDF?
Yes, they're different. An empirical cdf is a proper cdf, but empirical cdfs will always be discrete even when not drawn from a discrete distrib
|
Empirical CDF vs CDF
Is there any difference between Empirical CDF and CDF?
Yes, they're different. An empirical cdf is a proper cdf, but empirical cdfs will always be discrete even when not drawn from a discrete distribution, while the cdf of a distribution can be other things besides discrete.
If you treat a sample as if it were a population of values, each one equally probable (i.e. place probability 1/n on each observation) then the cdf of that distribution would be the ECDF of the data.
Why does it called 'Empirical'?
It's an estimate of the population cdf based on the sample; specifically if you treat the proportions of the sample at each distinct data value and treat it like it was a probability in the population, you get the ECDF.
Empirical has a meaning something like "by observation rather than theory", and that's exactly what it means in this case ... using the observations to determine the distribution function.
|
Empirical CDF vs CDF
Is there any difference between Empirical CDF and CDF?
Yes, they're different. An empirical cdf is a proper cdf, but empirical cdfs will always be discrete even when not drawn from a discrete distrib
|
9,400
|
Empirical CDF vs CDF
|
The empirical CDF is built from an actual data set (in the plot below, I used 100 samples from a standard normal distribution). The CDF is a theoretical construct - it is what you would see if you could take infinitely many samples.
The empirical CDF usually approximates the CDF quite well, especially for large samples (in fact, there are theorems about how quickly it converges to the CDF as the sample size increases).
|
Empirical CDF vs CDF
|
The empirical CDF is built from an actual data set (in the plot below, I used 100 samples from a standard normal distribution). The CDF is a theoretical construct - it is what you would see if you cou
|
Empirical CDF vs CDF
The empirical CDF is built from an actual data set (in the plot below, I used 100 samples from a standard normal distribution). The CDF is a theoretical construct - it is what you would see if you could take infinitely many samples.
The empirical CDF usually approximates the CDF quite well, especially for large samples (in fact, there are theorems about how quickly it converges to the CDF as the sample size increases).
|
Empirical CDF vs CDF
The empirical CDF is built from an actual data set (in the plot below, I used 100 samples from a standard normal distribution). The CDF is a theoretical construct - it is what you would see if you cou
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.