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
35,301
Can Negative Binomial parameters be treated like Poisson?
This is how I would do it in R. If correct, it should be easy to translate to python. First estimate the parameters of the negative binomial distribution that best fit a given training dataset. Then map the new data to the distribution function with those parameters. library(MASS) set.seed(1234) data_stream <- rnbinom...
Can Negative Binomial parameters be treated like Poisson?
This is how I would do it in R. If correct, it should be easy to translate to python. First estimate the parameters of the negative binomial distribution that best fit a given training dataset. Then m
Can Negative Binomial parameters be treated like Poisson? This is how I would do it in R. If correct, it should be easy to translate to python. First estimate the parameters of the negative binomial distribution that best fit a given training dataset. Then map the new data to the distribution function with those parame...
Can Negative Binomial parameters be treated like Poisson? This is how I would do it in R. If correct, it should be easy to translate to python. First estimate the parameters of the negative binomial distribution that best fit a given training dataset. Then m
35,302
Cross Validation: Averaging across estimates vs re-estimating on full sample
This is uncommon and can be quite risky, especially when there are multiple local minima for the cost function. You might even end up in the neighbourhood of a local maximum after averaging them out! This is similar (not the same since subsets are not bootstrap samples) to ensembling (e.g. random forests). Not very co...
Cross Validation: Averaging across estimates vs re-estimating on full sample
This is uncommon and can be quite risky, especially when there are multiple local minima for the cost function. You might even end up in the neighbourhood of a local maximum after averaging them out!
Cross Validation: Averaging across estimates vs re-estimating on full sample This is uncommon and can be quite risky, especially when there are multiple local minima for the cost function. You might even end up in the neighbourhood of a local maximum after averaging them out! This is similar (not the same since subset...
Cross Validation: Averaging across estimates vs re-estimating on full sample This is uncommon and can be quite risky, especially when there are multiple local minima for the cost function. You might even end up in the neighbourhood of a local maximum after averaging them out!
35,303
log(1 - softmax(X))? [closed]
Usually these values are not computed alone: the entire collection of $v_i$ and $\log(1 - \exp(v_i))$ is needed. That changes the analysis of computational effort. To this end, let $$\bar x = \log\left(\sum_{j} e^{x_j}\right) = x_k + \log\left(1 + \sum_{j\ne k} e^{x_j-x_k}\right)$$ for any index $k.$ The right hand e...
log(1 - softmax(X))? [closed]
Usually these values are not computed alone: the entire collection of $v_i$ and $\log(1 - \exp(v_i))$ is needed. That changes the analysis of computational effort. To this end, let $$\bar x = \log\le
log(1 - softmax(X))? [closed] Usually these values are not computed alone: the entire collection of $v_i$ and $\log(1 - \exp(v_i))$ is needed. That changes the analysis of computational effort. To this end, let $$\bar x = \log\left(\sum_{j} e^{x_j}\right) = x_k + \log\left(1 + \sum_{j\ne k} e^{x_j-x_k}\right)$$ for an...
log(1 - softmax(X))? [closed] Usually these values are not computed alone: the entire collection of $v_i$ and $\log(1 - \exp(v_i))$ is needed. That changes the analysis of computational effort. To this end, let $$\bar x = \log\le
35,304
log(1 - softmax(X))? [closed]
One option is to use the numerically stable log-softmax implementation in combination with a numerically stable $\text{log1m_exp}(x):=\log(1-\exp(x))$ function. I believe the following is pretty good for $\text{log1m_exp}$: if x > -0.693147 you use $\log(-\text{expm1}(x))$, otherwise $\text{log1m}(\exp(x))$, where $...
log(1 - softmax(X))? [closed]
One option is to use the numerically stable log-softmax implementation in combination with a numerically stable $\text{log1m_exp}(x):=\log(1-\exp(x))$ function. I believe the following is pretty good
log(1 - softmax(X))? [closed] One option is to use the numerically stable log-softmax implementation in combination with a numerically stable $\text{log1m_exp}(x):=\log(1-\exp(x))$ function. I believe the following is pretty good for $\text{log1m_exp}$: if x > -0.693147 you use $\log(-\text{expm1}(x))$, otherwise $\t...
log(1 - softmax(X))? [closed] One option is to use the numerically stable log-softmax implementation in combination with a numerically stable $\text{log1m_exp}(x):=\log(1-\exp(x))$ function. I believe the following is pretty good
35,305
log(1 - softmax(X))? [closed]
Here is a possible way to do this, in Julia code (which I think is quite readable even if one does not know Julia): function log1msoftmax(x::AbstractArray; dims=1) m = maximum(x; dims=dims) e = exp.(x .- m) s = sum(e; dims=dims) return log.((s .- e) ./ s) end This has the same complexity as a logsoftmax (it do...
log(1 - softmax(X))? [closed]
Here is a possible way to do this, in Julia code (which I think is quite readable even if one does not know Julia): function log1msoftmax(x::AbstractArray; dims=1) m = maximum(x; dims=dims) e = ex
log(1 - softmax(X))? [closed] Here is a possible way to do this, in Julia code (which I think is quite readable even if one does not know Julia): function log1msoftmax(x::AbstractArray; dims=1) m = maximum(x; dims=dims) e = exp.(x .- m) s = sum(e; dims=dims) return log.((s .- e) ./ s) end This has the same com...
log(1 - softmax(X))? [closed] Here is a possible way to do this, in Julia code (which I think is quite readable even if one does not know Julia): function log1msoftmax(x::AbstractArray; dims=1) m = maximum(x; dims=dims) e = ex
35,306
Expected value of the absolute standardized t distribution
Per whuber's answer to Standardized Student's-t distribution, the density of the standardized $t$ distribution on $\nu$ degrees of freedom is $$f(x) = \frac{\Gamma(\frac{\nu + 1}{2})}{\Gamma(\frac{\nu}{2})} \frac{1}{\sqrt{\pi(\nu-2)}} \left[1+\frac{x^2}{\nu-2}\right]^{-\frac{\nu+1}{2}}.$$ (Note that we need $\nu>2$ so ...
Expected value of the absolute standardized t distribution
Per whuber's answer to Standardized Student's-t distribution, the density of the standardized $t$ distribution on $\nu$ degrees of freedom is $$f(x) = \frac{\Gamma(\frac{\nu + 1}{2})}{\Gamma(\frac{\nu
Expected value of the absolute standardized t distribution Per whuber's answer to Standardized Student's-t distribution, the density of the standardized $t$ distribution on $\nu$ degrees of freedom is $$f(x) = \frac{\Gamma(\frac{\nu + 1}{2})}{\Gamma(\frac{\nu}{2})} \frac{1}{\sqrt{\pi(\nu-2)}} \left[1+\frac{x^2}{\nu-2}\...
Expected value of the absolute standardized t distribution Per whuber's answer to Standardized Student's-t distribution, the density of the standardized $t$ distribution on $\nu$ degrees of freedom is $$f(x) = \frac{\Gamma(\frac{\nu + 1}{2})}{\Gamma(\frac{\nu
35,307
Variable slopes in a fixed effects model
There seems to be some confusion in your question. The purpose of random effects (intercepts) in a growth model, is to account for the correlations within individuals. The difference in slope that you expect, between boys and girls would be modelled with an interaction between the slope (ie the fixed effect for the tim...
Variable slopes in a fixed effects model
There seems to be some confusion in your question. The purpose of random effects (intercepts) in a growth model, is to account for the correlations within individuals. The difference in slope that you
Variable slopes in a fixed effects model There seems to be some confusion in your question. The purpose of random effects (intercepts) in a growth model, is to account for the correlations within individuals. The difference in slope that you expect, between boys and girls would be modelled with an interaction between t...
Variable slopes in a fixed effects model There seems to be some confusion in your question. The purpose of random effects (intercepts) in a growth model, is to account for the correlations within individuals. The difference in slope that you
35,308
Can I ignore the negative R-squared value when I am using instrumental variable regression?
Yes, the linked STATA post answers your question in a single sentence: $R^2$ really has no statistical meaning in the context of 2SLS/IV. How can $R^2$ be negative? Wikipedia has a great visualization of $R^2$: On the left, we see the $\color{red}{\text{total sum of squares}}$, obtained by using the mean ($\bar{y}$...
Can I ignore the negative R-squared value when I am using instrumental variable regression?
Yes, the linked STATA post answers your question in a single sentence: $R^2$ really has no statistical meaning in the context of 2SLS/IV. How can $R^2$ be negative? Wikipedia has a great visualizat
Can I ignore the negative R-squared value when I am using instrumental variable regression? Yes, the linked STATA post answers your question in a single sentence: $R^2$ really has no statistical meaning in the context of 2SLS/IV. How can $R^2$ be negative? Wikipedia has a great visualization of $R^2$: On the left, ...
Can I ignore the negative R-squared value when I am using instrumental variable regression? Yes, the linked STATA post answers your question in a single sentence: $R^2$ really has no statistical meaning in the context of 2SLS/IV. How can $R^2$ be negative? Wikipedia has a great visualizat
35,309
Marginalize probability with three variables
As noted here, any rule, theorem, or formula that you have learned about probabilities is also applicable if everything is assumed to be conditioned on the occurrence of some event. For example, knowing that $$P(B^c) = 1-P(B)$$ allows us to immediately conclude that $$P(B^c\mid A) = 1 - P(B\mid A)$$ is a valid...
Marginalize probability with three variables
As noted here, any rule, theorem, or formula that you have learned about probabilities is also applicable if everything is assumed to be conditioned on the occurrence of some event. For example, know
Marginalize probability with three variables As noted here, any rule, theorem, or formula that you have learned about probabilities is also applicable if everything is assumed to be conditioned on the occurrence of some event. For example, knowing that $$P(B^c) = 1-P(B)$$ allows us to immediately conclude that $...
Marginalize probability with three variables As noted here, any rule, theorem, or formula that you have learned about probabilities is also applicable if everything is assumed to be conditioned on the occurrence of some event. For example, know
35,310
Marginalize probability with three variables
One way to think, and I think it is the easier way, is to imagine that we can add any number of RVs to the given side of the probability formulas, i.e. we'd also have $$P(X|\theta_1,\theta_2)=\sum_z P(X|z,\theta_1,\theta_2)P(z|\theta_1,\theta_2)$$ Or, you can multiply both sides of the above equation with $P(\theta)$ a...
Marginalize probability with three variables
One way to think, and I think it is the easier way, is to imagine that we can add any number of RVs to the given side of the probability formulas, i.e. we'd also have $$P(X|\theta_1,\theta_2)=\sum_z P
Marginalize probability with three variables One way to think, and I think it is the easier way, is to imagine that we can add any number of RVs to the given side of the probability formulas, i.e. we'd also have $$P(X|\theta_1,\theta_2)=\sum_z P(X|z,\theta_1,\theta_2)P(z|\theta_1,\theta_2)$$ Or, you can multiply both s...
Marginalize probability with three variables One way to think, and I think it is the easier way, is to imagine that we can add any number of RVs to the given side of the probability formulas, i.e. we'd also have $$P(X|\theta_1,\theta_2)=\sum_z P
35,311
What is meant by 'Black box variational inference'?
So he’s referring the technique introduced in this paper: https://arxiv.org/abs/1401.0118 The idea behind black box VI is that normally in VI it takes a significant amount of work to decide on a variational posterior and derive the ELBO and it’s gradients. As such there was room for a more general algorithm that can be...
What is meant by 'Black box variational inference'?
So he’s referring the technique introduced in this paper: https://arxiv.org/abs/1401.0118 The idea behind black box VI is that normally in VI it takes a significant amount of work to decide on a varia
What is meant by 'Black box variational inference'? So he’s referring the technique introduced in this paper: https://arxiv.org/abs/1401.0118 The idea behind black box VI is that normally in VI it takes a significant amount of work to decide on a variational posterior and derive the ELBO and it’s gradients. As such the...
What is meant by 'Black box variational inference'? So he’s referring the technique introduced in this paper: https://arxiv.org/abs/1401.0118 The idea behind black box VI is that normally in VI it takes a significant amount of work to decide on a varia
35,312
What is meant by 'Black box variational inference'?
The main algorithm used in VI before was the Coordinate Ascent VI (CAVI), which does a "variational" coordinate ascent on the ELBO. An alternative to doing Coordinate Ascent is doing Gradient Ascent. Why should we do that? Gradient Ascent / Descent can also be done stochastically (SGA / SGD), by sampling only part of ...
What is meant by 'Black box variational inference'?
The main algorithm used in VI before was the Coordinate Ascent VI (CAVI), which does a "variational" coordinate ascent on the ELBO. An alternative to doing Coordinate Ascent is doing Gradient Ascent.
What is meant by 'Black box variational inference'? The main algorithm used in VI before was the Coordinate Ascent VI (CAVI), which does a "variational" coordinate ascent on the ELBO. An alternative to doing Coordinate Ascent is doing Gradient Ascent. Why should we do that? Gradient Ascent / Descent can also be done s...
What is meant by 'Black box variational inference'? The main algorithm used in VI before was the Coordinate Ascent VI (CAVI), which does a "variational" coordinate ascent on the ELBO. An alternative to doing Coordinate Ascent is doing Gradient Ascent.
35,313
What is the computational cost of gradient descent vs linear regression?
The computational cost of gradient descent depends on the number of iterations it takes to converge. But according to the Machine Learning course by Stanford University, the complexity of gradient descent is $O(kn^2)$, so when $n$ is very large is recommended to use gradient descent instead of the closed form of linear...
What is the computational cost of gradient descent vs linear regression?
The computational cost of gradient descent depends on the number of iterations it takes to converge. But according to the Machine Learning course by Stanford University, the complexity of gradient des
What is the computational cost of gradient descent vs linear regression? The computational cost of gradient descent depends on the number of iterations it takes to converge. But according to the Machine Learning course by Stanford University, the complexity of gradient descent is $O(kn^2)$, so when $n$ is very large is...
What is the computational cost of gradient descent vs linear regression? The computational cost of gradient descent depends on the number of iterations it takes to converge. But according to the Machine Learning course by Stanford University, the complexity of gradient des
35,314
What is the computational cost of gradient descent vs linear regression?
The number of iterations a gradient method takes to reach a local optimum for a prescribed tolerance is problem dependent: depends on the shape of the surface you are exloring and the initial guess. Hence, no general O() expression for complexity can be given.
What is the computational cost of gradient descent vs linear regression?
The number of iterations a gradient method takes to reach a local optimum for a prescribed tolerance is problem dependent: depends on the shape of the surface you are exloring and the initial guess. H
What is the computational cost of gradient descent vs linear regression? The number of iterations a gradient method takes to reach a local optimum for a prescribed tolerance is problem dependent: depends on the shape of the surface you are exloring and the initial guess. Hence, no general O() expression for complexity ...
What is the computational cost of gradient descent vs linear regression? The number of iterations a gradient method takes to reach a local optimum for a prescribed tolerance is problem dependent: depends on the shape of the surface you are exloring and the initial guess. H
35,315
What is the computational cost of gradient descent vs linear regression?
Gradient descent has a time complexity of O(ndk), where d is the number of features, and n Is the number of rows. So, when d and n and large, it is better to use gradient descent.
What is the computational cost of gradient descent vs linear regression?
Gradient descent has a time complexity of O(ndk), where d is the number of features, and n Is the number of rows. So, when d and n and large, it is better to use gradient descent.
What is the computational cost of gradient descent vs linear regression? Gradient descent has a time complexity of O(ndk), where d is the number of features, and n Is the number of rows. So, when d and n and large, it is better to use gradient descent.
What is the computational cost of gradient descent vs linear regression? Gradient descent has a time complexity of O(ndk), where d is the number of features, and n Is the number of rows. So, when d and n and large, it is better to use gradient descent.
35,316
What is the computational cost of gradient descent vs linear regression?
The time complexity of gradient descent is: $O(knd)$ where: $k$ is number of iterations $n$ is number of samples $d$ is number of features (or equally number of parameters that are being updated iteratively during the gradient descent) As Valentina Sánchez Bermúdez already pointed out (which is indeed based on the Ma...
What is the computational cost of gradient descent vs linear regression?
The time complexity of gradient descent is: $O(knd)$ where: $k$ is number of iterations $n$ is number of samples $d$ is number of features (or equally number of parameters that are being updated iter
What is the computational cost of gradient descent vs linear regression? The time complexity of gradient descent is: $O(knd)$ where: $k$ is number of iterations $n$ is number of samples $d$ is number of features (or equally number of parameters that are being updated iteratively during the gradient descent) As Valent...
What is the computational cost of gradient descent vs linear regression? The time complexity of gradient descent is: $O(knd)$ where: $k$ is number of iterations $n$ is number of samples $d$ is number of features (or equally number of parameters that are being updated iter
35,317
What exactly is the extratrees option in ranger?
Your understanding is correct, extraTrees does implement Geurts et al. (2006) Extremely randomized trees. The implementation of extraTrees has been discussed in detail in Github's thread on that issue so I would strongly urge you read it further here. Regarding the particular questions raised: Yes, but read on! By def...
What exactly is the extratrees option in ranger?
Your understanding is correct, extraTrees does implement Geurts et al. (2006) Extremely randomized trees. The implementation of extraTrees has been discussed in detail in Github's thread on that issue
What exactly is the extratrees option in ranger? Your understanding is correct, extraTrees does implement Geurts et al. (2006) Extremely randomized trees. The implementation of extraTrees has been discussed in detail in Github's thread on that issue so I would strongly urge you read it further here. Regarding the parti...
What exactly is the extratrees option in ranger? Your understanding is correct, extraTrees does implement Geurts et al. (2006) Extremely randomized trees. The implementation of extraTrees has been discussed in detail in Github's thread on that issue
35,318
Conditional expectation of uniform random variable given order statistics
Consider the case of an iid sample $X_1, X_2, \ldots, X_n$ from a Uniform$(0,1)$ distribution. Scaling these variables by $\theta$ and translating them by $\theta$ endows them with a Uniform$(\theta, 2\theta)$ distribution. Everything relevant to this problem changes in the same way: the order statistics and the cond...
Conditional expectation of uniform random variable given order statistics
Consider the case of an iid sample $X_1, X_2, \ldots, X_n$ from a Uniform$(0,1)$ distribution. Scaling these variables by $\theta$ and translating them by $\theta$ endows them with a Uniform$(\theta,
Conditional expectation of uniform random variable given order statistics Consider the case of an iid sample $X_1, X_2, \ldots, X_n$ from a Uniform$(0,1)$ distribution. Scaling these variables by $\theta$ and translating them by $\theta$ endows them with a Uniform$(\theta, 2\theta)$ distribution. Everything relevant ...
Conditional expectation of uniform random variable given order statistics Consider the case of an iid sample $X_1, X_2, \ldots, X_n$ from a Uniform$(0,1)$ distribution. Scaling these variables by $\theta$ and translating them by $\theta$ endows them with a Uniform$(\theta,
35,319
What are "fringeliers"?
Fringeliers appears to be defined as a less extreme kind of outlier. I.e., data on the fringes of the distribution. For example, were you to define a cutoff for outliers, fringeliers might be operationalised to be those values that are close to either side of the cutoff (e.g., for a 3 SD cutoff, between 2.7 and 3.3 SD ...
What are "fringeliers"?
Fringeliers appears to be defined as a less extreme kind of outlier. I.e., data on the fringes of the distribution. For example, were you to define a cutoff for outliers, fringeliers might be operatio
What are "fringeliers"? Fringeliers appears to be defined as a less extreme kind of outlier. I.e., data on the fringes of the distribution. For example, were you to define a cutoff for outliers, fringeliers might be operationalised to be those values that are close to either side of the cutoff (e.g., for a 3 SD cutoff,...
What are "fringeliers"? Fringeliers appears to be defined as a less extreme kind of outlier. I.e., data on the fringes of the distribution. For example, were you to define a cutoff for outliers, fringeliers might be operatio
35,320
What are "fringeliers"?
I would think that you'd need to consider the frequency of the fringeliers w.r.t. the data points residing below the cutoff. If the proportion of fringeliers to "valid" data is high (based on some factor(s)), perhaps the cutoff is unrealistically defined. Imagine you're in a tent, and the only bears in the area are ...
What are "fringeliers"?
I would think that you'd need to consider the frequency of the fringeliers w.r.t. the data points residing below the cutoff. If the proportion of fringeliers to "valid" data is high (based on some f
What are "fringeliers"? I would think that you'd need to consider the frequency of the fringeliers w.r.t. the data points residing below the cutoff. If the proportion of fringeliers to "valid" data is high (based on some factor(s)), perhaps the cutoff is unrealistically defined. Imagine you're in a tent, and the onl...
What are "fringeliers"? I would think that you'd need to consider the frequency of the fringeliers w.r.t. the data points residing below the cutoff. If the proportion of fringeliers to "valid" data is high (based on some f
35,321
Time series analysis via generalized additive models: model assumptions and stationarity
The idea here is that by estimating the trend as a smooth function, the residuals then are a stationary process and the ARMA model is being estimated in the residuals. In other words, the estimated smoother is detrending the data and the residuals are subjected to an ARMA model. Of course it doesn't happen in a two-ste...
Time series analysis via generalized additive models: model assumptions and stationarity
The idea here is that by estimating the trend as a smooth function, the residuals then are a stationary process and the ARMA model is being estimated in the residuals. In other words, the estimated sm
Time series analysis via generalized additive models: model assumptions and stationarity The idea here is that by estimating the trend as a smooth function, the residuals then are a stationary process and the ARMA model is being estimated in the residuals. In other words, the estimated smoother is detrending the data a...
Time series analysis via generalized additive models: model assumptions and stationarity The idea here is that by estimating the trend as a smooth function, the residuals then are a stationary process and the ARMA model is being estimated in the residuals. In other words, the estimated sm
35,322
Interpreting a Quadratic Term in Binary Logistic Regression
So your model is something like $$ \log(\frac{p}{1-p}) = -0.000462 x^2 + 0.0265 x + c $$ implying that $$ \frac{p}{1-p} = e^{-0.000462 x^2}e^{0.0265 x} e^c $$ You can interpret $ e^c $ as the "baseline odds". Then, note that the positive and negative effects are zero when $ x = \frac{0.0265}{0.000462} \approx 57.36 $....
Interpreting a Quadratic Term in Binary Logistic Regression
So your model is something like $$ \log(\frac{p}{1-p}) = -0.000462 x^2 + 0.0265 x + c $$ implying that $$ \frac{p}{1-p} = e^{-0.000462 x^2}e^{0.0265 x} e^c $$ You can interpret $ e^c $ as the "baselin
Interpreting a Quadratic Term in Binary Logistic Regression So your model is something like $$ \log(\frac{p}{1-p}) = -0.000462 x^2 + 0.0265 x + c $$ implying that $$ \frac{p}{1-p} = e^{-0.000462 x^2}e^{0.0265 x} e^c $$ You can interpret $ e^c $ as the "baseline odds". Then, note that the positive and negative effects a...
Interpreting a Quadratic Term in Binary Logistic Regression So your model is something like $$ \log(\frac{p}{1-p}) = -0.000462 x^2 + 0.0265 x + c $$ implying that $$ \frac{p}{1-p} = e^{-0.000462 x^2}e^{0.0265 x} e^c $$ You can interpret $ e^c $ as the "baselin
35,323
Interpreting a Quadratic Term in Binary Logistic Regression
Just a small edit to Kevin's answer: I think there's a small typo as the derivative of the expression $\frac{p}{1-p}$ written above reaches a stationary point at $x=\frac{0.0265}{2 * 0.000462}$. So $57.36$ should be divided by 2.
Interpreting a Quadratic Term in Binary Logistic Regression
Just a small edit to Kevin's answer: I think there's a small typo as the derivative of the expression $\frac{p}{1-p}$ written above reaches a stationary point at $x=\frac{0.0265}{2 * 0.000462}$. So $5
Interpreting a Quadratic Term in Binary Logistic Regression Just a small edit to Kevin's answer: I think there's a small typo as the derivative of the expression $\frac{p}{1-p}$ written above reaches a stationary point at $x=\frac{0.0265}{2 * 0.000462}$. So $57.36$ should be divided by 2.
Interpreting a Quadratic Term in Binary Logistic Regression Just a small edit to Kevin's answer: I think there's a small typo as the derivative of the expression $\frac{p}{1-p}$ written above reaches a stationary point at $x=\frac{0.0265}{2 * 0.000462}$. So $5
35,324
Evaluating quality of predicted distributions
The standard approach to this is using the log-likelihood of the exponential distribution. This is actually exactly how the cross-entropy is derived, it is the log-likelihood of the Bernoulli distribution. In the case of an exponential distribution, the pdf is: $$ f(y; \lambda) = \lambda e^{-\lambda y} $$ So the log-l...
Evaluating quality of predicted distributions
The standard approach to this is using the log-likelihood of the exponential distribution. This is actually exactly how the cross-entropy is derived, it is the log-likelihood of the Bernoulli distrib
Evaluating quality of predicted distributions The standard approach to this is using the log-likelihood of the exponential distribution. This is actually exactly how the cross-entropy is derived, it is the log-likelihood of the Bernoulli distribution. In the case of an exponential distribution, the pdf is: $$ f(y; \la...
Evaluating quality of predicted distributions The standard approach to this is using the log-likelihood of the exponential distribution. This is actually exactly how the cross-entropy is derived, it is the log-likelihood of the Bernoulli distrib
35,325
Evaluating quality of predicted distributions
The standard way to assess predictive distributions is via scoring rules. The log-likelihood that Matthew Drury recommends is one example, it's the logarithmic scoring rule. There are also others. Merkle & Steyvers (2013, Decision Analysis) discuss how different scoring rules hang together, and how to choose one. More ...
Evaluating quality of predicted distributions
The standard way to assess predictive distributions is via scoring rules. The log-likelihood that Matthew Drury recommends is one example, it's the logarithmic scoring rule. There are also others. Mer
Evaluating quality of predicted distributions The standard way to assess predictive distributions is via scoring rules. The log-likelihood that Matthew Drury recommends is one example, it's the logarithmic scoring rule. There are also others. Merkle & Steyvers (2013, Decision Analysis) discuss how different scoring rul...
Evaluating quality of predicted distributions The standard way to assess predictive distributions is via scoring rules. The log-likelihood that Matthew Drury recommends is one example, it's the logarithmic scoring rule. There are also others. Mer
35,326
Normal distribution $var(X^2+Y^2)$
Since you are dealing with IID normal data, it is worth generalising your problem slightly to look at the case where you have $X_1, ..., X_n \sim \text{IID N}(a, b^2)$ and you want $Q_n \equiv \mathbb{V}(\sum_{i=1}^n X_i^2)$. (Your question corresponds to the case where $n=2$.) As other users have pointed out, the su...
Normal distribution $var(X^2+Y^2)$
Since you are dealing with IID normal data, it is worth generalising your problem slightly to look at the case where you have $X_1, ..., X_n \sim \text{IID N}(a, b^2)$ and you want $Q_n \equiv \mathbb
Normal distribution $var(X^2+Y^2)$ Since you are dealing with IID normal data, it is worth generalising your problem slightly to look at the case where you have $X_1, ..., X_n \sim \text{IID N}(a, b^2)$ and you want $Q_n \equiv \mathbb{V}(\sum_{i=1}^n X_i^2)$. (Your question corresponds to the case where $n=2$.) As o...
Normal distribution $var(X^2+Y^2)$ Since you are dealing with IID normal data, it is worth generalising your problem slightly to look at the case where you have $X_1, ..., X_n \sim \text{IID N}(a, b^2)$ and you want $Q_n \equiv \mathbb
35,327
Normal distribution $var(X^2+Y^2)$
If $X$ and $Y$ are $\text{N} (a, b^2)$ independent random variables, then $\left( \frac{X - a}{b} \right)^2 + \left( \frac{Y - a}{b} \right)^2$ is a $\chi ^2(2)$ random variable. Do you think you can take it from there?
Normal distribution $var(X^2+Y^2)$
If $X$ and $Y$ are $\text{N} (a, b^2)$ independent random variables, then $\left( \frac{X - a}{b} \right)^2 + \left( \frac{Y - a}{b} \right)^2$ is a $\chi ^2(2)$ random variable. Do you think you can
Normal distribution $var(X^2+Y^2)$ If $X$ and $Y$ are $\text{N} (a, b^2)$ independent random variables, then $\left( \frac{X - a}{b} \right)^2 + \left( \frac{Y - a}{b} \right)^2$ is a $\chi ^2(2)$ random variable. Do you think you can take it from there?
Normal distribution $var(X^2+Y^2)$ If $X$ and $Y$ are $\text{N} (a, b^2)$ independent random variables, then $\left( \frac{X - a}{b} \right)^2 + \left( \frac{Y - a}{b} \right)^2$ is a $\chi ^2(2)$ random variable. Do you think you can
35,328
Normal distribution $var(X^2+Y^2)$
The answer is in the non-central Chi-squared distribution. For example, if b=1, the answer to your question is: $2(k + 2(a^2))$, where $k=2$ is the number of components ($X$ and $Y$).
Normal distribution $var(X^2+Y^2)$
The answer is in the non-central Chi-squared distribution. For example, if b=1, the answer to your question is: $2(k + 2(a^2))$, where $k=2$ is the number of components ($X$ and $Y$).
Normal distribution $var(X^2+Y^2)$ The answer is in the non-central Chi-squared distribution. For example, if b=1, the answer to your question is: $2(k + 2(a^2))$, where $k=2$ is the number of components ($X$ and $Y$).
Normal distribution $var(X^2+Y^2)$ The answer is in the non-central Chi-squared distribution. For example, if b=1, the answer to your question is: $2(k + 2(a^2))$, where $k=2$ is the number of components ($X$ and $Y$).
35,329
The graphical intuiton of the LASSO in case p=2 [duplicate]
Recall that the Lasso minimization problem can be viewed as the minimization of two terms: $OLS + L_1$. To answer your question: The intersection depends on the "graphical position" of the OLS solution. But I can't explain to myself how the dependence works. The solution to the constrained optimization lies at the...
The graphical intuiton of the LASSO in case p=2 [duplicate]
Recall that the Lasso minimization problem can be viewed as the minimization of two terms: $OLS + L_1$. To answer your question: The intersection depends on the "graphical position" of the OLS solu
The graphical intuiton of the LASSO in case p=2 [duplicate] Recall that the Lasso minimization problem can be viewed as the minimization of two terms: $OLS + L_1$. To answer your question: The intersection depends on the "graphical position" of the OLS solution. But I can't explain to myself how the dependence works...
The graphical intuiton of the LASSO in case p=2 [duplicate] Recall that the Lasso minimization problem can be viewed as the minimization of two terms: $OLS + L_1$. To answer your question: The intersection depends on the "graphical position" of the OLS solu
35,330
The graphical intuiton of the LASSO in case p=2 [duplicate]
The ellipses are the equi-value contours of the loss, and the blue shapes are the regions of the penalty. By duality, the optimum occurs when a contour line intersects with a boundary of a blue shape. The case you've shown is indeed one that foils Lasso sparsity - the axis of the ellipses is perpendicular to the surfac...
The graphical intuiton of the LASSO in case p=2 [duplicate]
The ellipses are the equi-value contours of the loss, and the blue shapes are the regions of the penalty. By duality, the optimum occurs when a contour line intersects with a boundary of a blue shape.
The graphical intuiton of the LASSO in case p=2 [duplicate] The ellipses are the equi-value contours of the loss, and the blue shapes are the regions of the penalty. By duality, the optimum occurs when a contour line intersects with a boundary of a blue shape. The case you've shown is indeed one that foils Lasso sparsi...
The graphical intuiton of the LASSO in case p=2 [duplicate] The ellipses are the equi-value contours of the loss, and the blue shapes are the regions of the penalty. By duality, the optimum occurs when a contour line intersects with a boundary of a blue shape.
35,331
Expected value of maximum of samples from normal distribution
If we combine two of the answers here (Approximate order statistics for normal random variables), we have for the $r$th $\it{smallest}$ order statistic $$E[r,n] \approx \mu + \sigma \ \Phi^{-1} \left( \frac{r-\frac{\pi}{8}}{n-\frac{\pi}{4}+1}\right) $$ For the largest value we want $r=n,$ so we have $$E[Y] \approx \mu ...
Expected value of maximum of samples from normal distribution
If we combine two of the answers here (Approximate order statistics for normal random variables), we have for the $r$th $\it{smallest}$ order statistic $$E[r,n] \approx \mu + \sigma \ \Phi^{-1} \left(
Expected value of maximum of samples from normal distribution If we combine two of the answers here (Approximate order statistics for normal random variables), we have for the $r$th $\it{smallest}$ order statistic $$E[r,n] \approx \mu + \sigma \ \Phi^{-1} \left( \frac{r-\frac{\pi}{8}}{n-\frac{\pi}{4}+1}\right) $$ For t...
Expected value of maximum of samples from normal distribution If we combine two of the answers here (Approximate order statistics for normal random variables), we have for the $r$th $\it{smallest}$ order statistic $$E[r,n] \approx \mu + \sigma \ \Phi^{-1} \left(
35,332
Expected value of maximum of samples from normal distribution
First note that\begin{align}Y_n=\max\{X_1,\ldots,X_n\}&=\max\{\sigma\epsilon_1+\mu,\ldots,\sigma\epsilon_n+\mu\}\\&=\sigma\max\{\epsilon_1,\ldots,\epsilon_n\}+\mu\\&=\sigma\xi_n+\mu\end{align} hence that $(\mu,\sigma)$ is also a location-scale parameter for the maximum. Asymptotically, the Normal distribution belongs t...
Expected value of maximum of samples from normal distribution
First note that\begin{align}Y_n=\max\{X_1,\ldots,X_n\}&=\max\{\sigma\epsilon_1+\mu,\ldots,\sigma\epsilon_n+\mu\}\\&=\sigma\max\{\epsilon_1,\ldots,\epsilon_n\}+\mu\\&=\sigma\xi_n+\mu\end{align} hence t
Expected value of maximum of samples from normal distribution First note that\begin{align}Y_n=\max\{X_1,\ldots,X_n\}&=\max\{\sigma\epsilon_1+\mu,\ldots,\sigma\epsilon_n+\mu\}\\&=\sigma\max\{\epsilon_1,\ldots,\epsilon_n\}+\mu\\&=\sigma\xi_n+\mu\end{align} hence that $(\mu,\sigma)$ is also a location-scale parameter for ...
Expected value of maximum of samples from normal distribution First note that\begin{align}Y_n=\max\{X_1,\ldots,X_n\}&=\max\{\sigma\epsilon_1+\mu,\ldots,\sigma\epsilon_n+\mu\}\\&=\sigma\max\{\epsilon_1,\ldots,\epsilon_n\}+\mu\\&=\sigma\xi_n+\mu\end{align} hence t
35,333
Expected value of maximum of samples from normal distribution
EDIT: I found this paper referenced in a thread on the maths stack exchange (Approximate order statistics for normal random variables), so I had a look. For the maximum, $r=n$. "In a sample of size n the expected value of the rth largest order statistic is given by $$E(r,n)=\frac{n!}{(r-1)!(n-r)!}\int_{-\infty}^{\infty...
Expected value of maximum of samples from normal distribution
EDIT: I found this paper referenced in a thread on the maths stack exchange (Approximate order statistics for normal random variables), so I had a look. For the maximum, $r=n$. "In a sample of size n
Expected value of maximum of samples from normal distribution EDIT: I found this paper referenced in a thread on the maths stack exchange (Approximate order statistics for normal random variables), so I had a look. For the maximum, $r=n$. "In a sample of size n the expected value of the rth largest order statistic is g...
Expected value of maximum of samples from normal distribution EDIT: I found this paper referenced in a thread on the maths stack exchange (Approximate order statistics for normal random variables), so I had a look. For the maximum, $r=n$. "In a sample of size n
35,334
Gradient of the expectation of a function w.r.t. distribution parameters
Without knowing anything in partuclar about auto-encoders: (1) $E_{q(z|\phi)}[f(Z)]$ this notation is not really 'standard' but usually means the expression $$ E_{q(z|\phi)}[f(Z)] = \int_Z f(z) q(z|\phi) dz $$ I.e. it is a quirky way of writing the (factorization) of the conditional expectation $E[f(Z)|\Phi=\phi]$ whe...
Gradient of the expectation of a function w.r.t. distribution parameters
Without knowing anything in partuclar about auto-encoders: (1) $E_{q(z|\phi)}[f(Z)]$ this notation is not really 'standard' but usually means the expression $$ E_{q(z|\phi)}[f(Z)] = \int_Z f(z) q(z|\
Gradient of the expectation of a function w.r.t. distribution parameters Without knowing anything in partuclar about auto-encoders: (1) $E_{q(z|\phi)}[f(Z)]$ this notation is not really 'standard' but usually means the expression $$ E_{q(z|\phi)}[f(Z)] = \int_Z f(z) q(z|\phi) dz $$ I.e. it is a quirky way of writing t...
Gradient of the expectation of a function w.r.t. distribution parameters Without knowing anything in partuclar about auto-encoders: (1) $E_{q(z|\phi)}[f(Z)]$ this notation is not really 'standard' but usually means the expression $$ E_{q(z|\phi)}[f(Z)] = \int_Z f(z) q(z|\
35,335
Gradient of the expectation of a function w.r.t. distribution parameters
I don't know if this is too late but I would like to add my two cents. Let consider the simple case where $\phi$ and $z$ are 1 dimensional $\nabla_{\phi}\mathbb{E}_{q(z|\phi)}[f(z)] = \lim_{\delta \rightarrow 0} \frac{\int_{z=-\infty}^{z=\infty}f(z)q(z|\phi + \delta)dz \ - \int_{z=-\infty}^{z=\infty}f(z)q(z|\phi)dz}{\d...
Gradient of the expectation of a function w.r.t. distribution parameters
I don't know if this is too late but I would like to add my two cents. Let consider the simple case where $\phi$ and $z$ are 1 dimensional $\nabla_{\phi}\mathbb{E}_{q(z|\phi)}[f(z)] = \lim_{\delta \ri
Gradient of the expectation of a function w.r.t. distribution parameters I don't know if this is too late but I would like to add my two cents. Let consider the simple case where $\phi$ and $z$ are 1 dimensional $\nabla_{\phi}\mathbb{E}_{q(z|\phi)}[f(z)] = \lim_{\delta \rightarrow 0} \frac{\int_{z=-\infty}^{z=\infty}f(...
Gradient of the expectation of a function w.r.t. distribution parameters I don't know if this is too late but I would like to add my two cents. Let consider the simple case where $\phi$ and $z$ are 1 dimensional $\nabla_{\phi}\mathbb{E}_{q(z|\phi)}[f(z)] = \lim_{\delta \ri
35,336
Is there a mathematical definition of non-collapsibility?
Yes, there is, for instance, you can find one in Pearl, definition 6.5.1. Consider any functional $g[P(x, y)]$ of the joint distribution of $X$ and $Y$. We say $g$ is collapsible on $Z$ if: $$E_z\left[g[P(x, y|z)]\right] = g[P(x, y)]$$ We can see that collapsibility must make reference to not only $P(Y,X)$ but at least...
Is there a mathematical definition of non-collapsibility?
Yes, there is, for instance, you can find one in Pearl, definition 6.5.1. Consider any functional $g[P(x, y)]$ of the joint distribution of $X$ and $Y$. We say $g$ is collapsible on $Z$ if: $$E_z\left
Is there a mathematical definition of non-collapsibility? Yes, there is, for instance, you can find one in Pearl, definition 6.5.1. Consider any functional $g[P(x, y)]$ of the joint distribution of $X$ and $Y$. We say $g$ is collapsible on $Z$ if: $$E_z\left[g[P(x, y|z)]\right] = g[P(x, y)]$$ We can see that collapsibi...
Is there a mathematical definition of non-collapsibility? Yes, there is, for instance, you can find one in Pearl, definition 6.5.1. Consider any functional $g[P(x, y)]$ of the joint distribution of $X$ and $Y$. We say $g$ is collapsible on $Z$ if: $$E_z\left
35,337
References on number of features to use in Random Forest Regression
According to Elements of Statistical Learning (section 15.3): Recommended default values are $m = p/3$ for regression problems and $m = \sqrt{p}$ for classification problems (attributed to Breiman) The best value of $m$ depends on the problem, so $m$ should be treated as a tuning parameter. As discussed by Breiman (2...
References on number of features to use in Random Forest Regression
According to Elements of Statistical Learning (section 15.3): Recommended default values are $m = p/3$ for regression problems and $m = \sqrt{p}$ for classification problems (attributed to Breiman) T
References on number of features to use in Random Forest Regression According to Elements of Statistical Learning (section 15.3): Recommended default values are $m = p/3$ for regression problems and $m = \sqrt{p}$ for classification problems (attributed to Breiman) The best value of $m$ depends on the problem, so $m$ ...
References on number of features to use in Random Forest Regression According to Elements of Statistical Learning (section 15.3): Recommended default values are $m = p/3$ for regression problems and $m = \sqrt{p}$ for classification problems (attributed to Breiman) T
35,338
How does poisson regression handle zeros anyway?
The Poisson model is $$y = \exp \left(\alpha + \beta \cdot x + \varepsilon \right).$$ The way you get an outcome of zero is when the index $\alpha + \beta \cdot x + \varepsilon$ is large and negative. The coefficients do not come from a regression of logged outcome on the covariates, but from maximization of the log li...
How does poisson regression handle zeros anyway?
The Poisson model is $$y = \exp \left(\alpha + \beta \cdot x + \varepsilon \right).$$ The way you get an outcome of zero is when the index $\alpha + \beta \cdot x + \varepsilon$ is large and negative.
How does poisson regression handle zeros anyway? The Poisson model is $$y = \exp \left(\alpha + \beta \cdot x + \varepsilon \right).$$ The way you get an outcome of zero is when the index $\alpha + \beta \cdot x + \varepsilon$ is large and negative. The coefficients do not come from a regression of logged outcome on th...
How does poisson regression handle zeros anyway? The Poisson model is $$y = \exp \left(\alpha + \beta \cdot x + \varepsilon \right).$$ The way you get an outcome of zero is when the index $\alpha + \beta \cdot x + \varepsilon$ is large and negative.
35,339
How does poisson regression handle zeros anyway?
The poisson regression model is that the logarithm of the expected values can be modeled by a linear combination of predictors. The expected values of y are not 0, even though there may be 0 counts in the real data. The expectation is a positive real number.
How does poisson regression handle zeros anyway?
The poisson regression model is that the logarithm of the expected values can be modeled by a linear combination of predictors. The expected values of y are not 0, even though there may be 0 counts in
How does poisson regression handle zeros anyway? The poisson regression model is that the logarithm of the expected values can be modeled by a linear combination of predictors. The expected values of y are not 0, even though there may be 0 counts in the real data. The expectation is a positive real number.
How does poisson regression handle zeros anyway? The poisson regression model is that the logarithm of the expected values can be modeled by a linear combination of predictors. The expected values of y are not 0, even though there may be 0 counts in
35,340
Model with admissible estimator(s) that are not the Bayes estimator for any choice of prior?
Some results about Bayes and admissibility: If the Bayes risk is finite, there exists an admissible Bayes estimator, while if the Bayes risk is infinite there is no reason for the associated Bayes estimator(s) to be admissible. I cannot think of a case when all priors would have an infinite Bayes risk since the set of...
Model with admissible estimator(s) that are not the Bayes estimator for any choice of prior?
Some results about Bayes and admissibility: If the Bayes risk is finite, there exists an admissible Bayes estimator, while if the Bayes risk is infinite there is no reason for the associated Bayes es
Model with admissible estimator(s) that are not the Bayes estimator for any choice of prior? Some results about Bayes and admissibility: If the Bayes risk is finite, there exists an admissible Bayes estimator, while if the Bayes risk is infinite there is no reason for the associated Bayes estimator(s) to be admissible...
Model with admissible estimator(s) that are not the Bayes estimator for any choice of prior? Some results about Bayes and admissibility: If the Bayes risk is finite, there exists an admissible Bayes estimator, while if the Bayes risk is infinite there is no reason for the associated Bayes es
35,341
Is the MAP the maximum value of the posterior or its mode?
In Bayesian statistics, a maximum a posteriori probability (MAP) estimate is an estimate of an unknown quantity, that equals the mode of the posterior distribution. This is correct. As far as I understand it, the mode of a distribution depends on how I construct its histogram (or KDE). This looks to me to be in...
Is the MAP the maximum value of the posterior or its mode?
In Bayesian statistics, a maximum a posteriori probability (MAP) estimate is an estimate of an unknown quantity, that equals the mode of the posterior distribution. This is correct. As far as I
Is the MAP the maximum value of the posterior or its mode? In Bayesian statistics, a maximum a posteriori probability (MAP) estimate is an estimate of an unknown quantity, that equals the mode of the posterior distribution. This is correct. As far as I understand it, the mode of a distribution depends on how I ...
Is the MAP the maximum value of the posterior or its mode? In Bayesian statistics, a maximum a posteriori probability (MAP) estimate is an estimate of an unknown quantity, that equals the mode of the posterior distribution. This is correct. As far as I
35,342
Is the MAP the maximum value of the posterior or its mode?
The mode of distribution is either the value with more probability (for discrete random variable) or the point with highest probability density value (for continuous random variables). So yes, the mode of the a posteriori distribution is the MAP estimate. Note that, when constructing a histogram, you don't know the rea...
Is the MAP the maximum value of the posterior or its mode?
The mode of distribution is either the value with more probability (for discrete random variable) or the point with highest probability density value (for continuous random variables). So yes, the mod
Is the MAP the maximum value of the posterior or its mode? The mode of distribution is either the value with more probability (for discrete random variable) or the point with highest probability density value (for continuous random variables). So yes, the mode of the a posteriori distribution is the MAP estimate. Note ...
Is the MAP the maximum value of the posterior or its mode? The mode of distribution is either the value with more probability (for discrete random variable) or the point with highest probability density value (for continuous random variables). So yes, the mod
35,343
Comparing two regressions models by looking at $R^2$
Are $u$ the residuals; is the second model also supposed to have residuals? Choosing whether to log-transform the response variable should be based on the type of relationship you expect between the explanatory and response variable. The explained variance ($R^2$) can be low or high despite the relationship being log...
Comparing two regressions models by looking at $R^2$
Are $u$ the residuals; is the second model also supposed to have residuals? Choosing whether to log-transform the response variable should be based on the type of relationship you expect between the
Comparing two regressions models by looking at $R^2$ Are $u$ the residuals; is the second model also supposed to have residuals? Choosing whether to log-transform the response variable should be based on the type of relationship you expect between the explanatory and response variable. The explained variance ($R^2$) ...
Comparing two regressions models by looking at $R^2$ Are $u$ the residuals; is the second model also supposed to have residuals? Choosing whether to log-transform the response variable should be based on the type of relationship you expect between the
35,344
Comparing two regressions models by looking at $R^2$
If the only two choices are either a log transformation or no transformation of the dependent variable, then to get the AIC values on an equal footing and allow for a comparison one could perform the linear regression on the untransformed dependent variable and on the log-transformed dependent variable multiplied by th...
Comparing two regressions models by looking at $R^2$
If the only two choices are either a log transformation or no transformation of the dependent variable, then to get the AIC values on an equal footing and allow for a comparison one could perform the
Comparing two regressions models by looking at $R^2$ If the only two choices are either a log transformation or no transformation of the dependent variable, then to get the AIC values on an equal footing and allow for a comparison one could perform the linear regression on the untransformed dependent variable and on th...
Comparing two regressions models by looking at $R^2$ If the only two choices are either a log transformation or no transformation of the dependent variable, then to get the AIC values on an equal footing and allow for a comparison one could perform the
35,345
Incremental learning with decision trees (scikit-learn)
Scikit-learn only offers implementations of the most common Decision Tree Algorithms (D3, C4.5, C5.0 and CART). These depend on having the whole dataset in memory, so there is no way to use partial-fit on them. You could only learn multiple decision trees on small subsets of your data and arrange them into a random for...
Incremental learning with decision trees (scikit-learn)
Scikit-learn only offers implementations of the most common Decision Tree Algorithms (D3, C4.5, C5.0 and CART). These depend on having the whole dataset in memory, so there is no way to use partial-fi
Incremental learning with decision trees (scikit-learn) Scikit-learn only offers implementations of the most common Decision Tree Algorithms (D3, C4.5, C5.0 and CART). These depend on having the whole dataset in memory, so there is no way to use partial-fit on them. You could only learn multiple decision trees on small...
Incremental learning with decision trees (scikit-learn) Scikit-learn only offers implementations of the most common Decision Tree Algorithms (D3, C4.5, C5.0 and CART). These depend on having the whole dataset in memory, so there is no way to use partial-fi
35,346
In causal inference in statistics, how do you interpret the consistency assumption in mathematical terms?
Let me use $X$ for the treatment, $Y$ for the observed outcome and $Y(x)$ for the potential outcome under $X = x$. Consistency means that for an individual $i$, his observed outcome $Y_i$ when $X_i = x$ is his potential outcome $Y_{i}(x)$. Or, more formally: $$X_i = x \implies Y_i(x) = Y_i$$ When the treatment is bina...
In causal inference in statistics, how do you interpret the consistency assumption in mathematical t
Let me use $X$ for the treatment, $Y$ for the observed outcome and $Y(x)$ for the potential outcome under $X = x$. Consistency means that for an individual $i$, his observed outcome $Y_i$ when $X_i =
In causal inference in statistics, how do you interpret the consistency assumption in mathematical terms? Let me use $X$ for the treatment, $Y$ for the observed outcome and $Y(x)$ for the potential outcome under $X = x$. Consistency means that for an individual $i$, his observed outcome $Y_i$ when $X_i = x$ is his pot...
In causal inference in statistics, how do you interpret the consistency assumption in mathematical t Let me use $X$ for the treatment, $Y$ for the observed outcome and $Y(x)$ for the potential outcome under $X = x$. Consistency means that for an individual $i$, his observed outcome $Y_i$ when $X_i =
35,347
How to calculate a partial expected value of beta distribution (mean of a truncated beta)?
Note that the formula you have near the top there for the beta median ($\frac{\alpha-\frac13}{\alpha+\beta-\frac23}$) is approximate. You should be able to compute an effectively "exact" numerical median with the inverse cdf (quantile function) of the beta distribution in Python (for a $\text{beta}(2,3)$ I get a median...
How to calculate a partial expected value of beta distribution (mean of a truncated beta)?
Note that the formula you have near the top there for the beta median ($\frac{\alpha-\frac13}{\alpha+\beta-\frac23}$) is approximate. You should be able to compute an effectively "exact" numerical med
How to calculate a partial expected value of beta distribution (mean of a truncated beta)? Note that the formula you have near the top there for the beta median ($\frac{\alpha-\frac13}{\alpha+\beta-\frac23}$) is approximate. You should be able to compute an effectively "exact" numerical median with the inverse cdf (qua...
How to calculate a partial expected value of beta distribution (mean of a truncated beta)? Note that the formula you have near the top there for the beta median ($\frac{\alpha-\frac13}{\alpha+\beta-\frac23}$) is approximate. You should be able to compute an effectively "exact" numerical med
35,348
How to calculate a partial expected value of beta distribution (mean of a truncated beta)?
For people who just want a scipy one-liner, it is also possible to use the expect function: from scipy.stats import beta as B start = 0 end = 0.4 a=2 b=3 print(B(a, b, loc=0, scale=1).expect(lb=start,ub=end,conditional=True)) 0.24195121951219523 This has the advantage of being (slightly) more readable, and more ge...
How to calculate a partial expected value of beta distribution (mean of a truncated beta)?
For people who just want a scipy one-liner, it is also possible to use the expect function: from scipy.stats import beta as B start = 0 end = 0.4 a=2 b=3 print(B(a, b, loc=0, scale=1).expect(lb=star
How to calculate a partial expected value of beta distribution (mean of a truncated beta)? For people who just want a scipy one-liner, it is also possible to use the expect function: from scipy.stats import beta as B start = 0 end = 0.4 a=2 b=3 print(B(a, b, loc=0, scale=1).expect(lb=start,ub=end,conditional=True)) ...
How to calculate a partial expected value of beta distribution (mean of a truncated beta)? For people who just want a scipy one-liner, it is also possible to use the expect function: from scipy.stats import beta as B start = 0 end = 0.4 a=2 b=3 print(B(a, b, loc=0, scale=1).expect(lb=star
35,349
The expected number of unique elements drawn with replacement
The solution to this problem makes use of a classic technique in probability, which is to begin by defining a set of so-called indicator (i.e. binary-valued) random variables, and then to use linearity of expectation. We begin by defining for each of the $n$ bins the random variable $$ \begin{align*} I_j = \begin{cases...
The expected number of unique elements drawn with replacement
The solution to this problem makes use of a classic technique in probability, which is to begin by defining a set of so-called indicator (i.e. binary-valued) random variables, and then to use linearit
The expected number of unique elements drawn with replacement The solution to this problem makes use of a classic technique in probability, which is to begin by defining a set of so-called indicator (i.e. binary-valued) random variables, and then to use linearity of expectation. We begin by defining for each of the $n$...
The expected number of unique elements drawn with replacement The solution to this problem makes use of a classic technique in probability, which is to begin by defining a set of so-called indicator (i.e. binary-valued) random variables, and then to use linearit
35,350
Proof of Convergence for SARSA/Q-Learning Algorithm
The SARSA algorithm is a stochastic approximation to the Bellman equations for Markov Decision Processes. One way of writing the Bellman equation for $q_{\pi}(s,a)$ is: $$q_{\pi}(s,a) = \sum_{s',r}p(s',r|s,a)( r + \gamma \sum_{a'}\pi(a'|s') q_{\pi}(s',a'))$$ Where $p(s',r|s,a)$ is the probability of transition to state...
Proof of Convergence for SARSA/Q-Learning Algorithm
The SARSA algorithm is a stochastic approximation to the Bellman equations for Markov Decision Processes. One way of writing the Bellman equation for $q_{\pi}(s,a)$ is: $$q_{\pi}(s,a) = \sum_{s',r}p(s
Proof of Convergence for SARSA/Q-Learning Algorithm The SARSA algorithm is a stochastic approximation to the Bellman equations for Markov Decision Processes. One way of writing the Bellman equation for $q_{\pi}(s,a)$ is: $$q_{\pi}(s,a) = \sum_{s',r}p(s',r|s,a)( r + \gamma \sum_{a'}\pi(a'|s') q_{\pi}(s',a'))$$ Where $p(...
Proof of Convergence for SARSA/Q-Learning Algorithm The SARSA algorithm is a stochastic approximation to the Bellman equations for Markov Decision Processes. One way of writing the Bellman equation for $q_{\pi}(s,a)$ is: $$q_{\pi}(s,a) = \sum_{s',r}p(s
35,351
Poisson regression with strong pattern in residuals
I would not begin by transforming the response variable (DV). I'd start by considering whether you have the right link function or whether you should transform some x's (independent variables). If you expect the ticketCount to be proportional to some of those predictors (I sure would), you might either want to use an ...
Poisson regression with strong pattern in residuals
I would not begin by transforming the response variable (DV). I'd start by considering whether you have the right link function or whether you should transform some x's (independent variables). If yo
Poisson regression with strong pattern in residuals I would not begin by transforming the response variable (DV). I'd start by considering whether you have the right link function or whether you should transform some x's (independent variables). If you expect the ticketCount to be proportional to some of those predict...
Poisson regression with strong pattern in residuals I would not begin by transforming the response variable (DV). I'd start by considering whether you have the right link function or whether you should transform some x's (independent variables). If yo
35,352
Poisson regression with strong pattern in residuals
Surely ticketcount with a maximum possible value of capacity can only at best be approximately Poisson. Would it perhaps be more logical to model this as binomial with of ticketcount out of capacity? If it were not for this being clearly a potential inappropriate distribution, I would have wondered about whether you m...
Poisson regression with strong pattern in residuals
Surely ticketcount with a maximum possible value of capacity can only at best be approximately Poisson. Would it perhaps be more logical to model this as binomial with of ticketcount out of capacity?
Poisson regression with strong pattern in residuals Surely ticketcount with a maximum possible value of capacity can only at best be approximately Poisson. Would it perhaps be more logical to model this as binomial with of ticketcount out of capacity? If it were not for this being clearly a potential inappropriate dis...
Poisson regression with strong pattern in residuals Surely ticketcount with a maximum possible value of capacity can only at best be approximately Poisson. Would it perhaps be more logical to model this as binomial with of ticketcount out of capacity?
35,353
Linear regression with changing variance
This sounds like a special case of heteroscedasticity. There are two issues: What estimator should you use in the presence of heteroscedasticity? How should you calculate your standard errors? The most straightforward thing to do is run a regular regression but use heteroscedastic robust standard errors. As @Glen_b s...
Linear regression with changing variance
This sounds like a special case of heteroscedasticity. There are two issues: What estimator should you use in the presence of heteroscedasticity? How should you calculate your standard errors? The m
Linear regression with changing variance This sounds like a special case of heteroscedasticity. There are two issues: What estimator should you use in the presence of heteroscedasticity? How should you calculate your standard errors? The most straightforward thing to do is run a regular regression but use heterosceda...
Linear regression with changing variance This sounds like a special case of heteroscedasticity. There are two issues: What estimator should you use in the presence of heteroscedasticity? How should you calculate your standard errors? The m
35,354
Linear regression with changing variance
Your data violate the assumption of homoscedasticity. You can use a regression method that produces standard errors that are robust to heteroscedasticity. What software are you using to run your regression? If you are using R, you can use the sandwich package to estimate robust standard errors.
Linear regression with changing variance
Your data violate the assumption of homoscedasticity. You can use a regression method that produces standard errors that are robust to heteroscedasticity. What software are you using to run your regre
Linear regression with changing variance Your data violate the assumption of homoscedasticity. You can use a regression method that produces standard errors that are robust to heteroscedasticity. What software are you using to run your regression? If you are using R, you can use the sandwich package to estimate robust ...
Linear regression with changing variance Your data violate the assumption of homoscedasticity. You can use a regression method that produces standard errors that are robust to heteroscedasticity. What software are you using to run your regre
35,355
Linear regression with changing variance
Machine learning guy here -- as much as I love the stats folks ML usually wins the day in real-world applications, and heteroscedasticity is one such common occurrence. A more general solution that is non-parametric and works for this and other (even highly) nonlinear regression problems is to just use quantile regres...
Linear regression with changing variance
Machine learning guy here -- as much as I love the stats folks ML usually wins the day in real-world applications, and heteroscedasticity is one such common occurrence. A more general solution that i
Linear regression with changing variance Machine learning guy here -- as much as I love the stats folks ML usually wins the day in real-world applications, and heteroscedasticity is one such common occurrence. A more general solution that is non-parametric and works for this and other (even highly) nonlinear regressio...
Linear regression with changing variance Machine learning guy here -- as much as I love the stats folks ML usually wins the day in real-world applications, and heteroscedasticity is one such common occurrence. A more general solution that i
35,356
Why can't this function be used as a loss function?
The loss function in the original post seems like a 0-1 loss divided by $N$, which is in fact the ultimate goal of most of classification settings. Actually, 0-1 loss divided by $N$ is equivalent to the accuracy metric. What your friend said is that it is difficult to use 0-1 loss directly for training a model. This is...
Why can't this function be used as a loss function?
The loss function in the original post seems like a 0-1 loss divided by $N$, which is in fact the ultimate goal of most of classification settings. Actually, 0-1 loss divided by $N$ is equivalent to t
Why can't this function be used as a loss function? The loss function in the original post seems like a 0-1 loss divided by $N$, which is in fact the ultimate goal of most of classification settings. Actually, 0-1 loss divided by $N$ is equivalent to the accuracy metric. What your friend said is that it is difficult to...
Why can't this function be used as a loss function? The loss function in the original post seems like a 0-1 loss divided by $N$, which is in fact the ultimate goal of most of classification settings. Actually, 0-1 loss divided by $N$ is equivalent to t
35,357
Why can't this function be used as a loss function?
A loss function must be differentiable to perform gradient descent. It seems like you're trying to measure some sort of 1-accuracy (e.g., the proportion of incorrectly labeled samples). This doesn't have a derivative, so you can't use it. Instead, use cross entropy.
Why can't this function be used as a loss function?
A loss function must be differentiable to perform gradient descent. It seems like you're trying to measure some sort of 1-accuracy (e.g., the proportion of incorrectly labeled samples). This doesn't
Why can't this function be used as a loss function? A loss function must be differentiable to perform gradient descent. It seems like you're trying to measure some sort of 1-accuracy (e.g., the proportion of incorrectly labeled samples). This doesn't have a derivative, so you can't use it. Instead, use cross entropy...
Why can't this function be used as a loss function? A loss function must be differentiable to perform gradient descent. It seems like you're trying to measure some sort of 1-accuracy (e.g., the proportion of incorrectly labeled samples). This doesn't
35,358
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R
No difference. Type debug(prcomp) before running prcomp. The third line of the function reads: x <- scale(x, center = center, scale = scale.); ie. you will either scale within the function if you set scale = TRUE during function call or you will have the scaling done originally by you. Having said that, when applying ...
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R
No difference. Type debug(prcomp) before running prcomp. The third line of the function reads: x <- scale(x, center = center, scale = scale.); ie. you will either scale within the function if you set
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R No difference. Type debug(prcomp) before running prcomp. The third line of the function reads: x <- scale(x, center = center, scale = scale.); ie. you will either scale within the function if you set scale = TRUE during function call or you will ...
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R No difference. Type debug(prcomp) before running prcomp. The third line of the function reads: x <- scale(x, center = center, scale = scale.); ie. you will either scale within the function if you set
35,359
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. Using the correlation matrix is equivalent to standard...
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. ...
Normalizing all the variarbles vs. using scale=TRUE option in prcomp in R Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
35,360
How can I convert a lognormal distribution into a normal distribution?
By definition, a random variable $Z$ has a Lognormal distribution when $\log Z$ has a Normal distribution. This means there are numbers $\sigma\gt 0$ and $\mu$ for which the density function of $X = (\log(Z) - \mu)/\sigma$ is $$\phi(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2}.$$ The density of $Z$ itself is obtained by subs...
How can I convert a lognormal distribution into a normal distribution?
By definition, a random variable $Z$ has a Lognormal distribution when $\log Z$ has a Normal distribution. This means there are numbers $\sigma\gt 0$ and $\mu$ for which the density function of $X =
How can I convert a lognormal distribution into a normal distribution? By definition, a random variable $Z$ has a Lognormal distribution when $\log Z$ has a Normal distribution. This means there are numbers $\sigma\gt 0$ and $\mu$ for which the density function of $X = (\log(Z) - \mu)/\sigma$ is $$\phi(x) = \frac{1}{\...
How can I convert a lognormal distribution into a normal distribution? By definition, a random variable $Z$ has a Lognormal distribution when $\log Z$ has a Normal distribution. This means there are numbers $\sigma\gt 0$ and $\mu$ for which the density function of $X =
35,361
How can I convert a lognormal distribution into a normal distribution?
NO, to transform lognormal data to normal you just take the log. That is what the name is saying, "log (of data) is normal". But you cannot just apply the log to the parameters of the lognormal to get the parameters of the normal. Log is a non-linear transformation, so relationship will be more complicated , but is ...
How can I convert a lognormal distribution into a normal distribution?
NO, to transform lognormal data to normal you just take the log. That is what the name is saying, "log (of data) is normal". But you cannot just apply the log to the parameters of the lognormal to g
How can I convert a lognormal distribution into a normal distribution? NO, to transform lognormal data to normal you just take the log. That is what the name is saying, "log (of data) is normal". But you cannot just apply the log to the parameters of the lognormal to get the parameters of the normal. Log is a non-li...
How can I convert a lognormal distribution into a normal distribution? NO, to transform lognormal data to normal you just take the log. That is what the name is saying, "log (of data) is normal". But you cannot just apply the log to the parameters of the lognormal to g
35,362
How can I convert a lognormal distribution into a normal distribution?
I just stumbled into this post. I just want to give my 2 cents here: You can transform the distribution by change of variable: So transforming norm to log norm you use the following formula: Y=EXP(X) <=> LN(Y) = X Applying change of variable: pdf(y) = pdf(x) * dy/dx <=> pdf(y) = Norm(ln(x)) / x So you want the log norm...
How can I convert a lognormal distribution into a normal distribution?
I just stumbled into this post. I just want to give my 2 cents here: You can transform the distribution by change of variable: So transforming norm to log norm you use the following formula: Y=EXP(X)
How can I convert a lognormal distribution into a normal distribution? I just stumbled into this post. I just want to give my 2 cents here: You can transform the distribution by change of variable: So transforming norm to log norm you use the following formula: Y=EXP(X) <=> LN(Y) = X Applying change of variable: pdf(y)...
How can I convert a lognormal distribution into a normal distribution? I just stumbled into this post. I just want to give my 2 cents here: You can transform the distribution by change of variable: So transforming norm to log norm you use the following formula: Y=EXP(X)
35,363
What is the distribution of the sample variance for a Poisson random variable?
The distribution of the sample variance is slightly tricky, particularly because of the way the sample mean comes into it. Note that it has a discrete distribution, by taking deviations from the sample mean, the sizes of the positive and negative deviations will vary from sample to sample and will generally not be of ...
What is the distribution of the sample variance for a Poisson random variable?
The distribution of the sample variance is slightly tricky, particularly because of the way the sample mean comes into it. Note that it has a discrete distribution, by taking deviations from the samp
What is the distribution of the sample variance for a Poisson random variable? The distribution of the sample variance is slightly tricky, particularly because of the way the sample mean comes into it. Note that it has a discrete distribution, by taking deviations from the sample mean, the sizes of the positive and ne...
What is the distribution of the sample variance for a Poisson random variable? The distribution of the sample variance is slightly tricky, particularly because of the way the sample mean comes into it. Note that it has a discrete distribution, by taking deviations from the samp
35,364
Autocovariance, Autocorrelation and Autocorrelation coefficient
Q1: Say you have observations over time on a variable $\{x_t\}, t=\{1,...,T\}$. If they are generated from a second-order stationary stochastic process (Click) you may apply the following techniques to find the first autocovariance and the first autocorrelation coefficient. Calculate the covariance of observations $x_t...
Autocovariance, Autocorrelation and Autocorrelation coefficient
Q1: Say you have observations over time on a variable $\{x_t\}, t=\{1,...,T\}$. If they are generated from a second-order stationary stochastic process (Click) you may apply the following techniques t
Autocovariance, Autocorrelation and Autocorrelation coefficient Q1: Say you have observations over time on a variable $\{x_t\}, t=\{1,...,T\}$. If they are generated from a second-order stationary stochastic process (Click) you may apply the following techniques to find the first autocovariance and the first autocorrel...
Autocovariance, Autocorrelation and Autocorrelation coefficient Q1: Say you have observations over time on a variable $\{x_t\}, t=\{1,...,T\}$. If they are generated from a second-order stationary stochastic process (Click) you may apply the following techniques t
35,365
Autocovariance, Autocorrelation and Autocorrelation coefficient
Disclaimer: This is meant to be an intuitive explanation without going into mathematical details, given that the original question seemed fairly elementary. To understand the difference between auto-covariance and auto-correlation, it helps to understand the difference between covariance and correlation. Covariance is ...
Autocovariance, Autocorrelation and Autocorrelation coefficient
Disclaimer: This is meant to be an intuitive explanation without going into mathematical details, given that the original question seemed fairly elementary. To understand the difference between auto-c
Autocovariance, Autocorrelation and Autocorrelation coefficient Disclaimer: This is meant to be an intuitive explanation without going into mathematical details, given that the original question seemed fairly elementary. To understand the difference between auto-covariance and auto-correlation, it helps to understand t...
Autocovariance, Autocorrelation and Autocorrelation coefficient Disclaimer: This is meant to be an intuitive explanation without going into mathematical details, given that the original question seemed fairly elementary. To understand the difference between auto-c
35,366
Why there is no transition probability in Q-Learning (reinforcement learning)?
Algorithms that don't learn the state-transition probability function are called model-free. One of the main problems with model-based algorithms is that there are often many states, and a naïve model is quadratic in the number of states. That imposes a huge data requirement. Q-learning is model-free. It does not le...
Why there is no transition probability in Q-Learning (reinforcement learning)?
Algorithms that don't learn the state-transition probability function are called model-free. One of the main problems with model-based algorithms is that there are often many states, and a naïve mode
Why there is no transition probability in Q-Learning (reinforcement learning)? Algorithms that don't learn the state-transition probability function are called model-free. One of the main problems with model-based algorithms is that there are often many states, and a naïve model is quadratic in the number of states. ...
Why there is no transition probability in Q-Learning (reinforcement learning)? Algorithms that don't learn the state-transition probability function are called model-free. One of the main problems with model-based algorithms is that there are often many states, and a naïve mode
35,367
Why there is no transition probability in Q-Learning (reinforcement learning)?
For clarity, I think you should replace $max_a(Q', a)$ with $max_a(Q(S', a))$ as there is only one action-value function, we are just evaluating Q on actions in the next state. This notation also hints at where the $p(s'|s, a)$ lies. Intuitively, $p(s'|s, a)$ is a property of the environment. We do not control how it ...
Why there is no transition probability in Q-Learning (reinforcement learning)?
For clarity, I think you should replace $max_a(Q', a)$ with $max_a(Q(S', a))$ as there is only one action-value function, we are just evaluating Q on actions in the next state. This notation also hint
Why there is no transition probability in Q-Learning (reinforcement learning)? For clarity, I think you should replace $max_a(Q', a)$ with $max_a(Q(S', a))$ as there is only one action-value function, we are just evaluating Q on actions in the next state. This notation also hints at where the $p(s'|s, a)$ lies. Intuit...
Why there is no transition probability in Q-Learning (reinforcement learning)? For clarity, I think you should replace $max_a(Q', a)$ with $max_a(Q(S', a))$ as there is only one action-value function, we are just evaluating Q on actions in the next state. This notation also hint
35,368
Why there is no transition probability in Q-Learning (reinforcement learning)?
In addition to the above, Q-Learning is a model-free algorithm,that means that our agent just know the states what the environment gives to it. In other words, if an agent selects and performs an action, next state is determined by the environment only and gives to the agent. For that reason, the agent do not think abo...
Why there is no transition probability in Q-Learning (reinforcement learning)?
In addition to the above, Q-Learning is a model-free algorithm,that means that our agent just know the states what the environment gives to it. In other words, if an agent selects and performs an acti
Why there is no transition probability in Q-Learning (reinforcement learning)? In addition to the above, Q-Learning is a model-free algorithm,that means that our agent just know the states what the environment gives to it. In other words, if an agent selects and performs an action, next state is determined by the envir...
Why there is no transition probability in Q-Learning (reinforcement learning)? In addition to the above, Q-Learning is a model-free algorithm,that means that our agent just know the states what the environment gives to it. In other words, if an agent selects and performs an acti
35,369
Equation for the variance inflation factors
Assume all $X$ variables are standardized by the correlation transformation, like you mentioned, unit length scaled version of $\mathbf{X}$. The standardized model does not change the correlation between $X$ variables. $VIF$ can be calculated when standardized transformation of the original linear model is made. Let's ...
Equation for the variance inflation factors
Assume all $X$ variables are standardized by the correlation transformation, like you mentioned, unit length scaled version of $\mathbf{X}$. The standardized model does not change the correlation betw
Equation for the variance inflation factors Assume all $X$ variables are standardized by the correlation transformation, like you mentioned, unit length scaled version of $\mathbf{X}$. The standardized model does not change the correlation between $X$ variables. $VIF$ can be calculated when standardized transformation ...
Equation for the variance inflation factors Assume all $X$ variables are standardized by the correlation transformation, like you mentioned, unit length scaled version of $\mathbf{X}$. The standardized model does not change the correlation betw
35,370
Variance of gradient as e.g. in SGD
I gave this issue some more thoughts and came to the following conclusion: Most of the papers that deal with variance reduction for SGD (methods such as SVRG, SAGA, and SAG) actually mean the 1-norm of the variance of the gradients (trace of cov-matrix) when they write $\operatorname{Var}(g)$. Assuming that the stochas...
Variance of gradient as e.g. in SGD
I gave this issue some more thoughts and came to the following conclusion: Most of the papers that deal with variance reduction for SGD (methods such as SVRG, SAGA, and SAG) actually mean the 1-norm o
Variance of gradient as e.g. in SGD I gave this issue some more thoughts and came to the following conclusion: Most of the papers that deal with variance reduction for SGD (methods such as SVRG, SAGA, and SAG) actually mean the 1-norm of the variance of the gradients (trace of cov-matrix) when they write $\operatorname...
Variance of gradient as e.g. in SGD I gave this issue some more thoughts and came to the following conclusion: Most of the papers that deal with variance reduction for SGD (methods such as SVRG, SAGA, and SAG) actually mean the 1-norm o
35,371
In MLE for continuous rv, why is it ok to evaluate a pdf at a point?
Intuitively, @dsaxton's answer provides the correct logic. Let me just "translate" it to math language. Suppose the sample $Y_1, \ldots, Y_n \text{ i.i.d.} \sim f_\theta(y)$, $\theta \in \Theta$, where $\Theta$ is the parameter space and $f_\theta(\cdot)$ are density functions. After a vector of observations $y = (y_1,...
In MLE for continuous rv, why is it ok to evaluate a pdf at a point?
Intuitively, @dsaxton's answer provides the correct logic. Let me just "translate" it to math language. Suppose the sample $Y_1, \ldots, Y_n \text{ i.i.d.} \sim f_\theta(y)$, $\theta \in \Theta$, wher
In MLE for continuous rv, why is it ok to evaluate a pdf at a point? Intuitively, @dsaxton's answer provides the correct logic. Let me just "translate" it to math language. Suppose the sample $Y_1, \ldots, Y_n \text{ i.i.d.} \sim f_\theta(y)$, $\theta \in \Theta$, where $\Theta$ is the parameter space and $f_\theta(\cd...
In MLE for continuous rv, why is it ok to evaluate a pdf at a point? Intuitively, @dsaxton's answer provides the correct logic. Let me just "translate" it to math language. Suppose the sample $Y_1, \ldots, Y_n \text{ i.i.d.} \sim f_\theta(y)$, $\theta \in \Theta$, wher
35,372
In MLE for continuous rv, why is it ok to evaluate a pdf at a point?
It's not "incorrect" to look at a density function at a specific point. If it were, what's the point of the function? What you may have heard is that a density function at a given point is not to be interpreted as a probability, but that doesn't make it unimportant. The density function tells you how "tightly packed"...
In MLE for continuous rv, why is it ok to evaluate a pdf at a point?
It's not "incorrect" to look at a density function at a specific point. If it were, what's the point of the function? What you may have heard is that a density function at a given point is not to be
In MLE for continuous rv, why is it ok to evaluate a pdf at a point? It's not "incorrect" to look at a density function at a specific point. If it were, what's the point of the function? What you may have heard is that a density function at a given point is not to be interpreted as a probability, but that doesn't make...
In MLE for continuous rv, why is it ok to evaluate a pdf at a point? It's not "incorrect" to look at a density function at a specific point. If it were, what's the point of the function? What you may have heard is that a density function at a given point is not to be
35,373
Is this a Monte Carlo simulation?
This is a Monte Carlo simulation, though I doubt it's doing what you want, and really is of no practical use. What you are comparing is 10000 single sample studies and determining how many of these individual observed values are on average higher. So, it's probably better to conceptualize your code as the following les...
Is this a Monte Carlo simulation?
This is a Monte Carlo simulation, though I doubt it's doing what you want, and really is of no practical use. What you are comparing is 10000 single sample studies and determining how many of these in
Is this a Monte Carlo simulation? This is a Monte Carlo simulation, though I doubt it's doing what you want, and really is of no practical use. What you are comparing is 10000 single sample studies and determining how many of these individual observed values are on average higher. So, it's probably better to conceptual...
Is this a Monte Carlo simulation? This is a Monte Carlo simulation, though I doubt it's doing what you want, and really is of no practical use. What you are comparing is 10000 single sample studies and determining how many of these in
35,374
Deep Learning: Use L2 and Dropout Regularization Simultaneously?
The paper {1} that introduced dropout combined dropout with L2: We found that dropout combined with max-norm regularization gives the lowest generalization error. {1} Srivastava, Nitish, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. "Dropout: a simple way to prevent neural networ...
Deep Learning: Use L2 and Dropout Regularization Simultaneously?
The paper {1} that introduced dropout combined dropout with L2: We found that dropout combined with max-norm regularization gives the lowest generalization error. {1} Srivastava, Nitish, Geoffr
Deep Learning: Use L2 and Dropout Regularization Simultaneously? The paper {1} that introduced dropout combined dropout with L2: We found that dropout combined with max-norm regularization gives the lowest generalization error. {1} Srivastava, Nitish, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Rusl...
Deep Learning: Use L2 and Dropout Regularization Simultaneously? The paper {1} that introduced dropout combined dropout with L2: We found that dropout combined with max-norm regularization gives the lowest generalization error. {1} Srivastava, Nitish, Geoffr
35,375
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$?
Because the variance is a second-order moment, related to squaring, so a factor gets squared. More precisely, since the expectation is a linear operation, in general, if you have a centered $d$-order moment (yours is a $2$-order moment): $$\mu_{d}(X)=\operatorname {E} \left[X^{d}\right]=\int _{-\infty }^{\infty }x^{...
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$?
Because the variance is a second-order moment, related to squaring, so a factor gets squared. More precisely, since the expectation is a linear operation, in general, if you have a centered $d$-orde
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$? Because the variance is a second-order moment, related to squaring, so a factor gets squared. More precisely, since the expectation is a linear operation, in general, if you have a centered $d$-order moment (yours is a $2$-order moment): $$\mu_{d}(X)=\operat...
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$? Because the variance is a second-order moment, related to squaring, so a factor gets squared. More precisely, since the expectation is a linear operation, in general, if you have a centered $d$-orde
35,376
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$?
Suppose $X\sim N(\mu, \sigma^{2})$. Then, \begin{eqnarray*} X-\mu &\sim& N(0, \sigma^{2})\\ \frac{X-\mu}{\sigma}&\sim&N(0,1). \end{eqnarray*} Similarly, if $X_{1},X_{2},\cdots X_{n}$ is a random sample from $N(\mu,\sigma^{2})$, then the sample mean, \begin{eqnarray*} \bar{X}=\frac{1}{n}\sum_{i=1}^{n}X_{i}&\sim & N\lef...
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$?
Suppose $X\sim N(\mu, \sigma^{2})$. Then, \begin{eqnarray*} X-\mu &\sim& N(0, \sigma^{2})\\ \frac{X-\mu}{\sigma}&\sim&N(0,1). \end{eqnarray*} Similarly, if $X_{1},X_{2},\cdots X_{n}$ is a random sampl
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$? Suppose $X\sim N(\mu, \sigma^{2})$. Then, \begin{eqnarray*} X-\mu &\sim& N(0, \sigma^{2})\\ \frac{X-\mu}{\sigma}&\sim&N(0,1). \end{eqnarray*} Similarly, if $X_{1},X_{2},\cdots X_{n}$ is a random sample from $N(\mu,\sigma^{2})$, then the sample mean, \begin{eqn...
If $X_n ∼ N(0, 1/n)$, then why is $\sqrt{n}X_n ∼ N(0, 1)$? Suppose $X\sim N(\mu, \sigma^{2})$. Then, \begin{eqnarray*} X-\mu &\sim& N(0, \sigma^{2})\\ \frac{X-\mu}{\sigma}&\sim&N(0,1). \end{eqnarray*} Similarly, if $X_{1},X_{2},\cdots X_{n}$ is a random sampl
35,377
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities
Simulation results will depend on how the parameter is sampled in the simulation. I don't think there is any dispute over whether the posterior probabilities will be calibrated (in the frequency sense) if the prior probabilities are, so I suspect a simulation will not convince anyone of anything new. Anyway, in the se...
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities
Simulation results will depend on how the parameter is sampled in the simulation. I don't think there is any dispute over whether the posterior probabilities will be calibrated (in the frequency sense
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities Simulation results will depend on how the parameter is sampled in the simulation. I don't think there is any dispute over whether the posterior probabilities will be calibrated (in the frequency sense) if the prior probabilities ar...
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities Simulation results will depend on how the parameter is sampled in the simulation. I don't think there is any dispute over whether the posterior probabilities will be calibrated (in the frequency sense
35,378
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities
Expanding on the excellent answer by @juho-kokkala and using R here are the results. For a prior distribution for the population mean mu I used an equal mixture of two normals with mean zero, one of them very skeptical about large means. ## Posterior density for a normal data distribution and for ## a mixture of two n...
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities
Expanding on the excellent answer by @juho-kokkala and using R here are the results. For a prior distribution for the population mean mu I used an equal mixture of two normals with mean zero, one of
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities Expanding on the excellent answer by @juho-kokkala and using R here are the results. For a prior distribution for the population mean mu I used an equal mixture of two normals with mean zero, one of them very skeptical about large...
Setting up simulation algorithm to check calibration of Bayesian posterior probabilities Expanding on the excellent answer by @juho-kokkala and using R here are the results. For a prior distribution for the population mean mu I used an equal mixture of two normals with mean zero, one of
35,379
Why is the Kalman Filter a specific case of a (dynamic) Bayesian network?
The remark is not referring to continuous-time--continuous-observation Kalman-Bucy filters, but to discrete-time Kalman filters. The confusion seems to be only due to the OP not knowing about the discrete-time version (which in my experience is most commonly meant when 'Kalman filter' is mentioned). See, for example, t...
Why is the Kalman Filter a specific case of a (dynamic) Bayesian network?
The remark is not referring to continuous-time--continuous-observation Kalman-Bucy filters, but to discrete-time Kalman filters. The confusion seems to be only due to the OP not knowing about the disc
Why is the Kalman Filter a specific case of a (dynamic) Bayesian network? The remark is not referring to continuous-time--continuous-observation Kalman-Bucy filters, but to discrete-time Kalman filters. The confusion seems to be only due to the OP not knowing about the discrete-time version (which in my experience is m...
Why is the Kalman Filter a specific case of a (dynamic) Bayesian network? The remark is not referring to continuous-time--continuous-observation Kalman-Bucy filters, but to discrete-time Kalman filters. The confusion seems to be only due to the OP not knowing about the disc
35,380
the turning point test
This assumes the distribution of $y_i$ is absolutely continuous. For sequence of length $n$, let $X_i$ denote the indicator random variable that there is a turning point on $i,i+1,i+2$. Then the number of turning points is: $T_n=X_1+\cdots+X_{n-2}$. Focus on $X_1$. The chance of a turning point on $1,2,3$ is equivalen...
the turning point test
This assumes the distribution of $y_i$ is absolutely continuous. For sequence of length $n$, let $X_i$ denote the indicator random variable that there is a turning point on $i,i+1,i+2$. Then the numb
the turning point test This assumes the distribution of $y_i$ is absolutely continuous. For sequence of length $n$, let $X_i$ denote the indicator random variable that there is a turning point on $i,i+1,i+2$. Then the number of turning points is: $T_n=X_1+\cdots+X_{n-2}$. Focus on $X_1$. The chance of a turning point ...
the turning point test This assumes the distribution of $y_i$ is absolutely continuous. For sequence of length $n$, let $X_i$ denote the indicator random variable that there is a turning point on $i,i+1,i+2$. Then the numb
35,381
the turning point test
I think the solution provided by Alex is incorrect. I cheat a bit and used R help. First we will write a program to evaluate the different probabilites of the sequences. > findMifne <- function(x) { + d.x <- sign(diff(x)) + n <- length(d.x) + temp.vec <- rep(F, n + 1) + for (i in 2:n) { + temp.vec[i] <-...
the turning point test
I think the solution provided by Alex is incorrect. I cheat a bit and used R help. First we will write a program to evaluate the different probabilites of the sequences. > findMifne <- function(x) {
the turning point test I think the solution provided by Alex is incorrect. I cheat a bit and used R help. First we will write a program to evaluate the different probabilites of the sequences. > findMifne <- function(x) { + d.x <- sign(diff(x)) + n <- length(d.x) + temp.vec <- rep(F, n + 1) + for (i in 2:n) ...
the turning point test I think the solution provided by Alex is incorrect. I cheat a bit and used R help. First we will write a program to evaluate the different probabilites of the sequences. > findMifne <- function(x) {
35,382
When does Least Square Regression (LSQ) line equal to Least Absolute Deviation (LAD) line?
Some hints to help you gain some insight Make up or generate some data consistent with the conditions in the question. Try $x_1=0, y_1=0$ and $x_2..x_{10}=1$ (choosing some values for $y_i$, $i=2,...,10$). Where do the lines pass relative to the first point? Now start as above but try placing $y_i$, $i=2,...,10$ at ...
When does Least Square Regression (LSQ) line equal to Least Absolute Deviation (LAD) line?
Some hints to help you gain some insight Make up or generate some data consistent with the conditions in the question. Try $x_1=0, y_1=0$ and $x_2..x_{10}=1$ (choosing some values for $y_i$, $i=2,...
When does Least Square Regression (LSQ) line equal to Least Absolute Deviation (LAD) line? Some hints to help you gain some insight Make up or generate some data consistent with the conditions in the question. Try $x_1=0, y_1=0$ and $x_2..x_{10}=1$ (choosing some values for $y_i$, $i=2,...,10$). Where do the lines pas...
When does Least Square Regression (LSQ) line equal to Least Absolute Deviation (LAD) line? Some hints to help you gain some insight Make up or generate some data consistent with the conditions in the question. Try $x_1=0, y_1=0$ and $x_2..x_{10}=1$ (choosing some values for $y_i$, $i=2,...
35,383
What is the purpose of a neural network activation function?
Is it correct to say that the non-linear activation function's main purpose is to allow the neural network's decision boundary to be non-linear? Yes. Neural networks compose several functions in layers: the output of a previous layer is the input to the next layer. If you compose linear functions, these functions are ...
What is the purpose of a neural network activation function?
Is it correct to say that the non-linear activation function's main purpose is to allow the neural network's decision boundary to be non-linear? Yes. Neural networks compose several functions in laye
What is the purpose of a neural network activation function? Is it correct to say that the non-linear activation function's main purpose is to allow the neural network's decision boundary to be non-linear? Yes. Neural networks compose several functions in layers: the output of a previous layer is the input to the next...
What is the purpose of a neural network activation function? Is it correct to say that the non-linear activation function's main purpose is to allow the neural network's decision boundary to be non-linear? Yes. Neural networks compose several functions in laye
35,384
What is the purpose of a neural network activation function?
Without activation function many layers would be equivalent to a single layer, as each layer (without an activation function) can be represented by a matrix and a product of many matrices is still a matrix: $$ M = M_1 M_2 \cdots M_n$$
What is the purpose of a neural network activation function?
Without activation function many layers would be equivalent to a single layer, as each layer (without an activation function) can be represented by a matrix and a product of many matrices is still a m
What is the purpose of a neural network activation function? Without activation function many layers would be equivalent to a single layer, as each layer (without an activation function) can be represented by a matrix and a product of many matrices is still a matrix: $$ M = M_1 M_2 \cdots M_n$$
What is the purpose of a neural network activation function? Without activation function many layers would be equivalent to a single layer, as each layer (without an activation function) can be represented by a matrix and a product of many matrices is still a m
35,385
What is the purpose of a neural network activation function?
Role of activation function in neural network: Before moving towards activation function one must have the basic understanding of neurons in the neural network. So what does an artificial neuron do? Simply put, it calculates a weighted sum of its input, adds a bias and then decides whether it should be activated or not...
What is the purpose of a neural network activation function?
Role of activation function in neural network: Before moving towards activation function one must have the basic understanding of neurons in the neural network. So what does an artificial neuron do? S
What is the purpose of a neural network activation function? Role of activation function in neural network: Before moving towards activation function one must have the basic understanding of neurons in the neural network. So what does an artificial neuron do? Simply put, it calculates a weighted sum of its input, adds ...
What is the purpose of a neural network activation function? Role of activation function in neural network: Before moving towards activation function one must have the basic understanding of neurons in the neural network. So what does an artificial neuron do? S
35,386
What is the purpose of a neural network activation function?
A non-linear activation function and a 2-layer Neural Network can approximate any function. That is why we need to introduce non-linearity, cause we can better approximate.
What is the purpose of a neural network activation function?
A non-linear activation function and a 2-layer Neural Network can approximate any function. That is why we need to introduce non-linearity, cause we can better approximate.
What is the purpose of a neural network activation function? A non-linear activation function and a 2-layer Neural Network can approximate any function. That is why we need to introduce non-linearity, cause we can better approximate.
What is the purpose of a neural network activation function? A non-linear activation function and a 2-layer Neural Network can approximate any function. That is why we need to introduce non-linearity, cause we can better approximate.
35,387
What is the purpose of a neural network activation function?
Let me try to answer this without giving any equations. Q) What is the purpose of a neural network having a non-linear activation function? It is not necessary to add non-linear activation function to a neural net if the situation being modelled is linear. However in reality, complicated relationships cannot be repres...
What is the purpose of a neural network activation function?
Let me try to answer this without giving any equations. Q) What is the purpose of a neural network having a non-linear activation function? It is not necessary to add non-linear activation function to
What is the purpose of a neural network activation function? Let me try to answer this without giving any equations. Q) What is the purpose of a neural network having a non-linear activation function? It is not necessary to add non-linear activation function to a neural net if the situation being modelled is linear. Ho...
What is the purpose of a neural network activation function? Let me try to answer this without giving any equations. Q) What is the purpose of a neural network having a non-linear activation function? It is not necessary to add non-linear activation function to
35,388
Truncated normal distribution over a union of intervals
What you are describing is not truncated normal distribution per se, but its probability density function and cumulative distribution functions can be easily calculated the same way as in general we deal with truncated distributions, so you need to divide them by the leftover area under the curve i.e. by $$\int_{ a < x...
Truncated normal distribution over a union of intervals
What you are describing is not truncated normal distribution per se, but its probability density function and cumulative distribution functions can be easily calculated the same way as in general we d
Truncated normal distribution over a union of intervals What you are describing is not truncated normal distribution per se, but its probability density function and cumulative distribution functions can be easily calculated the same way as in general we deal with truncated distributions, so you need to divide them by ...
Truncated normal distribution over a union of intervals What you are describing is not truncated normal distribution per se, but its probability density function and cumulative distribution functions can be easily calculated the same way as in general we d
35,389
How to use time dependent covariates with cox regression in R
Its hard without seeing your data, so I'll try making it generic. First of all, the two main ways that a data frame should look like for the use in the survival package: The bare-bones ID - a unique variable to identify each unit of analysis (e.g., patient, country, organization) Event - a binary variable to indicate...
How to use time dependent covariates with cox regression in R
Its hard without seeing your data, so I'll try making it generic. First of all, the two main ways that a data frame should look like for the use in the survival package: The bare-bones ID - a unique
How to use time dependent covariates with cox regression in R Its hard without seeing your data, so I'll try making it generic. First of all, the two main ways that a data frame should look like for the use in the survival package: The bare-bones ID - a unique variable to identify each unit of analysis (e.g., patient,...
How to use time dependent covariates with cox regression in R Its hard without seeing your data, so I'll try making it generic. First of all, the two main ways that a data frame should look like for the use in the survival package: The bare-bones ID - a unique
35,390
In a mixed effects model, how do you determine when the slope and intercept should be independent?
I'm just responding in case this might be useful for anyone else. OPEN QUESTION Turns out, I still have not found a clear resource that distinguishes between these two options in a theoretical manner - i.e. distinguishes between them not as an optimization but as being different model structures that are best suited f...
In a mixed effects model, how do you determine when the slope and intercept should be independent?
I'm just responding in case this might be useful for anyone else. OPEN QUESTION Turns out, I still have not found a clear resource that distinguishes between these two options in a theoretical manner
In a mixed effects model, how do you determine when the slope and intercept should be independent? I'm just responding in case this might be useful for anyone else. OPEN QUESTION Turns out, I still have not found a clear resource that distinguishes between these two options in a theoretical manner - i.e. distinguishes...
In a mixed effects model, how do you determine when the slope and intercept should be independent? I'm just responding in case this might be useful for anyone else. OPEN QUESTION Turns out, I still have not found a clear resource that distinguishes between these two options in a theoretical manner
35,391
In a mixed effects model, how do you determine when the slope and intercept should be independent?
The following is a rule of thumb. I think the default choice should be a model where the slope and the intercept covary ((1 + A | B)). Unless you have a theoretical or technical reason to exclude the possibility of covariance, it just makes in most cases a lot of sense to at least allow for the possibility. I wouldn't...
In a mixed effects model, how do you determine when the slope and intercept should be independent?
The following is a rule of thumb. I think the default choice should be a model where the slope and the intercept covary ((1 + A | B)). Unless you have a theoretical or technical reason to exclude the
In a mixed effects model, how do you determine when the slope and intercept should be independent? The following is a rule of thumb. I think the default choice should be a model where the slope and the intercept covary ((1 + A | B)). Unless you have a theoretical or technical reason to exclude the possibility of covar...
In a mixed effects model, how do you determine when the slope and intercept should be independent? The following is a rule of thumb. I think the default choice should be a model where the slope and the intercept covary ((1 + A | B)). Unless you have a theoretical or technical reason to exclude the
35,392
In a mixed effects model, how do you determine when the slope and intercept should be independent?
I think I may have an additional piece of information that can be used to help you. In the world of econometrics and more precisely, in the world of panel data estimation (the way econometritians call longitudinal/repeated measures data). The test that I present to you is the Hausman specification test. The theoretical...
In a mixed effects model, how do you determine when the slope and intercept should be independent?
I think I may have an additional piece of information that can be used to help you. In the world of econometrics and more precisely, in the world of panel data estimation (the way econometritians call
In a mixed effects model, how do you determine when the slope and intercept should be independent? I think I may have an additional piece of information that can be used to help you. In the world of econometrics and more precisely, in the world of panel data estimation (the way econometritians call longitudinal/repeate...
In a mixed effects model, how do you determine when the slope and intercept should be independent? I think I may have an additional piece of information that can be used to help you. In the world of econometrics and more precisely, in the world of panel data estimation (the way econometritians call
35,393
Calculating the adjusted rand index?
Basically: nij is across the diagonal (i.e., when i = j) ai is the row sums bj is the column sums Using wikipedia, we have the formula: $ARI = \frac{ \sum_{ij} \binom{n_{ij}}{2} - [\sum_i \binom{a_i}{2} \sum_j \binom{b_j}{2}] / \binom{n}{2} }{ \frac{1}{2} [\sum_i \binom{a_i}{2} + \sum_j \binom{b_j}{2}] - [\sum_i \bin...
Calculating the adjusted rand index?
Basically: nij is across the diagonal (i.e., when i = j) ai is the row sums bj is the column sums Using wikipedia, we have the formula: $ARI = \frac{ \sum_{ij} \binom{n_{ij}}{2} - [\sum_i \binom{a_i
Calculating the adjusted rand index? Basically: nij is across the diagonal (i.e., when i = j) ai is the row sums bj is the column sums Using wikipedia, we have the formula: $ARI = \frac{ \sum_{ij} \binom{n_{ij}}{2} - [\sum_i \binom{a_i}{2} \sum_j \binom{b_j}{2}] / \binom{n}{2} }{ \frac{1}{2} [\sum_i \binom{a_i}{2} + ...
Calculating the adjusted rand index? Basically: nij is across the diagonal (i.e., when i = j) ai is the row sums bj is the column sums Using wikipedia, we have the formula: $ARI = \frac{ \sum_{ij} \binom{n_{ij}}{2} - [\sum_i \binom{a_i
35,394
Calculating the adjusted rand index?
The answer by dmartin is nice to get some insight. To actually have a few lines of code (in octave/matlab): function [RI ARI] = adjustedrandindex(A) N=sum(sum(A)); ...
Calculating the adjusted rand index?
The answer by dmartin is nice to get some insight. To actually have a few lines of code (in octave/matlab): function [RI ARI] = adjustedrandindex(A)
Calculating the adjusted rand index? The answer by dmartin is nice to get some insight. To actually have a few lines of code (in octave/matlab): function [RI ARI] = adjustedrandindex(A) N=sum(sum(A)); ...
Calculating the adjusted rand index? The answer by dmartin is nice to get some insight. To actually have a few lines of code (in octave/matlab): function [RI ARI] = adjustedrandindex(A)
35,395
Curse of dimensionality: why is it a problem that most points are near the edge?
The problem is that "the edge" is not just one place in $d$-dimensional space. "The edge" is a big part of your volume, and the volume of "the edge" grows very quickly. Thus, even if more and more training data points lie near "the edge", the density of training data will still decrease very quickly as $d$ increases. A...
Curse of dimensionality: why is it a problem that most points are near the edge?
The problem is that "the edge" is not just one place in $d$-dimensional space. "The edge" is a big part of your volume, and the volume of "the edge" grows very quickly. Thus, even if more and more tra
Curse of dimensionality: why is it a problem that most points are near the edge? The problem is that "the edge" is not just one place in $d$-dimensional space. "The edge" is a big part of your volume, and the volume of "the edge" grows very quickly. Thus, even if more and more training data points lie near "the edge", ...
Curse of dimensionality: why is it a problem that most points are near the edge? The problem is that "the edge" is not just one place in $d$-dimensional space. "The edge" is a big part of your volume, and the volume of "the edge" grows very quickly. Thus, even if more and more tra
35,396
Curse of dimensionality: why is it a problem that most points are near the edge?
And the more training points nearby max's answer touches on the primary point but I just wanted to point out that the above quote was your erroring assumption, give some more intuition about how points all end up on the edge and point out how this causes sparsity issues. The erroring assumption is that the edge is sma...
Curse of dimensionality: why is it a problem that most points are near the edge?
And the more training points nearby max's answer touches on the primary point but I just wanted to point out that the above quote was your erroring assumption, give some more intuition about how poin
Curse of dimensionality: why is it a problem that most points are near the edge? And the more training points nearby max's answer touches on the primary point but I just wanted to point out that the above quote was your erroring assumption, give some more intuition about how points all end up on the edge and point out...
Curse of dimensionality: why is it a problem that most points are near the edge? And the more training points nearby max's answer touches on the primary point but I just wanted to point out that the above quote was your erroring assumption, give some more intuition about how poin
35,397
Weibull Survival Model with Time Varying Covariates in R
The flexurv package can do this: https://cran.r-project.org/web/packages/flexsurv/index.html Just call the flexsurvreg function instead of survreg.
Weibull Survival Model with Time Varying Covariates in R
The flexurv package can do this: https://cran.r-project.org/web/packages/flexsurv/index.html Just call the flexsurvreg function instead of survreg.
Weibull Survival Model with Time Varying Covariates in R The flexurv package can do this: https://cran.r-project.org/web/packages/flexsurv/index.html Just call the flexsurvreg function instead of survreg.
Weibull Survival Model with Time Varying Covariates in R The flexurv package can do this: https://cran.r-project.org/web/packages/flexsurv/index.html Just call the flexsurvreg function instead of survreg.
35,398
Weibull Survival Model with Time Varying Covariates in R
You can do it with Survival package by the following : Srv <- Surv(start, stop, fail, type="interval" ) and then you can use Srv in your model as : output <- survreg(Surv(start, stop, fail) ~ gdppc + [...] + cluster(name), data = mydata, dist="weibull") Hope this can help :)
Weibull Survival Model with Time Varying Covariates in R
You can do it with Survival package by the following : Srv <- Surv(start, stop, fail, type="interval" ) and then you can use Srv in your model as : output <- survreg(Surv(start, stop, fail) ~ gdppc +
Weibull Survival Model with Time Varying Covariates in R You can do it with Survival package by the following : Srv <- Surv(start, stop, fail, type="interval" ) and then you can use Srv in your model as : output <- survreg(Surv(start, stop, fail) ~ gdppc + [...] + cluster(name), data = mydata, dist="weibull") Hope this...
Weibull Survival Model with Time Varying Covariates in R You can do it with Survival package by the following : Srv <- Surv(start, stop, fail, type="interval" ) and then you can use Srv in your model as : output <- survreg(Surv(start, stop, fail) ~ gdppc +
35,399
Weibull Survival Model with Time Varying Covariates in R
This can also be achieved with the aftreg command from the eha package. To obtain the same parametrisation normally used by the survreg command from the survival package, and also by the flexsurvreg command from the flexsurv package, the param option must be set to "LifeExp", as explained in the package's documentation...
Weibull Survival Model with Time Varying Covariates in R
This can also be achieved with the aftreg command from the eha package. To obtain the same parametrisation normally used by the survreg command from the survival package, and also by the flexsurvreg c
Weibull Survival Model with Time Varying Covariates in R This can also be achieved with the aftreg command from the eha package. To obtain the same parametrisation normally used by the survreg command from the survival package, and also by the flexsurvreg command from the flexsurv package, the param option must be set ...
Weibull Survival Model with Time Varying Covariates in R This can also be achieved with the aftreg command from the eha package. To obtain the same parametrisation normally used by the survreg command from the survival package, and also by the flexsurvreg c
35,400
Does number of layers in neural network corresponds to degree of the approximation function?
It can be true that more layers/depth can yield more nonlinearity, but I do not think using the analogy of a polynomial's degree is a perfect analogy and it's certainly not mathematical fact. You can look at deep net regression a few different ways: learning a nonlinear function. In this sense, it is very natural to t...
Does number of layers in neural network corresponds to degree of the approximation function?
It can be true that more layers/depth can yield more nonlinearity, but I do not think using the analogy of a polynomial's degree is a perfect analogy and it's certainly not mathematical fact. You can
Does number of layers in neural network corresponds to degree of the approximation function? It can be true that more layers/depth can yield more nonlinearity, but I do not think using the analogy of a polynomial's degree is a perfect analogy and it's certainly not mathematical fact. You can look at deep net regressio...
Does number of layers in neural network corresponds to degree of the approximation function? It can be true that more layers/depth can yield more nonlinearity, but I do not think using the analogy of a polynomial's degree is a perfect analogy and it's certainly not mathematical fact. You can