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
40,901
How do I setup up repeated measures data for analysis with nlme()?
NLME relies on a "univariate" as opposed to "multi-variate" data structure. See the description below, copied from my response to another question here: Data manipulation in R for functional data analysis As to how you would get the data into R and into one of these formats, we'd need to know more about what your inpu...
How do I setup up repeated measures data for analysis with nlme()?
NLME relies on a "univariate" as opposed to "multi-variate" data structure. See the description below, copied from my response to another question here: Data manipulation in R for functional data ana
How do I setup up repeated measures data for analysis with nlme()? NLME relies on a "univariate" as opposed to "multi-variate" data structure. See the description below, copied from my response to another question here: Data manipulation in R for functional data analysis As to how you would get the data into R and int...
How do I setup up repeated measures data for analysis with nlme()? NLME relies on a "univariate" as opposed to "multi-variate" data structure. See the description below, copied from my response to another question here: Data manipulation in R for functional data ana
40,902
Regression analysis and parameter estimates with populations
I like what chl has written. Despite that, I am moved to discuss whether this situation necessarily requires a complicated model. But first, let's begin with responses to some comments. (1) You don't lose any degrees of freedom due to spatial correlation of forest cover. This is an explanatory variable, not the one ...
Regression analysis and parameter estimates with populations
I like what chl has written. Despite that, I am moved to discuss whether this situation necessarily requires a complicated model. But first, let's begin with responses to some comments. (1) You don'
Regression analysis and parameter estimates with populations I like what chl has written. Despite that, I am moved to discuss whether this situation necessarily requires a complicated model. But first, let's begin with responses to some comments. (1) You don't lose any degrees of freedom due to spatial correlation of...
Regression analysis and parameter estimates with populations I like what chl has written. Despite that, I am moved to discuss whether this situation necessarily requires a complicated model. But first, let's begin with responses to some comments. (1) You don'
40,903
Regression analysis and parameter estimates with populations
What you describe seems to refer to a particular case of multilevel modeling, where data are organized into a hierarchical structure; in your case, forests (1st level unit) nested in counties nested in states, but see Under what conditions should one use multilevel/hierarchical analysis?. Now, the "particular" case com...
Regression analysis and parameter estimates with populations
What you describe seems to refer to a particular case of multilevel modeling, where data are organized into a hierarchical structure; in your case, forests (1st level unit) nested in counties nested i
Regression analysis and parameter estimates with populations What you describe seems to refer to a particular case of multilevel modeling, where data are organized into a hierarchical structure; in your case, forests (1st level unit) nested in counties nested in states, but see Under what conditions should one use mult...
Regression analysis and parameter estimates with populations What you describe seems to refer to a particular case of multilevel modeling, where data are organized into a hierarchical structure; in your case, forests (1st level unit) nested in counties nested i
40,904
Regression analysis and parameter estimates with populations
I work in a related area using what is called the Population Approach, in pharmacometrics. Basically you have a sample of individuals from the general population, and a moderate-size sample of observations of each individual, plus demographic covariates for these individuals. To model them, we want to make levels of mo...
Regression analysis and parameter estimates with populations
I work in a related area using what is called the Population Approach, in pharmacometrics. Basically you have a sample of individuals from the general population, and a moderate-size sample of observa
Regression analysis and parameter estimates with populations I work in a related area using what is called the Population Approach, in pharmacometrics. Basically you have a sample of individuals from the general population, and a moderate-size sample of observations of each individual, plus demographic covariates for t...
Regression analysis and parameter estimates with populations I work in a related area using what is called the Population Approach, in pharmacometrics. Basically you have a sample of individuals from the general population, and a moderate-size sample of observa
40,905
Jaynes' Description of Maximum Entropy Distribution
Jaynes' reasoning here is essentially Bayesian, where the probability is a measure of uncertainty of our knowledge about something. This is opposed to frequentist reasoning, which is based on the assumption that one could potentially know the whole population, its parameters, and the underlying probability distribution...
Jaynes' Description of Maximum Entropy Distribution
Jaynes' reasoning here is essentially Bayesian, where the probability is a measure of uncertainty of our knowledge about something. This is opposed to frequentist reasoning, which is based on the assu
Jaynes' Description of Maximum Entropy Distribution Jaynes' reasoning here is essentially Bayesian, where the probability is a measure of uncertainty of our knowledge about something. This is opposed to frequentist reasoning, which is based on the assumption that one could potentially know the whole population, its par...
Jaynes' Description of Maximum Entropy Distribution Jaynes' reasoning here is essentially Bayesian, where the probability is a measure of uncertainty of our knowledge about something. This is opposed to frequentist reasoning, which is based on the assu
40,906
Jaynes' Description of Maximum Entropy Distribution
Jaynes reasons that, given only this information, the most reasonable way to assign these probabilities is to choose the most uncertain probability distribution that satisfies all the requirements (i.e. observations, in this case the sample mean). Now, this is quite arbitrary, but I accept it as an intuitively compelli...
Jaynes' Description of Maximum Entropy Distribution
Jaynes reasons that, given only this information, the most reasonable way to assign these probabilities is to choose the most uncertain probability distribution that satisfies all the requirements (i.
Jaynes' Description of Maximum Entropy Distribution Jaynes reasons that, given only this information, the most reasonable way to assign these probabilities is to choose the most uncertain probability distribution that satisfies all the requirements (i.e. observations, in this case the sample mean). Now, this is quite a...
Jaynes' Description of Maximum Entropy Distribution Jaynes reasons that, given only this information, the most reasonable way to assign these probabilities is to choose the most uncertain probability distribution that satisfies all the requirements (i.
40,907
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)?
The first issue you have here is that your likelihood function does not appear to match the description of your sampling mechanism. You say that you only observe events 1 and 2 happen, but if the sample size $n$ is known then this still fixes the number of times that event 3 happens (since $m_1 + m_2 + m_3 = n$). Tak...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)
The first issue you have here is that your likelihood function does not appear to match the description of your sampling mechanism. You say that you only observe events 1 and 2 happen, but if the sam
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)? The first issue you have here is that your likelihood function does not appear to match the description of your sampling mechanism. You say that you only observe events 1 and 2 happen, but if the sample size $n$ is kn...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB) The first issue you have here is that your likelihood function does not appear to match the description of your sampling mechanism. You say that you only observe events 1 and 2 happen, but if the sam
40,908
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)?
Variance of your MLE estimator should be computed while still considering the results to be random, i.e.: $$ \hat{\theta} = \mathrm{arg} \underset{\theta}{\max}\left[ \frac{1}{2}\sin ^2\theta \right] ^{m_1}\left[ \frac{1}{2}\sin ^2\theta \right] ^{m_2} \left[ \cos ^2\theta \right] ^{m_3} $$ $$ Var(\hat{\theta}) = Var \...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)
Variance of your MLE estimator should be computed while still considering the results to be random, i.e.: $$ \hat{\theta} = \mathrm{arg} \underset{\theta}{\max}\left[ \frac{1}{2}\sin ^2\theta \right]
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)? Variance of your MLE estimator should be computed while still considering the results to be random, i.e.: $$ \hat{\theta} = \mathrm{arg} \underset{\theta}{\max}\left[ \frac{1}{2}\sin ^2\theta \right] ^{m_1}\left[ \frac...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB) Variance of your MLE estimator should be computed while still considering the results to be random, i.e.: $$ \hat{\theta} = \mathrm{arg} \underset{\theta}{\max}\left[ \frac{1}{2}\sin ^2\theta \right]
40,909
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)?
Starting from the definition of the Cramer-Rao Lower bound from here. Suppose $\theta$ is an unknown deterministic parameter which is to be estimated from $n$ independent observations (measurements) of $x$, each from a distribution according to some probability density function $f(x;\theta )$. The variance of any unb...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)
Starting from the definition of the Cramer-Rao Lower bound from here. Suppose $\theta$ is an unknown deterministic parameter which is to be estimated from $n$ independent observations (measurements)
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)? Starting from the definition of the Cramer-Rao Lower bound from here. Suppose $\theta$ is an unknown deterministic parameter which is to be estimated from $n$ independent observations (measurements) of $x$, each from...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB) Starting from the definition of the Cramer-Rao Lower bound from here. Suppose $\theta$ is an unknown deterministic parameter which is to be estimated from $n$ independent observations (measurements)
40,910
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)?
TLDR This factor 1/4 is a correct result. The asymptotic variance of the estimator $\sin^2 \theta$ is equal to the factor 1/4n. (and for smaller sample sizes you need to use the bound that is based on a non-zero bias) R-code demonstration set.seed(1) n = 200 p = rbinom(10^6,n,0.25)/n t = asin(sqrt(p)) var(t)*n ### 0.25...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)
TLDR This factor 1/4 is a correct result. The asymptotic variance of the estimator $\sin^2 \theta$ is equal to the factor 1/4n. (and for smaller sample sizes you need to use the bound that is based on
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB)? TLDR This factor 1/4 is a correct result. The asymptotic variance of the estimator $\sin^2 \theta$ is equal to the factor 1/4n. (and for smaller sample sizes you need to use the bound that is based on a non-zero bias) ...
Why the variance of Maximum Likelihood Estimator(MLE) will be less than Cramer-Rao Lower Bound(CRLB) TLDR This factor 1/4 is a correct result. The asymptotic variance of the estimator $\sin^2 \theta$ is equal to the factor 1/4n. (and for smaller sample sizes you need to use the bound that is based on
40,911
General form of the distribution of distances to a fixed point in rectangle
Let the rectangle have dimensions $w \le h.$ Place two of its vertices at $(0,0)$ and $(w,h)$ in a Cartesian coordinate system and let the central point be at $(x,y)$ with $0\le x \le w$ and $0\le y \le h.$ The vertical line through $x$ and the horizontal line through $y$ divide this rectangle into subrectangles of a...
General form of the distribution of distances to a fixed point in rectangle
Let the rectangle have dimensions $w \le h.$ Place two of its vertices at $(0,0)$ and $(w,h)$ in a Cartesian coordinate system and let the central point be at $(x,y)$ with $0\le x \le w$ and $0\le y
General form of the distribution of distances to a fixed point in rectangle Let the rectangle have dimensions $w \le h.$ Place two of its vertices at $(0,0)$ and $(w,h)$ in a Cartesian coordinate system and let the central point be at $(x,y)$ with $0\le x \le w$ and $0\le y \le h.$ The vertical line through $x$ and t...
General form of the distribution of distances to a fixed point in rectangle Let the rectangle have dimensions $w \le h.$ Place two of its vertices at $(0,0)$ and $(w,h)$ in a Cartesian coordinate system and let the central point be at $(x,y)$ with $0\le x \le w$ and $0\le y
40,912
What happens when DQN gradients become too big?
It's hard to say for sure, since the slide is so sparse, but I think the implication is that squaring a number with absolute value larger than 1 can become very large very quickly, and likewise the gradients can grow very fast. The author's suggestion of Huber loss makes sense as a remedy to this problem, because you c...
What happens when DQN gradients become too big?
It's hard to say for sure, since the slide is so sparse, but I think the implication is that squaring a number with absolute value larger than 1 can become very large very quickly, and likewise the gr
What happens when DQN gradients become too big? It's hard to say for sure, since the slide is so sparse, but I think the implication is that squaring a number with absolute value larger than 1 can become very large very quickly, and likewise the gradients can grow very fast. The author's suggestion of Huber loss makes ...
What happens when DQN gradients become too big? It's hard to say for sure, since the slide is so sparse, but I think the implication is that squaring a number with absolute value larger than 1 can become very large very quickly, and likewise the gr
40,913
Test the hypothesis that the performances of k machine learning models on the same test set is the same
Statistical tests, any of them, work on sets of data, not on a single data (for each of the $k$ ML models). Thus, if you compute any measure on the whole test set (let us call them aggregating measures) be it precision, recall, or IoU, you will get a single number for each of the ML algorithms, and there is no statisti...
Test the hypothesis that the performances of k machine learning models on the same test set is the s
Statistical tests, any of them, work on sets of data, not on a single data (for each of the $k$ ML models). Thus, if you compute any measure on the whole test set (let us call them aggregating measure
Test the hypothesis that the performances of k machine learning models on the same test set is the same Statistical tests, any of them, work on sets of data, not on a single data (for each of the $k$ ML models). Thus, if you compute any measure on the whole test set (let us call them aggregating measures) be it precisi...
Test the hypothesis that the performances of k machine learning models on the same test set is the s Statistical tests, any of them, work on sets of data, not on a single data (for each of the $k$ ML models). Thus, if you compute any measure on the whole test set (let us call them aggregating measure
40,914
Test the hypothesis that the performances of k machine learning models on the same test set is the same
Under the assumption that the $k$ ML algorithm performances are "the same", which I will interpret as "independent and identically distributed", on any given test, they are also exchangeable within the test. We can therefore construct a permutation test that preserves potential differences between the tests. Permutat...
Test the hypothesis that the performances of k machine learning models on the same test set is the s
Under the assumption that the $k$ ML algorithm performances are "the same", which I will interpret as "independent and identically distributed", on any given test, they are also exchangeable within th
Test the hypothesis that the performances of k machine learning models on the same test set is the same Under the assumption that the $k$ ML algorithm performances are "the same", which I will interpret as "independent and identically distributed", on any given test, they are also exchangeable within the test. We can ...
Test the hypothesis that the performances of k machine learning models on the same test set is the s Under the assumption that the $k$ ML algorithm performances are "the same", which I will interpret as "independent and identically distributed", on any given test, they are also exchangeable within th
40,915
Test the hypothesis that the performances of k machine learning models on the same test set is the same
Have a look at the Diebold-Mariano test (DM-Test): here, the forecast accuracy of 2 (arbitrary) models can be compared using their losses, e.g. MSE or RMSE. Let $L_{A,t}$ be the loss of model A at time t. If the difference between the losses $\Delta_{A,B,t}=L_{A,t}-L_{B,t}$ is significantly greater than zero then the f...
Test the hypothesis that the performances of k machine learning models on the same test set is the s
Have a look at the Diebold-Mariano test (DM-Test): here, the forecast accuracy of 2 (arbitrary) models can be compared using their losses, e.g. MSE or RMSE. Let $L_{A,t}$ be the loss of model A at tim
Test the hypothesis that the performances of k machine learning models on the same test set is the same Have a look at the Diebold-Mariano test (DM-Test): here, the forecast accuracy of 2 (arbitrary) models can be compared using their losses, e.g. MSE or RMSE. Let $L_{A,t}$ be the loss of model A at time t. If the diff...
Test the hypothesis that the performances of k machine learning models on the same test set is the s Have a look at the Diebold-Mariano test (DM-Test): here, the forecast accuracy of 2 (arbitrary) models can be compared using their losses, e.g. MSE or RMSE. Let $L_{A,t}$ be the loss of model A at tim
40,916
Do the principal values of higher moments exist for the Cauchy distribution?
The odd integral moments have principal values of zero while the even integral moments have infinite principal values. By definition, the Cauchy Principal Value [w.r.t. infinity] of an integral over the real line is $$\operatorname{pv}\int_\mathbb{R} g(x)\,\mathrm{d}x = \lim_{R\to\infty} \int_{-R}^R g(x)\,\mathrm{dx}....
Do the principal values of higher moments exist for the Cauchy distribution?
The odd integral moments have principal values of zero while the even integral moments have infinite principal values. By definition, the Cauchy Principal Value [w.r.t. infinity] of an integral over
Do the principal values of higher moments exist for the Cauchy distribution? The odd integral moments have principal values of zero while the even integral moments have infinite principal values. By definition, the Cauchy Principal Value [w.r.t. infinity] of an integral over the real line is $$\operatorname{pv}\int_\m...
Do the principal values of higher moments exist for the Cauchy distribution? The odd integral moments have principal values of zero while the even integral moments have infinite principal values. By definition, the Cauchy Principal Value [w.r.t. infinity] of an integral over
40,917
Are all statistical models also causal models?
But is $Y = aX + cZ + e$ (as a regression model, not a math equation) also a causal model (albeit a "wrong" causal model)? If I manipulate $X$ it tells me what happens to $Y$. Doesn't it correspond to the causal graph $X \rightarrow Y, Z \rightarrow Y$ ? It may correspond to the causal graph $X \rightarrow Y, Z \right...
Are all statistical models also causal models?
But is $Y = aX + cZ + e$ (as a regression model, not a math equation) also a causal model (albeit a "wrong" causal model)? If I manipulate $X$ it tells me what happens to $Y$. Doesn't it correspond to
Are all statistical models also causal models? But is $Y = aX + cZ + e$ (as a regression model, not a math equation) also a causal model (albeit a "wrong" causal model)? If I manipulate $X$ it tells me what happens to $Y$. Doesn't it correspond to the causal graph $X \rightarrow Y, Z \rightarrow Y$ ? It may correspond...
Are all statistical models also causal models? But is $Y = aX + cZ + e$ (as a regression model, not a math equation) also a causal model (albeit a "wrong" causal model)? If I manipulate $X$ it tells me what happens to $Y$. Doesn't it correspond to
40,918
Are all statistical models also causal models?
edit: I think my causal graph analysis in this simple example is wrong, but hopefully the broader point is still clear To the extent that you correctly identified that M is a mediator and Z is a confounder, your analysis is correct. If this is the right causal model (based either on background knowledge or causal disc...
Are all statistical models also causal models?
edit: I think my causal graph analysis in this simple example is wrong, but hopefully the broader point is still clear To the extent that you correctly identified that M is a mediator and Z is a conf
Are all statistical models also causal models? edit: I think my causal graph analysis in this simple example is wrong, but hopefully the broader point is still clear To the extent that you correctly identified that M is a mediator and Z is a confounder, your analysis is correct. If this is the right causal model (base...
Are all statistical models also causal models? edit: I think my causal graph analysis in this simple example is wrong, but hopefully the broader point is still clear To the extent that you correctly identified that M is a mediator and Z is a conf
40,919
Are all statistical models also causal models?
Are all statistical models also causal models? No, they aren't. So the point between Pearl's causal graphs and rules for manipulating causal graphs appears to be to turn a causal graph into a statistical model (e.g. a linear regression). This statement, at best, is confusing. The main point of Pearl works is to sepa...
Are all statistical models also causal models?
Are all statistical models also causal models? No, they aren't. So the point between Pearl's causal graphs and rules for manipulating causal graphs appears to be to turn a causal graph into a statis
Are all statistical models also causal models? Are all statistical models also causal models? No, they aren't. So the point between Pearl's causal graphs and rules for manipulating causal graphs appears to be to turn a causal graph into a statistical model (e.g. a linear regression). This statement, at best, is conf...
Are all statistical models also causal models? Are all statistical models also causal models? No, they aren't. So the point between Pearl's causal graphs and rules for manipulating causal graphs appears to be to turn a causal graph into a statis
40,920
Are thresholds for logistic regression models prevalence-specific?
Three intertwined issues need to be disentangled: (1) calibration of a probability model, (2) whether the model should be used to generate a hard probability threshold, and (3) if so, where the threshold should be. Let's take them in reverse order. (3) If you have a well-calibrated probability model and there is to be ...
Are thresholds for logistic regression models prevalence-specific?
Three intertwined issues need to be disentangled: (1) calibration of a probability model, (2) whether the model should be used to generate a hard probability threshold, and (3) if so, where the thresh
Are thresholds for logistic regression models prevalence-specific? Three intertwined issues need to be disentangled: (1) calibration of a probability model, (2) whether the model should be used to generate a hard probability threshold, and (3) if so, where the threshold should be. Let's take them in reverse order. (3) ...
Are thresholds for logistic regression models prevalence-specific? Three intertwined issues need to be disentangled: (1) calibration of a probability model, (2) whether the model should be used to generate a hard probability threshold, and (3) if so, where the thresh
40,921
Are thresholds for logistic regression models prevalence-specific?
Notwithstanding @Frank Harrels's comments, I think it's useful to think about this in terms of the intercept or bias terms in the logistic regression model, rather than in terms of thresholds. I'm not totally confident in this approach, but it should hopefully be useful! Let's imagine you only have one predictor, $x$. ...
Are thresholds for logistic regression models prevalence-specific?
Notwithstanding @Frank Harrels's comments, I think it's useful to think about this in terms of the intercept or bias terms in the logistic regression model, rather than in terms of thresholds. I'm not
Are thresholds for logistic regression models prevalence-specific? Notwithstanding @Frank Harrels's comments, I think it's useful to think about this in terms of the intercept or bias terms in the logistic regression model, rather than in terms of thresholds. I'm not totally confident in this approach, but it should ho...
Are thresholds for logistic regression models prevalence-specific? Notwithstanding @Frank Harrels's comments, I think it's useful to think about this in terms of the intercept or bias terms in the logistic regression model, rather than in terms of thresholds. I'm not
40,922
Are thresholds for logistic regression models prevalence-specific?
In a sense, yes. This is the default with logistic regression. It is not treated as a "problem" to be remedied, but perhaps it should be. "Prevalence" here is taken to mean in-sample prevalence: specifically, if you calculate the fitted probabilities for each patient in a logistic regression sample, and perform an aver...
Are thresholds for logistic regression models prevalence-specific?
In a sense, yes. This is the default with logistic regression. It is not treated as a "problem" to be remedied, but perhaps it should be. "Prevalence" here is taken to mean in-sample prevalence: speci
Are thresholds for logistic regression models prevalence-specific? In a sense, yes. This is the default with logistic regression. It is not treated as a "problem" to be remedied, but perhaps it should be. "Prevalence" here is taken to mean in-sample prevalence: specifically, if you calculate the fitted probabilities fo...
Are thresholds for logistic regression models prevalence-specific? In a sense, yes. This is the default with logistic regression. It is not treated as a "problem" to be remedied, but perhaps it should be. "Prevalence" here is taken to mean in-sample prevalence: speci
40,923
What is the pdf of a normal distribution divided by the square root of a log-normal over n?
We can manipulate $Y$ to help us here. First note we can re-write $Y$ as $$Y = \frac{n^{1/2}Z}{X^{1/2}}$$ and because $Z\sim N(0,1)$ then $n^{1/2}Z \sim N(0, n)$. Now we know $X \sim \log N(a, b)$. By the definition of the log-normal we have $\log(X) \sim N(a, b)$. Using standard log laws we have $\log(X^{1/2}) = \fra...
What is the pdf of a normal distribution divided by the square root of a log-normal over n?
We can manipulate $Y$ to help us here. First note we can re-write $Y$ as $$Y = \frac{n^{1/2}Z}{X^{1/2}}$$ and because $Z\sim N(0,1)$ then $n^{1/2}Z \sim N(0, n)$. Now we know $X \sim \log N(a, b)$. B
What is the pdf of a normal distribution divided by the square root of a log-normal over n? We can manipulate $Y$ to help us here. First note we can re-write $Y$ as $$Y = \frac{n^{1/2}Z}{X^{1/2}}$$ and because $Z\sim N(0,1)$ then $n^{1/2}Z \sim N(0, n)$. Now we know $X \sim \log N(a, b)$. By the definition of the log-...
What is the pdf of a normal distribution divided by the square root of a log-normal over n? We can manipulate $Y$ to help us here. First note we can re-write $Y$ as $$Y = \frac{n^{1/2}Z}{X^{1/2}}$$ and because $Z\sim N(0,1)$ then $n^{1/2}Z \sim N(0, n)$. Now we know $X \sim \log N(a, b)$. B
40,924
Can a sample average be multimodal?
The answer is yes, it is possible for all the sample mean distributions to be multimodal. The idea is to exhibit a distribution of the $X_i$ that has rapidly increasing gaps in its support, so that no matter how many of the $X_i$ you might sum, there eventually will be a gap so large that the sum cannot fill it: that i...
Can a sample average be multimodal?
The answer is yes, it is possible for all the sample mean distributions to be multimodal. The idea is to exhibit a distribution of the $X_i$ that has rapidly increasing gaps in its support, so that no
Can a sample average be multimodal? The answer is yes, it is possible for all the sample mean distributions to be multimodal. The idea is to exhibit a distribution of the $X_i$ that has rapidly increasing gaps in its support, so that no matter how many of the $X_i$ you might sum, there eventually will be a gap so large...
Can a sample average be multimodal? The answer is yes, it is possible for all the sample mean distributions to be multimodal. The idea is to exhibit a distribution of the $X_i$ that has rapidly increasing gaps in its support, so that no
40,925
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model?
The picture below suggests the optimal model (the one minimizing the expected squared prediction error) will have $\text{Variance}=\text{Bias}^2$. Sorry to rain on your parade, but this does not necessarily hold. The picture is misleading. No, that is not an answer to your question, but I would assume this reduces our...
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model?
The picture below suggests the optimal model (the one minimizing the expected squared prediction error) will have $\text{Variance}=\text{Bias}^2$. Sorry to rain on your parade, but this does not nece
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model? The picture below suggests the optimal model (the one minimizing the expected squared prediction error) will have $\text{Variance}=\text{Bias}^2$. Sorry to rain on your parade, but this does not necessarily hold. The picture is misleading. No, that ...
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model? The picture below suggests the optimal model (the one minimizing the expected squared prediction error) will have $\text{Variance}=\text{Bias}^2$. Sorry to rain on your parade, but this does not nece
40,926
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model?
When will $Variance=Bias^2$ hold for the optimal model? I think that some ad hoc example can be built but a general rule cannot exist. First of all is useful to say that the bias-variance tradeoffs (BVT) story matters in prediction only. Read here (What is the relationship between minimizing prediciton error versus pa...
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model?
When will $Variance=Bias^2$ hold for the optimal model? I think that some ad hoc example can be built but a general rule cannot exist. First of all is useful to say that the bias-variance tradeoffs (
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model? When will $Variance=Bias^2$ hold for the optimal model? I think that some ad hoc example can be built but a general rule cannot exist. First of all is useful to say that the bias-variance tradeoffs (BVT) story matters in prediction only. Read here (...
When will $\text{Variance}=\text{Bias}^2$ hold for the optimal model? When will $Variance=Bias^2$ hold for the optimal model? I think that some ad hoc example can be built but a general rule cannot exist. First of all is useful to say that the bias-variance tradeoffs (
40,927
How to find se.fit in R by hand?
You can’t just add up the standard errors. You need to work with the variances and covariances of the coefficient estimates, then take the square root to get back to the standard error scale. The formula for the variance of a weighted sum of correlated variables is the key, as the estimates of the intercept and slope a...
How to find se.fit in R by hand?
You can’t just add up the standard errors. You need to work with the variances and covariances of the coefficient estimates, then take the square root to get back to the standard error scale. The form
How to find se.fit in R by hand? You can’t just add up the standard errors. You need to work with the variances and covariances of the coefficient estimates, then take the square root to get back to the standard error scale. The formula for the variance of a weighted sum of correlated variables is the key, as the estim...
How to find se.fit in R by hand? You can’t just add up the standard errors. You need to work with the variances and covariances of the coefficient estimates, then take the square root to get back to the standard error scale. The form
40,928
Should a Hausman test be used to decide between fixed vs. random effects?
What the the Hausman test is doing is testing whether the results (i.e. the estimated coefficients) from a fixed effects and random effects model are significantly different. (I haven't ever seen people talk about it testing whether whether the fixed and "between" effects are different, although because the random effe...
Should a Hausman test be used to decide between fixed vs. random effects?
What the the Hausman test is doing is testing whether the results (i.e. the estimated coefficients) from a fixed effects and random effects model are significantly different. (I haven't ever seen peop
Should a Hausman test be used to decide between fixed vs. random effects? What the the Hausman test is doing is testing whether the results (i.e. the estimated coefficients) from a fixed effects and random effects model are significantly different. (I haven't ever seen people talk about it testing whether whether the f...
Should a Hausman test be used to decide between fixed vs. random effects? What the the Hausman test is doing is testing whether the results (i.e. the estimated coefficients) from a fixed effects and random effects model are significantly different. (I haven't ever seen peop
40,929
Should a Hausman test be used to decide between fixed vs. random effects?
Let's say the Hausman test favors the fixed effect model. Why might you still be interested in using the random effects model? The random effects or multilevel model allows a degree of flexibility in modeling that is much messier and in some cases impossible to implement in the fixed effect model. Examples include: Ra...
Should a Hausman test be used to decide between fixed vs. random effects?
Let's say the Hausman test favors the fixed effect model. Why might you still be interested in using the random effects model? The random effects or multilevel model allows a degree of flexibility in
Should a Hausman test be used to decide between fixed vs. random effects? Let's say the Hausman test favors the fixed effect model. Why might you still be interested in using the random effects model? The random effects or multilevel model allows a degree of flexibility in modeling that is much messier and in some case...
Should a Hausman test be used to decide between fixed vs. random effects? Let's say the Hausman test favors the fixed effect model. Why might you still be interested in using the random effects model? The random effects or multilevel model allows a degree of flexibility in
40,930
MatchIt output using Coarsened Exact Matching
The effective sample size (ESS) is the size of an unweighted sample carrying approximately the same precision as the weighted sample in question. The formula for the ESS is $$ESS = \frac{(\sum w)^2}{\sum w^2}$$ When the weights are scaled to have an average of 1, the formula can be rewritten as $$ESS = \frac{n}{1+\text...
MatchIt output using Coarsened Exact Matching
The effective sample size (ESS) is the size of an unweighted sample carrying approximately the same precision as the weighted sample in question. The formula for the ESS is $$ESS = \frac{(\sum w)^2}{\
MatchIt output using Coarsened Exact Matching The effective sample size (ESS) is the size of an unweighted sample carrying approximately the same precision as the weighted sample in question. The formula for the ESS is $$ESS = \frac{(\sum w)^2}{\sum w^2}$$ When the weights are scaled to have an average of 1, the formul...
MatchIt output using Coarsened Exact Matching The effective sample size (ESS) is the size of an unweighted sample carrying approximately the same precision as the weighted sample in question. The formula for the ESS is $$ESS = \frac{(\sum w)^2}{\
40,931
MatchIt output using Coarsened Exact Matching
ESS is the Effective Sample Size: #Effective sample size ESS <- function(w) { weights <- weights * s.weights n <- matrix(0, ncol=2, nrow=6, dimnames = list(c("All (ESS)", "All", "Matched (ESS)","Matched", "Unmatched","Discarded"),... The treatment weight of 1 is why both the "unweight...
MatchIt output using Coarsened Exact Matching
ESS is the Effective Sample Size: #Effective sample size ESS <- function(w) { weights <- weights * s.weights n <- matrix(0, ncol=2, nrow=6, dimnames = list(c("All (ESS)", "All",
MatchIt output using Coarsened Exact Matching ESS is the Effective Sample Size: #Effective sample size ESS <- function(w) { weights <- weights * s.weights n <- matrix(0, ncol=2, nrow=6, dimnames = list(c("All (ESS)", "All", "Matched (ESS)","Matched", "Unmatched","Discarded"),... The t...
MatchIt output using Coarsened Exact Matching ESS is the Effective Sample Size: #Effective sample size ESS <- function(w) { weights <- weights * s.weights n <- matrix(0, ncol=2, nrow=6, dimnames = list(c("All (ESS)", "All",
40,932
Factor Levels in Interaction Terms for GLM
First, I would avoid any stepwise procedures. That said: if I include an interaction term between mpg and type, is it appropriate to have an interaction for only certain levels of type and mpg, but not include all levels of type for the interaction. Normally you would just specify the model as carVal ~ mpg * type or...
Factor Levels in Interaction Terms for GLM
First, I would avoid any stepwise procedures. That said: if I include an interaction term between mpg and type, is it appropriate to have an interaction for only certain levels of type and mpg, but n
Factor Levels in Interaction Terms for GLM First, I would avoid any stepwise procedures. That said: if I include an interaction term between mpg and type, is it appropriate to have an interaction for only certain levels of type and mpg, but not include all levels of type for the interaction. Normally you would just s...
Factor Levels in Interaction Terms for GLM First, I would avoid any stepwise procedures. That said: if I include an interaction term between mpg and type, is it appropriate to have an interaction for only certain levels of type and mpg, but n
40,933
Poisson distribution complications with proportions, GLMM
Normality and homoscedasticity were tested by Shapiro-Wilk and Levene test. Note that there is no requirement for the data to be normally distributed, nor homoscedastic. These tests are a waste of your time. If you want to model the raw counts as the outcome then a count model such as Poisson or negative binomial woul...
Poisson distribution complications with proportions, GLMM
Normality and homoscedasticity were tested by Shapiro-Wilk and Levene test. Note that there is no requirement for the data to be normally distributed, nor homoscedastic. These tests are a waste of yo
Poisson distribution complications with proportions, GLMM Normality and homoscedasticity were tested by Shapiro-Wilk and Levene test. Note that there is no requirement for the data to be normally distributed, nor homoscedastic. These tests are a waste of your time. If you want to model the raw counts as the outcome th...
Poisson distribution complications with proportions, GLMM Normality and homoscedasticity were tested by Shapiro-Wilk and Levene test. Note that there is no requirement for the data to be normally distributed, nor homoscedastic. These tests are a waste of yo
40,934
Metropolis-Hastings for linear regression, prior on sigma?
There are a few minor issues with your sampler. First, you should always compute the PDF or PMF on a log scale, as for any non-trivial problem you will likely run into overflow/underflow issues (speaking from experience, this happens very quickly). I've switched these functions to a log scale but it's worth checking th...
Metropolis-Hastings for linear regression, prior on sigma?
There are a few minor issues with your sampler. First, you should always compute the PDF or PMF on a log scale, as for any non-trivial problem you will likely run into overflow/underflow issues (speak
Metropolis-Hastings for linear regression, prior on sigma? There are a few minor issues with your sampler. First, you should always compute the PDF or PMF on a log scale, as for any non-trivial problem you will likely run into overflow/underflow issues (speaking from experience, this happens very quickly). I've switche...
Metropolis-Hastings for linear regression, prior on sigma? There are a few minor issues with your sampler. First, you should always compute the PDF or PMF on a log scale, as for any non-trivial problem you will likely run into overflow/underflow issues (speak
40,935
How well does GAN (generative adversarial network) perform for small samples?
It's true that GANs generally produce good results when trained on a massive amount of data. However, CycleGAN has been around for a while and they produce realistic images when trained only on a few images (the open-sourced datasets used by the authors have about 1000 images on an average). That said, this (very recen...
How well does GAN (generative adversarial network) perform for small samples?
It's true that GANs generally produce good results when trained on a massive amount of data. However, CycleGAN has been around for a while and they produce realistic images when trained only on a few
How well does GAN (generative adversarial network) perform for small samples? It's true that GANs generally produce good results when trained on a massive amount of data. However, CycleGAN has been around for a while and they produce realistic images when trained only on a few images (the open-sourced datasets used by ...
How well does GAN (generative adversarial network) perform for small samples? It's true that GANs generally produce good results when trained on a massive amount of data. However, CycleGAN has been around for a while and they produce realistic images when trained only on a few
40,936
Probability of having a disease - Bayes' Theorem problem
In order to find the posterior probability, you need two updates on the prior probability of any citizen having this disorder ($3\%$). In general, $P(T+| D) \cdot P(D) = P(D | T+) \cdot P(T+)$, where $D$ means "the citizen has the disorder" and $T+$ means "the citizen tests positive". In this case, $P(D)=3\%$ and $P(T+...
Probability of having a disease - Bayes' Theorem problem
In order to find the posterior probability, you need two updates on the prior probability of any citizen having this disorder ($3\%$). In general, $P(T+| D) \cdot P(D) = P(D | T+) \cdot P(T+)$, where
Probability of having a disease - Bayes' Theorem problem In order to find the posterior probability, you need two updates on the prior probability of any citizen having this disorder ($3\%$). In general, $P(T+| D) \cdot P(D) = P(D | T+) \cdot P(T+)$, where $D$ means "the citizen has the disorder" and $T+$ means "the ci...
Probability of having a disease - Bayes' Theorem problem In order to find the posterior probability, you need two updates on the prior probability of any citizen having this disorder ($3\%$). In general, $P(T+| D) \cdot P(D) = P(D | T+) \cdot P(T+)$, where
40,937
Probability of having a disease - Bayes' Theorem problem
Assume the second test is independent of the first test (this means that the second test result is not affected by the first test). The probability that a person who has the disorder gets one + and one - testing results is 2 x 0.03 x 0.97 = 0.0582, while the probability a healthy person gets one + and one - testing res...
Probability of having a disease - Bayes' Theorem problem
Assume the second test is independent of the first test (this means that the second test result is not affected by the first test). The probability that a person who has the disorder gets one + and on
Probability of having a disease - Bayes' Theorem problem Assume the second test is independent of the first test (this means that the second test result is not affected by the first test). The probability that a person who has the disorder gets one + and one - testing results is 2 x 0.03 x 0.97 = 0.0582, while the prob...
Probability of having a disease - Bayes' Theorem problem Assume the second test is independent of the first test (this means that the second test result is not affected by the first test). The probability that a person who has the disorder gets one + and on
40,938
What I should do if no distribution fits my dataset?
If you have 26K data, any test on a given distribution will fail. Because for that much data, the testing can detect tiny difference and report it is not coming from that distribution. I would strongly recommend you to read these posts Are large data sets inappropriate for hypothesis testing? Is normality testing 'ess...
What I should do if no distribution fits my dataset?
If you have 26K data, any test on a given distribution will fail. Because for that much data, the testing can detect tiny difference and report it is not coming from that distribution. I would strong
What I should do if no distribution fits my dataset? If you have 26K data, any test on a given distribution will fail. Because for that much data, the testing can detect tiny difference and report it is not coming from that distribution. I would strongly recommend you to read these posts Are large data sets inappropri...
What I should do if no distribution fits my dataset? If you have 26K data, any test on a given distribution will fail. Because for that much data, the testing can detect tiny difference and report it is not coming from that distribution. I would strong
40,939
What I should do if no distribution fits my dataset?
You could use Mathematica's FindDistribution command, but the person above who said that with so much data you are unlikely to see any test report that the data is Normal was absolutely correct. However, FindDistribution almost certainly will return one or more (mixture) distributions that fit fairly well. I had a sim...
What I should do if no distribution fits my dataset?
You could use Mathematica's FindDistribution command, but the person above who said that with so much data you are unlikely to see any test report that the data is Normal was absolutely correct. Howe
What I should do if no distribution fits my dataset? You could use Mathematica's FindDistribution command, but the person above who said that with so much data you are unlikely to see any test report that the data is Normal was absolutely correct. However, FindDistribution almost certainly will return one or more (mix...
What I should do if no distribution fits my dataset? You could use Mathematica's FindDistribution command, but the person above who said that with so much data you are unlikely to see any test report that the data is Normal was absolutely correct. Howe
40,940
What I should do if no distribution fits my dataset?
You got just Two options here: 1.Create a database which fits a distribution.! 2.divide your database (hope it will fit) and run them concurrently and merge later as per your requirement
What I should do if no distribution fits my dataset?
You got just Two options here: 1.Create a database which fits a distribution.! 2.divide your database (hope it will fit) and run them concurrently and merge later as per your requirement
What I should do if no distribution fits my dataset? You got just Two options here: 1.Create a database which fits a distribution.! 2.divide your database (hope it will fit) and run them concurrently and merge later as per your requirement
What I should do if no distribution fits my dataset? You got just Two options here: 1.Create a database which fits a distribution.! 2.divide your database (hope it will fit) and run them concurrently and merge later as per your requirement
40,941
Should I normalize all data prior feeding the neural network models?
Yes, normalisation/scaling is typically recommended and sometimes very important. Especially for neural networks, normalisation can be very crucial because when you input unnormalised inputs to activation functions, you can get stuck in a very flat region in the domain and may not learn at all. Or worse, you can end up...
Should I normalize all data prior feeding the neural network models?
Yes, normalisation/scaling is typically recommended and sometimes very important. Especially for neural networks, normalisation can be very crucial because when you input unnormalised inputs to activa
Should I normalize all data prior feeding the neural network models? Yes, normalisation/scaling is typically recommended and sometimes very important. Especially for neural networks, normalisation can be very crucial because when you input unnormalised inputs to activation functions, you can get stuck in a very flat re...
Should I normalize all data prior feeding the neural network models? Yes, normalisation/scaling is typically recommended and sometimes very important. Especially for neural networks, normalisation can be very crucial because when you input unnormalised inputs to activa
40,942
Should I normalize all data prior feeding the neural network models?
The mention of Tensorflow in the question is a red herring -- the reasons that scaling is beneficial are not unique to Tensorflow, but instead are common to all methods that update model parameters using gradient descent. The reason we scale data is to improve gradient descent dynamics, and backpropagation using Tensor...
Should I normalize all data prior feeding the neural network models?
The mention of Tensorflow in the question is a red herring -- the reasons that scaling is beneficial are not unique to Tensorflow, but instead are common to all methods that update model parameters us
Should I normalize all data prior feeding the neural network models? The mention of Tensorflow in the question is a red herring -- the reasons that scaling is beneficial are not unique to Tensorflow, but instead are common to all methods that update model parameters using gradient descent. The reason we scale data is t...
Should I normalize all data prior feeding the neural network models? The mention of Tensorflow in the question is a red herring -- the reasons that scaling is beneficial are not unique to Tensorflow, but instead are common to all methods that update model parameters us
40,943
Detailed description/scripts of mathematical models for Coronavirus
I know answers aren't supposed to be just links, but this is the best I can do. This page links to a number of public covid 19 studies done in R. https://refind.com/znmeb/r-tools-for-coronavirus This one Focuses in-depth on epidemiology models. https://timchurches.github.io/blog/posts/2020-02-18-analysing-covid-19-2019...
Detailed description/scripts of mathematical models for Coronavirus
I know answers aren't supposed to be just links, but this is the best I can do. This page links to a number of public covid 19 studies done in R. https://refind.com/znmeb/r-tools-for-coronavirus This
Detailed description/scripts of mathematical models for Coronavirus I know answers aren't supposed to be just links, but this is the best I can do. This page links to a number of public covid 19 studies done in R. https://refind.com/znmeb/r-tools-for-coronavirus This one Focuses in-depth on epidemiology models. https:/...
Detailed description/scripts of mathematical models for Coronavirus I know answers aren't supposed to be just links, but this is the best I can do. This page links to a number of public covid 19 studies done in R. https://refind.com/znmeb/r-tools-for-coronavirus This
40,944
Detailed description/scripts of mathematical models for Coronavirus
The lancet article The method from the article in the Lancet is very straightforward. They model the spread of the virus by simulating the transmission on the level of each single infected individual. For each infected person they compute (randomly) how many other people they will infect and how long it will take for t...
Detailed description/scripts of mathematical models for Coronavirus
The lancet article The method from the article in the Lancet is very straightforward. They model the spread of the virus by simulating the transmission on the level of each single infected individual.
Detailed description/scripts of mathematical models for Coronavirus The lancet article The method from the article in the Lancet is very straightforward. They model the spread of the virus by simulating the transmission on the level of each single infected individual. For each infected person they compute (randomly) ho...
Detailed description/scripts of mathematical models for Coronavirus The lancet article The method from the article in the Lancet is very straightforward. They model the spread of the virus by simulating the transmission on the level of each single infected individual.
40,945
Dickey-Fuller test significant => series stationary?
You are not misunderstanding anything as far as I can tell. You are presenting a solid story with logical supporting arguments. I could stop here and I think your question would be answered, but let me add some other comments that might be relevant. The (augmented) Dickey-Fuller test is based on an autoregressive model...
Dickey-Fuller test significant => series stationary?
You are not misunderstanding anything as far as I can tell. You are presenting a solid story with logical supporting arguments. I could stop here and I think your question would be answered, but let m
Dickey-Fuller test significant => series stationary? You are not misunderstanding anything as far as I can tell. You are presenting a solid story with logical supporting arguments. I could stop here and I think your question would be answered, but let me add some other comments that might be relevant. The (augmented) D...
Dickey-Fuller test significant => series stationary? You are not misunderstanding anything as far as I can tell. You are presenting a solid story with logical supporting arguments. I could stop here and I think your question would be answered, but let m
40,946
Dickey-Fuller test significant => series stationary?
Another aspect that I recently became aware of (see particularly this thread Is the Dickey Fuller test one-sided or two-sided?) is that the DF-test can be interpreted as one-sided in the sense that it will only reject the unit root null hypothesis with even smaller probability than for a unit root, i.e., $\phi=1$, in c...
Dickey-Fuller test significant => series stationary?
Another aspect that I recently became aware of (see particularly this thread Is the Dickey Fuller test one-sided or two-sided?) is that the DF-test can be interpreted as one-sided in the sense that it
Dickey-Fuller test significant => series stationary? Another aspect that I recently became aware of (see particularly this thread Is the Dickey Fuller test one-sided or two-sided?) is that the DF-test can be interpreted as one-sided in the sense that it will only reject the unit root null hypothesis with even smaller p...
Dickey-Fuller test significant => series stationary? Another aspect that I recently became aware of (see particularly this thread Is the Dickey Fuller test one-sided or two-sided?) is that the DF-test can be interpreted as one-sided in the sense that it
40,947
AIC and its degrees of freedom for linear regression models
Some preliminaries: In LASSO models, the number of non-zero coefficients is an unbiased and consistent estimate for the degrees of freedom of the lasso (see, Zou et al. (2007) "On the "degrees of freedom" of the lasso" for more details). In ridge models, the degrees of freedom are directly related to the singular value...
AIC and its degrees of freedom for linear regression models
Some preliminaries: In LASSO models, the number of non-zero coefficients is an unbiased and consistent estimate for the degrees of freedom of the lasso (see, Zou et al. (2007) "On the "degrees of free
AIC and its degrees of freedom for linear regression models Some preliminaries: In LASSO models, the number of non-zero coefficients is an unbiased and consistent estimate for the degrees of freedom of the lasso (see, Zou et al. (2007) "On the "degrees of freedom" of the lasso" for more details). In ridge models, the d...
AIC and its degrees of freedom for linear regression models Some preliminaries: In LASSO models, the number of non-zero coefficients is an unbiased and consistent estimate for the degrees of freedom of the lasso (see, Zou et al. (2007) "On the "degrees of free
40,948
What is better in Monte Carlo integration: product of means or mean of products?
Both approaches lead to unbiased estimators, hence comparing their variances amounts to comparing their second moments. Without loss of generality, since the distributions of $X$ and $Y$ are arbitrary, we can take both $\varphi_1$ and $\varphi_2$ to be the identity transform. Then $$\mathbb E[(\bar X\bar Y)^2]=\math...
What is better in Monte Carlo integration: product of means or mean of products?
Both approaches lead to unbiased estimators, hence comparing their variances amounts to comparing their second moments. Without loss of generality, since the distributions of $X$ and $Y$ are arbitr
What is better in Monte Carlo integration: product of means or mean of products? Both approaches lead to unbiased estimators, hence comparing their variances amounts to comparing their second moments. Without loss of generality, since the distributions of $X$ and $Y$ are arbitrary, we can take both $\varphi_1$ and $...
What is better in Monte Carlo integration: product of means or mean of products? Both approaches lead to unbiased estimators, hence comparing their variances amounts to comparing their second moments. Without loss of generality, since the distributions of $X$ and $Y$ are arbitr
40,949
What is better in Monte Carlo integration: product of means or mean of products?
Here is a trivial example in which both distributions are standard normal, the first function is $\phi_1(x) = x^\prime = x+2,$ and the second is $\phi_2(y) = y^\prime = y^2.$ So that $$E(X^\prime Y^\prime) = E(X^\prime)E(Y^\prime) = 2.$$ Letting $n = 10^7,$ simulations in R give essentially the same answer for both me...
What is better in Monte Carlo integration: product of means or mean of products?
Here is a trivial example in which both distributions are standard normal, the first function is $\phi_1(x) = x^\prime = x+2,$ and the second is $\phi_2(y) = y^\prime = y^2.$ So that $$E(X^\prime Y^\
What is better in Monte Carlo integration: product of means or mean of products? Here is a trivial example in which both distributions are standard normal, the first function is $\phi_1(x) = x^\prime = x+2,$ and the second is $\phi_2(y) = y^\prime = y^2.$ So that $$E(X^\prime Y^\prime) = E(X^\prime)E(Y^\prime) = 2.$$ ...
What is better in Monte Carlo integration: product of means or mean of products? Here is a trivial example in which both distributions are standard normal, the first function is $\phi_1(x) = x^\prime = x+2,$ and the second is $\phi_2(y) = y^\prime = y^2.$ So that $$E(X^\prime Y^\
40,950
Why do we log transform response ratios?
Imagine you have two treatments A and B, and two studies; the first shows A to be twice as effective and the second shows B to be twice as effective. If your metastudy combines the studies using the log approach you conclude that there is no basis for preferring one over the other because log(2)+log(1/2) = log(2)-log(...
Why do we log transform response ratios?
Imagine you have two treatments A and B, and two studies; the first shows A to be twice as effective and the second shows B to be twice as effective. If your metastudy combines the studies using the
Why do we log transform response ratios? Imagine you have two treatments A and B, and two studies; the first shows A to be twice as effective and the second shows B to be twice as effective. If your metastudy combines the studies using the log approach you conclude that there is no basis for preferring one over the ot...
Why do we log transform response ratios? Imagine you have two treatments A and B, and two studies; the first shows A to be twice as effective and the second shows B to be twice as effective. If your metastudy combines the studies using the
40,951
PR AUC < 50% with ROC AUC > 90% - model good or bad?
You are correct to be suspicious of your results. While indeed it is relatively easy to somewhat simplistically dismiss an AUCROC as "bad" if it is close to $0.50$ (roughly speaking the probability that the model ranks a random positive example more highly than a random negative example), the same rationale is not rele...
PR AUC < 50% with ROC AUC > 90% - model good or bad?
You are correct to be suspicious of your results. While indeed it is relatively easy to somewhat simplistically dismiss an AUCROC as "bad" if it is close to $0.50$ (roughly speaking the probability th
PR AUC < 50% with ROC AUC > 90% - model good or bad? You are correct to be suspicious of your results. While indeed it is relatively easy to somewhat simplistically dismiss an AUCROC as "bad" if it is close to $0.50$ (roughly speaking the probability that the model ranks a random positive example more highly than a ran...
PR AUC < 50% with ROC AUC > 90% - model good or bad? You are correct to be suspicious of your results. While indeed it is relatively easy to somewhat simplistically dismiss an AUCROC as "bad" if it is close to $0.50$ (roughly speaking the probability th
40,952
Model for spatiotemporal and discrete variables
The typical approach to this problem is land-use regression (LUR). LUR hybridize methods for correlated data analysis and spatiotemporal dependence structures. Typically, at each site, there are one or more covariates which can be predicted at each geographic location, like proximity to highway, season, time of day, el...
Model for spatiotemporal and discrete variables
The typical approach to this problem is land-use regression (LUR). LUR hybridize methods for correlated data analysis and spatiotemporal dependence structures. Typically, at each site, there are one o
Model for spatiotemporal and discrete variables The typical approach to this problem is land-use regression (LUR). LUR hybridize methods for correlated data analysis and spatiotemporal dependence structures. Typically, at each site, there are one or more covariates which can be predicted at each geographic location, li...
Model for spatiotemporal and discrete variables The typical approach to this problem is land-use regression (LUR). LUR hybridize methods for correlated data analysis and spatiotemporal dependence structures. Typically, at each site, there are one o
40,953
Sums of normal random variables
Your example suggests that not only are the $n$ variables $X_1,X_2,\ldots,X_n$ independent, they also have the same Normal distribution. Let its parameters be $\mu$ (the mean) and $\sigma^2$ (the variance) and suppose the subset consists of $k$ of these variables. We might as well index the variables so that $X_1,\ld...
Sums of normal random variables
Your example suggests that not only are the $n$ variables $X_1,X_2,\ldots,X_n$ independent, they also have the same Normal distribution. Let its parameters be $\mu$ (the mean) and $\sigma^2$ (the var
Sums of normal random variables Your example suggests that not only are the $n$ variables $X_1,X_2,\ldots,X_n$ independent, they also have the same Normal distribution. Let its parameters be $\mu$ (the mean) and $\sigma^2$ (the variance) and suppose the subset consists of $k$ of these variables. We might as well inde...
Sums of normal random variables Your example suggests that not only are the $n$ variables $X_1,X_2,\ldots,X_n$ independent, they also have the same Normal distribution. Let its parameters be $\mu$ (the mean) and $\sigma^2$ (the var
40,954
Earth Movers Distance and Maximum Mean Discrepency
No, they are not the same. First, let's start with a more general framework to motivate the use of EMD or MMD. Suppose we want to fit a family $(\mu_{\theta})_{\theta}$ of parametric distributions to an empirical one $\nu$, which means we want to solve the following minimisation problem: $$\min_{\theta} \mathcal L(\mu_...
Earth Movers Distance and Maximum Mean Discrepency
No, they are not the same. First, let's start with a more general framework to motivate the use of EMD or MMD. Suppose we want to fit a family $(\mu_{\theta})_{\theta}$ of parametric distributions to
Earth Movers Distance and Maximum Mean Discrepency No, they are not the same. First, let's start with a more general framework to motivate the use of EMD or MMD. Suppose we want to fit a family $(\mu_{\theta})_{\theta}$ of parametric distributions to an empirical one $\nu$, which means we want to solve the following mi...
Earth Movers Distance and Maximum Mean Discrepency No, they are not the same. First, let's start with a more general framework to motivate the use of EMD or MMD. Suppose we want to fit a family $(\mu_{\theta})_{\theta}$ of parametric distributions to
40,955
Numerically/approximately integrating over independent gamma variables
Here is a sketch of a solution. The general strategy is to introduce the scalar sum $\theta_T=\sum\theta_i, $ then marginalize over it, then use it to turn the complicated multidimenional sum over the $\theta_{1..n}$ into a dynamic programming problem with aggressive cutoffs to prune solution space as the dynamic progr...
Numerically/approximately integrating over independent gamma variables
Here is a sketch of a solution. The general strategy is to introduce the scalar sum $\theta_T=\sum\theta_i, $ then marginalize over it, then use it to turn the complicated multidimenional sum over the
Numerically/approximately integrating over independent gamma variables Here is a sketch of a solution. The general strategy is to introduce the scalar sum $\theta_T=\sum\theta_i, $ then marginalize over it, then use it to turn the complicated multidimenional sum over the $\theta_{1..n}$ into a dynamic programming probl...
Numerically/approximately integrating over independent gamma variables Here is a sketch of a solution. The general strategy is to introduce the scalar sum $\theta_T=\sum\theta_i, $ then marginalize over it, then use it to turn the complicated multidimenional sum over the
40,956
Numerically/approximately integrating over independent gamma variables
Your question does not specify the trials parameter in the multinomial distribution, so I'm going to use the standard generic case where you have $n$ trial and $m$ categories. I will let $\tilde{\boldsymbol{\theta}} = (\tilde{\theta}_1,...,\tilde{\theta}_m)$ denote the normalised values $\tilde{\theta}_k = \theta_k / ...
Numerically/approximately integrating over independent gamma variables
Your question does not specify the trials parameter in the multinomial distribution, so I'm going to use the standard generic case where you have $n$ trial and $m$ categories. I will let $\tilde{\bol
Numerically/approximately integrating over independent gamma variables Your question does not specify the trials parameter in the multinomial distribution, so I'm going to use the standard generic case where you have $n$ trial and $m$ categories. I will let $\tilde{\boldsymbol{\theta}} = (\tilde{\theta}_1,...,\tilde{\...
Numerically/approximately integrating over independent gamma variables Your question does not specify the trials parameter in the multinomial distribution, so I'm going to use the standard generic case where you have $n$ trial and $m$ categories. I will let $\tilde{\bol
40,957
Condition on the covariance matrix of a gaussian process needed to have the Markov property
Since the process is Gaussian and zero-mean, formulas for conditional means and variances for the multivariate normal distribution imply that you can write each $\mathbf{X}_t$ as a linear combinations of $\mathbf{X}_{t-1}$, $\mathbf{X}_{t-2}$, ... plus an independent Gaussian error term. But since the process is also ...
Condition on the covariance matrix of a gaussian process needed to have the Markov property
Since the process is Gaussian and zero-mean, formulas for conditional means and variances for the multivariate normal distribution imply that you can write each $\mathbf{X}_t$ as a linear combinations
Condition on the covariance matrix of a gaussian process needed to have the Markov property Since the process is Gaussian and zero-mean, formulas for conditional means and variances for the multivariate normal distribution imply that you can write each $\mathbf{X}_t$ as a linear combinations of $\mathbf{X}_{t-1}$, $\ma...
Condition on the covariance matrix of a gaussian process needed to have the Markov property Since the process is Gaussian and zero-mean, formulas for conditional means and variances for the multivariate normal distribution imply that you can write each $\mathbf{X}_t$ as a linear combinations
40,958
Condition on the covariance matrix of a gaussian process needed to have the Markov property
A sufficient and necessary condition for a Gaussian process to be also Markovian is to have a triangular covariance function, i.e., $$ \mathrm{Cov}[X_{t_{1}}, X_{t_2}] = r_1(\min(t_1, t_2))r_2(\max(t_1, t_2)), $$ for unique (up to multiplicative constants) functions $r_1$ and $r_2$. The first full proof of this equival...
Condition on the covariance matrix of a gaussian process needed to have the Markov property
A sufficient and necessary condition for a Gaussian process to be also Markovian is to have a triangular covariance function, i.e., $$ \mathrm{Cov}[X_{t_{1}}, X_{t_2}] = r_1(\min(t_1, t_2))r_2(\max(t_
Condition on the covariance matrix of a gaussian process needed to have the Markov property A sufficient and necessary condition for a Gaussian process to be also Markovian is to have a triangular covariance function, i.e., $$ \mathrm{Cov}[X_{t_{1}}, X_{t_2}] = r_1(\min(t_1, t_2))r_2(\max(t_1, t_2)), $$ for unique (up ...
Condition on the covariance matrix of a gaussian process needed to have the Markov property A sufficient and necessary condition for a Gaussian process to be also Markovian is to have a triangular covariance function, i.e., $$ \mathrm{Cov}[X_{t_{1}}, X_{t_2}] = r_1(\min(t_1, t_2))r_2(\max(t_
40,959
Train/test split that resembles original dataset and each other
We can always stratify our sample so that the distribution of the underlying variables is similar between the two sets; stratified sampling is quite standard approach to ensure random subgroups have similar statistical properties. If we are using R they are multiple packages offering stratified sampling; e.g. the pack...
Train/test split that resembles original dataset and each other
We can always stratify our sample so that the distribution of the underlying variables is similar between the two sets; stratified sampling is quite standard approach to ensure random subgroups have s
Train/test split that resembles original dataset and each other We can always stratify our sample so that the distribution of the underlying variables is similar between the two sets; stratified sampling is quite standard approach to ensure random subgroups have similar statistical properties. If we are using R they a...
Train/test split that resembles original dataset and each other We can always stratify our sample so that the distribution of the underlying variables is similar between the two sets; stratified sampling is quite standard approach to ensure random subgroups have s
40,960
Train/test split that resembles original dataset and each other
In addition to @usεr11852's answer: if you can do train/test splits that are random but have the desired distribution matching properties, you can repeat/iterate this: this is a resampling technique called set validation and in this is similar to cross validation and out-of-bootstrap validation. For a single continuo...
Train/test split that resembles original dataset and each other
In addition to @usεr11852's answer: if you can do train/test splits that are random but have the desired distribution matching properties, you can repeat/iterate this: this is a resampling technique
Train/test split that resembles original dataset and each other In addition to @usεr11852's answer: if you can do train/test splits that are random but have the desired distribution matching properties, you can repeat/iterate this: this is a resampling technique called set validation and in this is similar to cross va...
Train/test split that resembles original dataset and each other In addition to @usεr11852's answer: if you can do train/test splits that are random but have the desired distribution matching properties, you can repeat/iterate this: this is a resampling technique
40,961
Exclude observations with measurements below limit of detection?
OP asks about values below "limit of detection" in a quantitation (regression) context. Limit of detection, however is a method performance characteristic that refers to qualitative rather than quantitative tasks. This is why my original answer refers to the lower limit of qantitation (quantification) instead. See e....
Exclude observations with measurements below limit of detection?
OP asks about values below "limit of detection" in a quantitation (regression) context. Limit of detection, however is a method performance characteristic that refers to qualitative rather than quant
Exclude observations with measurements below limit of detection? OP asks about values below "limit of detection" in a quantitation (regression) context. Limit of detection, however is a method performance characteristic that refers to qualitative rather than quantitative tasks. This is why my original answer refers to...
Exclude observations with measurements below limit of detection? OP asks about values below "limit of detection" in a quantitation (regression) context. Limit of detection, however is a method performance characteristic that refers to qualitative rather than quant
40,962
Exclude observations with measurements below limit of detection?
Suppose you have an X with a measuring error with a standard deviation of 100. If X is measured to be 1000, then the expected value (assuming a well-calibrated measurement system) is around 1000. But suppose the measured amount is 110. It's possible that the actual value is 310; it's possible to be two standard deviati...
Exclude observations with measurements below limit of detection?
Suppose you have an X with a measuring error with a standard deviation of 100. If X is measured to be 1000, then the expected value (assuming a well-calibrated measurement system) is around 1000. But
Exclude observations with measurements below limit of detection? Suppose you have an X with a measuring error with a standard deviation of 100. If X is measured to be 1000, then the expected value (assuming a well-calibrated measurement system) is around 1000. But suppose the measured amount is 110. It's possible that ...
Exclude observations with measurements below limit of detection? Suppose you have an X with a measuring error with a standard deviation of 100. If X is measured to be 1000, then the expected value (assuming a well-calibrated measurement system) is around 1000. But
40,963
Whether to use factors in R and when ordered factors?
Q1 - yes you are correct Q2 - you would usually choose to fit this as an ordered factor but you have the option of unordered if you wish to parameterise it in some unusual way. Q3 - if the variable is inherently continuous then categorising it loses information and leads to fitting a model which assumes the effect is i...
Whether to use factors in R and when ordered factors?
Q1 - yes you are correct Q2 - you would usually choose to fit this as an ordered factor but you have the option of unordered if you wish to parameterise it in some unusual way. Q3 - if the variable is
Whether to use factors in R and when ordered factors? Q1 - yes you are correct Q2 - you would usually choose to fit this as an ordered factor but you have the option of unordered if you wish to parameterise it in some unusual way. Q3 - if the variable is inherently continuous then categorising it loses information and ...
Whether to use factors in R and when ordered factors? Q1 - yes you are correct Q2 - you would usually choose to fit this as an ordered factor but you have the option of unordered if you wish to parameterise it in some unusual way. Q3 - if the variable is
40,964
Whether to use factors in R and when ordered factors?
Factor variables are used any time you have categorical data, where you wish to fit your model in a way that allows freedom for "effects" of those categories to vary arbitrarily. Ordered factors should be used when you have more than two categories that are ordinal in nature, and unordered factors should be used when ...
Whether to use factors in R and when ordered factors?
Factor variables are used any time you have categorical data, where you wish to fit your model in a way that allows freedom for "effects" of those categories to vary arbitrarily. Ordered factors shou
Whether to use factors in R and when ordered factors? Factor variables are used any time you have categorical data, where you wish to fit your model in a way that allows freedom for "effects" of those categories to vary arbitrarily. Ordered factors should be used when you have more than two categories that are ordinal...
Whether to use factors in R and when ordered factors? Factor variables are used any time you have categorical data, where you wish to fit your model in a way that allows freedom for "effects" of those categories to vary arbitrarily. Ordered factors shou
40,965
Parameter tuning with vs without nested cross-validation
Part of the issue for #1 is terminology. We usually think of the training and test sets as the initial splitting that is done when you have assembled and cleaned your data. Resampling only happens on the training set; the test set is left for a final, unbiased evaluation of the model once you have singled one out as be...
Parameter tuning with vs without nested cross-validation
Part of the issue for #1 is terminology. We usually think of the training and test sets as the initial splitting that is done when you have assembled and cleaned your data. Resampling only happens on
Parameter tuning with vs without nested cross-validation Part of the issue for #1 is terminology. We usually think of the training and test sets as the initial splitting that is done when you have assembled and cleaned your data. Resampling only happens on the training set; the test set is left for a final, unbiased ev...
Parameter tuning with vs without nested cross-validation Part of the issue for #1 is terminology. We usually think of the training and test sets as the initial splitting that is done when you have assembled and cleaned your data. Resampling only happens on
40,966
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes
In short, yes, you can use decision trees for this problem. However there are many other ways to predict the result of multiclass problems. If you want to use decision trees one way of doing it could be to assign a unique integer to each of your classes. All examples of class one will be assigned the value y=1, all th...
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes
In short, yes, you can use decision trees for this problem. However there are many other ways to predict the result of multiclass problems. If you want to use decision trees one way of doing it could
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes In short, yes, you can use decision trees for this problem. However there are many other ways to predict the result of multiclass problems. If you want to use decision trees one way of doing it could be to assign a uni...
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes In short, yes, you can use decision trees for this problem. However there are many other ways to predict the result of multiclass problems. If you want to use decision trees one way of doing it could
40,967
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes
Of course it can. The binarity of the tree is only in the questions it asks. Each node of the tree represents a question with binary answer(unless it's a terminal node -> that one represents a "class") such as: Is the numeric variable $x_1 \geq \alpha_1$ ? Is the categorical variable $x_2 = male$ ? The tree then splits...
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes
Of course it can. The binarity of the tree is only in the questions it asks. Each node of the tree represents a question with binary answer(unless it's a terminal node -> that one represents a "class"
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes Of course it can. The binarity of the tree is only in the questions it asks. Each node of the tree represents a question with binary answer(unless it's a terminal node -> that one represents a "class") such as: Is the n...
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes Of course it can. The binarity of the tree is only in the questions it asks. Each node of the tree represents a question with binary answer(unless it's a terminal node -> that one represents a "class"
40,968
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes
You can directly call the decision tree of sklearn to achieve the task. For each split node, you need to choose a best attribute and a best split point(for continuous attribute), then you need to compute the impurity of left and right child node respectively. The child impurity could be computed based gini index.
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes
You can directly call the decision tree of sklearn to achieve the task. For each split node, you need to choose a best attribute and a best split point(for continuous attribute), then you need to comp
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes You can directly call the decision tree of sklearn to achieve the task. For each split node, you need to choose a best attribute and a best split point(for continuous attribute), then you need to compute the impurity of...
How would you use decision trees to learn to predict a multiclass problem involving 6 unique classes You can directly call the decision tree of sklearn to achieve the task. For each split node, you need to choose a best attribute and a best split point(for continuous attribute), then you need to comp
40,969
Atoms of a sigma algebra
Since $A_i$ are disjoint and their union is the entire space $\mathcal{X}$, clearly you cannot construct a set $B$ such that $B$ is a strict subset of any $A_i$ using complimentation or union. Since no such set can be constructed, it immediately follows that the $\sigma$-algebra generated by them, defined as containin...
Atoms of a sigma algebra
Since $A_i$ are disjoint and their union is the entire space $\mathcal{X}$, clearly you cannot construct a set $B$ such that $B$ is a strict subset of any $A_i$ using complimentation or union. Since
Atoms of a sigma algebra Since $A_i$ are disjoint and their union is the entire space $\mathcal{X}$, clearly you cannot construct a set $B$ such that $B$ is a strict subset of any $A_i$ using complimentation or union. Since no such set can be constructed, it immediately follows that the $\sigma$-algebra generated by t...
Atoms of a sigma algebra Since $A_i$ are disjoint and their union is the entire space $\mathcal{X}$, clearly you cannot construct a set $B$ such that $B$ is a strict subset of any $A_i$ using complimentation or union. Since
40,970
Is there any paper which summarizes the mathematical foundation of deep learning? [closed]
To my knowledge, there is not a single paper that would summarize proven mathematical results. For general overview, I recommend going for textbooks instead, which are more likely to give you a broad background overview. Two prominent examples are: Bishop, Christopher M. Neural networks for pattern recognition. Oxford...
Is there any paper which summarizes the mathematical foundation of deep learning? [closed]
To my knowledge, there is not a single paper that would summarize proven mathematical results. For general overview, I recommend going for textbooks instead, which are more likely to give you a broad
Is there any paper which summarizes the mathematical foundation of deep learning? [closed] To my knowledge, there is not a single paper that would summarize proven mathematical results. For general overview, I recommend going for textbooks instead, which are more likely to give you a broad background overview. Two prom...
Is there any paper which summarizes the mathematical foundation of deep learning? [closed] To my knowledge, there is not a single paper that would summarize proven mathematical results. For general overview, I recommend going for textbooks instead, which are more likely to give you a broad
40,971
Interpreting the standard error from emmeans - R
OK, let us dissect this model. First, the model itself: > getOption("contrasts") unordered ordered "contr.treatment" "contr.poly" > warp.lm <- lm(breaks ~ wool*tension, data = warpbreaks) > summary(warp.lm) ... (some output omitted) ... Coefficients: Estimate Std. Error t value ...
Interpreting the standard error from emmeans - R
OK, let us dissect this model. First, the model itself: > getOption("contrasts") unordered ordered "contr.treatment" "contr.poly" > warp.lm <- lm(breaks ~ wool*tension, data
Interpreting the standard error from emmeans - R OK, let us dissect this model. First, the model itself: > getOption("contrasts") unordered ordered "contr.treatment" "contr.poly" > warp.lm <- lm(breaks ~ wool*tension, data = warpbreaks) > summary(warp.lm) ... (some output omitted) ... Coeffici...
Interpreting the standard error from emmeans - R OK, let us dissect this model. First, the model itself: > getOption("contrasts") unordered ordered "contr.treatment" "contr.poly" > warp.lm <- lm(breaks ~ wool*tension, data
40,972
Random Forest "out of bag" RMSE
I think I got the solution for the OOB RMSE, using keep.inbag=T from randomForest. First you can use predict in order to get the predictions from the model for your response, than simply evaluate using the RMSE formula: Rf_model <- randomForest(mpg ~., data = mtcars) rf_pred <- predict(Rf_model, mtcars) # predictions...
Random Forest "out of bag" RMSE
I think I got the solution for the OOB RMSE, using keep.inbag=T from randomForest. First you can use predict in order to get the predictions from the model for your response, than simply evaluate usin
Random Forest "out of bag" RMSE I think I got the solution for the OOB RMSE, using keep.inbag=T from randomForest. First you can use predict in order to get the predictions from the model for your response, than simply evaluate using the RMSE formula: Rf_model <- randomForest(mpg ~., data = mtcars) rf_pred <- predict...
Random Forest "out of bag" RMSE I think I got the solution for the OOB RMSE, using keep.inbag=T from randomForest. First you can use predict in order to get the predictions from the model for your response, than simply evaluate usin
40,973
Random Forest "out of bag" RMSE
The Mean of squared residuals: 0.05206834 in your output is the out-of-bag MSE estimate. Just take the square root: sqrt (tail (Rf_model$mse, 1)) (Apparently, $mse stores the oob MSE observed for bagging 1 : n trees, the last one is the one we need.) You can double check by manually calculating RMSE from the oob predi...
Random Forest "out of bag" RMSE
The Mean of squared residuals: 0.05206834 in your output is the out-of-bag MSE estimate. Just take the square root: sqrt (tail (Rf_model$mse, 1)) (Apparently, $mse stores the oob MSE observed for bag
Random Forest "out of bag" RMSE The Mean of squared residuals: 0.05206834 in your output is the out-of-bag MSE estimate. Just take the square root: sqrt (tail (Rf_model$mse, 1)) (Apparently, $mse stores the oob MSE observed for bagging 1 : n trees, the last one is the one we need.) You can double check by manually cal...
Random Forest "out of bag" RMSE The Mean of squared residuals: 0.05206834 in your output is the out-of-bag MSE estimate. Just take the square root: sqrt (tail (Rf_model$mse, 1)) (Apparently, $mse stores the oob MSE observed for bag
40,974
Drop-out as a multiplicative noise in deep neural networks
The correct answer is actually the opposite of the answer by DuttaA. Dropout works so well exactly because it doesn't allow the ReLU to make the noise insignificant by just making its output larger. Let's see why. To make things simpler, I'll use the same toy architecture used in the book, which is a 2-2-1 fully connec...
Drop-out as a multiplicative noise in deep neural networks
The correct answer is actually the opposite of the answer by DuttaA. Dropout works so well exactly because it doesn't allow the ReLU to make the noise insignificant by just making its output larger. L
Drop-out as a multiplicative noise in deep neural networks The correct answer is actually the opposite of the answer by DuttaA. Dropout works so well exactly because it doesn't allow the ReLU to make the noise insignificant by just making its output larger. Let's see why. To make things simpler, I'll use the same toy a...
Drop-out as a multiplicative noise in deep neural networks The correct answer is actually the opposite of the answer by DuttaA. Dropout works so well exactly because it doesn't allow the ReLU to make the noise insignificant by just making its output larger. L
40,975
Generate identically distributed dependent normal random numbers with prespecified sum
We will generate multivariate normals $X\sim MN(\mu, \Sigma)$ with $\mu\in\mathbb{R}^n$ and $\Sigma\in\mathbb{R}^{n\times n}$ such that their sum satisfies our condition. Let $Z=X_1 + \dots + X_n$. As a common mean, we choose $$ \mu_1 = \dots = \mu_n = \frac{a+b}{2n}. $$ In order that $Z\in[a,b]$ with probability $p$, ...
Generate identically distributed dependent normal random numbers with prespecified sum
We will generate multivariate normals $X\sim MN(\mu, \Sigma)$ with $\mu\in\mathbb{R}^n$ and $\Sigma\in\mathbb{R}^{n\times n}$ such that their sum satisfies our condition. Let $Z=X_1 + \dots + X_n$. As
Generate identically distributed dependent normal random numbers with prespecified sum We will generate multivariate normals $X\sim MN(\mu, \Sigma)$ with $\mu\in\mathbb{R}^n$ and $\Sigma\in\mathbb{R}^{n\times n}$ such that their sum satisfies our condition. Let $Z=X_1 + \dots + X_n$. As a common mean, we choose $$ \mu_...
Generate identically distributed dependent normal random numbers with prespecified sum We will generate multivariate normals $X\sim MN(\mu, \Sigma)$ with $\mu\in\mathbb{R}^n$ and $\Sigma\in\mathbb{R}^{n\times n}$ such that their sum satisfies our condition. Let $Z=X_1 + \dots + X_n$. As
40,976
Why does Bayesian optimization work?
Gaussian Process models have two nice properties in the Bayesian Optimization context: They can exactly fit the observed values of the black-box function $f$ (when there is no noise, at least) They smoothly interpolate between observed data points, with increasing statistical uncertainty the farther you move away from...
Why does Bayesian optimization work?
Gaussian Process models have two nice properties in the Bayesian Optimization context: They can exactly fit the observed values of the black-box function $f$ (when there is no noise, at least) They s
Why does Bayesian optimization work? Gaussian Process models have two nice properties in the Bayesian Optimization context: They can exactly fit the observed values of the black-box function $f$ (when there is no noise, at least) They smoothly interpolate between observed data points, with increasing statistical uncer...
Why does Bayesian optimization work? Gaussian Process models have two nice properties in the Bayesian Optimization context: They can exactly fit the observed values of the black-box function $f$ (when there is no noise, at least) They s
40,977
What is the name of $E(XY)$? [duplicate]
Moments of the form $\mu'_{rs}=E(X^rY^s)$ are called "product moments" or more specifically "$r,s$ product moments"; you have the $1,1$ product moment, $\mu_{11}$. They may also be called raw product moments (to distinguish from central ones like covariance). Some people might call it a 'first order product moment', t...
What is the name of $E(XY)$? [duplicate]
Moments of the form $\mu'_{rs}=E(X^rY^s)$ are called "product moments" or more specifically "$r,s$ product moments"; you have the $1,1$ product moment, $\mu_{11}$. They may also be called raw product
What is the name of $E(XY)$? [duplicate] Moments of the form $\mu'_{rs}=E(X^rY^s)$ are called "product moments" or more specifically "$r,s$ product moments"; you have the $1,1$ product moment, $\mu_{11}$. They may also be called raw product moments (to distinguish from central ones like covariance). Some people might ...
What is the name of $E(XY)$? [duplicate] Moments of the form $\mu'_{rs}=E(X^rY^s)$ are called "product moments" or more specifically "$r,s$ product moments"; you have the $1,1$ product moment, $\mu_{11}$. They may also be called raw product
40,978
Binomial distribution where the number of experiments is binomially distributed
Using the law of total covariance, \begin{align} \operatorname{Cov}(K,N) &=E\operatorname{Cov}(K,N|N)+\operatorname{Cov}(EK|N,EN|N) \\&=E 0+\operatorname{Cov}(pN,N) \\&=0+p\operatorname{Var}(N) \\&=pmq(1-q). \end{align}
Binomial distribution where the number of experiments is binomially distributed
Using the law of total covariance, \begin{align} \operatorname{Cov}(K,N) &=E\operatorname{Cov}(K,N|N)+\operatorname{Cov}(EK|N,EN|N) \\&=E 0+\operatorname{Cov}(pN,N) \\&=0+p\operatorname{Var}(N) \\&
Binomial distribution where the number of experiments is binomially distributed Using the law of total covariance, \begin{align} \operatorname{Cov}(K,N) &=E\operatorname{Cov}(K,N|N)+\operatorname{Cov}(EK|N,EN|N) \\&=E 0+\operatorname{Cov}(pN,N) \\&=0+p\operatorname{Var}(N) \\&=pmq(1-q). \end{align}
Binomial distribution where the number of experiments is binomially distributed Using the law of total covariance, \begin{align} \operatorname{Cov}(K,N) &=E\operatorname{Cov}(K,N|N)+\operatorname{Cov}(EK|N,EN|N) \\&=E 0+\operatorname{Cov}(pN,N) \\&=0+p\operatorname{Var}(N) \\&
40,979
hyperparameter tuning in neural networks
The link provided in @itdxer's comment is great. Based on this link, I am writing this answer. Hyperparameter optimization is neural networks is a tedious job as it contains many set of parameters. The possible approaches for finding the optimal parameters are: Hand tuning (Trial and Error) - @Sycorax's comment prov...
hyperparameter tuning in neural networks
The link provided in @itdxer's comment is great. Based on this link, I am writing this answer. Hyperparameter optimization is neural networks is a tedious job as it contains many set of parameters.
hyperparameter tuning in neural networks The link provided in @itdxer's comment is great. Based on this link, I am writing this answer. Hyperparameter optimization is neural networks is a tedious job as it contains many set of parameters. The possible approaches for finding the optimal parameters are: Hand tuning (T...
hyperparameter tuning in neural networks The link provided in @itdxer's comment is great. Based on this link, I am writing this answer. Hyperparameter optimization is neural networks is a tedious job as it contains many set of parameters.
40,980
hyperparameter tuning in neural networks
You need only replace your grid search with a different global search. Recommended steps: Google "optimizer elo ratings" to get a rough idea what works well From the well-performing algorithms, click through to the packages to see which already have integration with keras, tensorflow or similar.
hyperparameter tuning in neural networks
You need only replace your grid search with a different global search. Recommended steps: Google "optimizer elo ratings" to get a rough idea what works well From the well-performing algorithms, click
hyperparameter tuning in neural networks You need only replace your grid search with a different global search. Recommended steps: Google "optimizer elo ratings" to get a rough idea what works well From the well-performing algorithms, click through to the packages to see which already have integration with keras, tens...
hyperparameter tuning in neural networks You need only replace your grid search with a different global search. Recommended steps: Google "optimizer elo ratings" to get a rough idea what works well From the well-performing algorithms, click
40,981
Word2Vec : Difference between the two Weight matrices
They both capture the word semantics. Not only W, sometimes W' is also used as word vectors. Even in somecases (W+W')/2 has also been used and better results in that particular task have been obtained. Another thing to notice is that no activation function is used after the hidden layer, so the transformation from inp...
Word2Vec : Difference between the two Weight matrices
They both capture the word semantics. Not only W, sometimes W' is also used as word vectors. Even in somecases (W+W')/2 has also been used and better results in that particular task have been obtained
Word2Vec : Difference between the two Weight matrices They both capture the word semantics. Not only W, sometimes W' is also used as word vectors. Even in somecases (W+W')/2 has also been used and better results in that particular task have been obtained. Another thing to notice is that no activation function is used ...
Word2Vec : Difference between the two Weight matrices They both capture the word semantics. Not only W, sometimes W' is also used as word vectors. Even in somecases (W+W')/2 has also been used and better results in that particular task have been obtained
40,982
CNN vs fully connected network for image recognition?
Fully connected neural networks are good enough classifiers, however they aren't good for feature extraction. Before the emergence on CNNs the state-of-the-art was to extract explicit features from images and then classify these features. CNNs are trained to identify and extract the best features from the images for th...
CNN vs fully connected network for image recognition?
Fully connected neural networks are good enough classifiers, however they aren't good for feature extraction. Before the emergence on CNNs the state-of-the-art was to extract explicit features from im
CNN vs fully connected network for image recognition? Fully connected neural networks are good enough classifiers, however they aren't good for feature extraction. Before the emergence on CNNs the state-of-the-art was to extract explicit features from images and then classify these features. CNNs are trained to identif...
CNN vs fully connected network for image recognition? Fully connected neural networks are good enough classifiers, however they aren't good for feature extraction. Before the emergence on CNNs the state-of-the-art was to extract explicit features from im
40,983
CNN vs fully connected network for image recognition?
Does anyone know how the accuracy of CNNs compare with fully connected networks for image recognition? The sole fact that since AlexNet won ImageNet competition, every neural network that wins it uses CNN component, should be enough to convince you that CNNs are better for image data. You most likely won't be able t...
CNN vs fully connected network for image recognition?
Does anyone know how the accuracy of CNNs compare with fully connected networks for image recognition? The sole fact that since AlexNet won ImageNet competition, every neural network that wins it u
CNN vs fully connected network for image recognition? Does anyone know how the accuracy of CNNs compare with fully connected networks for image recognition? The sole fact that since AlexNet won ImageNet competition, every neural network that wins it uses CNN component, should be enough to convince you that CNNs are ...
CNN vs fully connected network for image recognition? Does anyone know how the accuracy of CNNs compare with fully connected networks for image recognition? The sole fact that since AlexNet won ImageNet competition, every neural network that wins it u
40,984
CNN vs fully connected network for image recognition?
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. 1. Computational tractability. number of weights betwe...
CNN vs fully connected network for image recognition?
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.
CNN vs fully connected network for image recognition? 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. ...
CNN vs fully connected network for image recognition? 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.
40,985
Integral of a CDF
For cdfs $F$ of distributions with supports on $(0,a)$, $a$ being possibly $+\infty$, a useful representation of the expectation is $$\mathbb{E}_F[X]=\int_0^a x \text{d}F(x)=\int_0^a \{1-F(x)\}\text{d}x$$ by applying integration by parts, \begin{align*}\int_0^a x \text{d}F(x)&=-\int_0^a x \text{d}(1-F)(x)\\&=-\left[x(...
Integral of a CDF
For cdfs $F$ of distributions with supports on $(0,a)$, $a$ being possibly $+\infty$, a useful representation of the expectation is $$\mathbb{E}_F[X]=\int_0^a x \text{d}F(x)=\int_0^a \{1-F(x)\}\text{
Integral of a CDF For cdfs $F$ of distributions with supports on $(0,a)$, $a$ being possibly $+\infty$, a useful representation of the expectation is $$\mathbb{E}_F[X]=\int_0^a x \text{d}F(x)=\int_0^a \{1-F(x)\}\text{d}x$$ by applying integration by parts, \begin{align*}\int_0^a x \text{d}F(x)&=-\int_0^a x \text{d}(1-...
Integral of a CDF For cdfs $F$ of distributions with supports on $(0,a)$, $a$ being possibly $+\infty$, a useful representation of the expectation is $$\mathbb{E}_F[X]=\int_0^a x \text{d}F(x)=\int_0^a \{1-F(x)\}\text{
40,986
Integral of a CDF
No. You'll have to take it, unfortunately. By the way, this integral shows up in expected shortfall (conditional value-at-risk) measure in risk management. It's used so much, that if there was a shortcut through CDF, people would have figured it out long ago.
Integral of a CDF
No. You'll have to take it, unfortunately. By the way, this integral shows up in expected shortfall (conditional value-at-risk) measure in risk management. It's used so much, that if there was a short
Integral of a CDF No. You'll have to take it, unfortunately. By the way, this integral shows up in expected shortfall (conditional value-at-risk) measure in risk management. It's used so much, that if there was a shortcut through CDF, people would have figured it out long ago.
Integral of a CDF No. You'll have to take it, unfortunately. By the way, this integral shows up in expected shortfall (conditional value-at-risk) measure in risk management. It's used so much, that if there was a short
40,987
Theory behind testing whether $\mu \in \mathbb{Q}$ for $X \sim \mathcal{N}(\mu, \sigma^2)$
Your intuition is correct: When you have a null set for the mean that is dense with respect to the total space, you won't be able differentiate the null and alternative sets with continuous data. This is because, for any mean value in the alternative hypothesis, we can always get one that is "arbitrarily close" in the...
Theory behind testing whether $\mu \in \mathbb{Q}$ for $X \sim \mathcal{N}(\mu, \sigma^2)$
Your intuition is correct: When you have a null set for the mean that is dense with respect to the total space, you won't be able differentiate the null and alternative sets with continuous data. Thi
Theory behind testing whether $\mu \in \mathbb{Q}$ for $X \sim \mathcal{N}(\mu, \sigma^2)$ Your intuition is correct: When you have a null set for the mean that is dense with respect to the total space, you won't be able differentiate the null and alternative sets with continuous data. This is because, for any mean va...
Theory behind testing whether $\mu \in \mathbb{Q}$ for $X \sim \mathcal{N}(\mu, \sigma^2)$ Your intuition is correct: When you have a null set for the mean that is dense with respect to the total space, you won't be able differentiate the null and alternative sets with continuous data. Thi
40,988
validation/training accuracy and overfitting
In this case, should the validation accuracy always be roughly the same as the training accuracy if there is no overfitting? There are a few points here: "accuracy" and "loss/error/cost" are 2 separate concepts. "Accuracy" is often used in classification problems and computed as the percentage of correctly classifie...
validation/training accuracy and overfitting
In this case, should the validation accuracy always be roughly the same as the training accuracy if there is no overfitting? There are a few points here: "accuracy" and "loss/error/cost" are 2 sepa
validation/training accuracy and overfitting In this case, should the validation accuracy always be roughly the same as the training accuracy if there is no overfitting? There are a few points here: "accuracy" and "loss/error/cost" are 2 separate concepts. "Accuracy" is often used in classification problems and comp...
validation/training accuracy and overfitting In this case, should the validation accuracy always be roughly the same as the training accuracy if there is no overfitting? There are a few points here: "accuracy" and "loss/error/cost" are 2 sepa
40,989
validation/training accuracy and overfitting
Interesting question! The only situation I can think of is when the data come from a very high-dimensional space (e.g. real world images) where, even if your training and validation set roughly represent the real distribution, the distribution will be extremely sparse. Then it can easily happen that the samples from th...
validation/training accuracy and overfitting
Interesting question! The only situation I can think of is when the data come from a very high-dimensional space (e.g. real world images) where, even if your training and validation set roughly repres
validation/training accuracy and overfitting Interesting question! The only situation I can think of is when the data come from a very high-dimensional space (e.g. real world images) where, even if your training and validation set roughly represent the real distribution, the distribution will be extremely sparse. Then ...
validation/training accuracy and overfitting Interesting question! The only situation I can think of is when the data come from a very high-dimensional space (e.g. real world images) where, even if your training and validation set roughly repres
40,990
Is it a creditable approach to use Random Forrest Variable importance for causal inference?
The analogous concept to parameter estimates in the context of tree based models are not the variable importances, they are the partial dependency plots. Recall the a parameter estimate in a regression can be interpreted as the effect of on the predictions of varying a feature, when all other features are held constant...
Is it a creditable approach to use Random Forrest Variable importance for causal inference?
The analogous concept to parameter estimates in the context of tree based models are not the variable importances, they are the partial dependency plots. Recall the a parameter estimate in a regressio
Is it a creditable approach to use Random Forrest Variable importance for causal inference? The analogous concept to parameter estimates in the context of tree based models are not the variable importances, they are the partial dependency plots. Recall the a parameter estimate in a regression can be interpreted as the ...
Is it a creditable approach to use Random Forrest Variable importance for causal inference? The analogous concept to parameter estimates in the context of tree based models are not the variable importances, they are the partial dependency plots. Recall the a parameter estimate in a regressio
40,991
Is it a creditable approach to use Random Forrest Variable importance for causal inference?
Yes, it is possible to extract causal interpretations from an RF model but certain requirements will need to be met by the model for the extraction to be valid. Similar requirements are also necessary before extracting causal inferences from a simple linear model. The issues around doing so are discussed in Zhao & Hast...
Is it a creditable approach to use Random Forrest Variable importance for causal inference?
Yes, it is possible to extract causal interpretations from an RF model but certain requirements will need to be met by the model for the extraction to be valid. Similar requirements are also necessary
Is it a creditable approach to use Random Forrest Variable importance for causal inference? Yes, it is possible to extract causal interpretations from an RF model but certain requirements will need to be met by the model for the extraction to be valid. Similar requirements are also necessary before extracting causal in...
Is it a creditable approach to use Random Forrest Variable importance for causal inference? Yes, it is possible to extract causal interpretations from an RF model but certain requirements will need to be met by the model for the extraction to be valid. Similar requirements are also necessary
40,992
Gradient Bandit Algorithm baseline
Your implementation is very close to being correct. The issue is in the definition of $\pi$ (which you have as $P$ in your code). From the notes: where here we have also introduced a useful new notation, $\pi_t(a)$, for the probability of taking action $a$ at time $t$. But in your code, you take an argmax: A = n...
Gradient Bandit Algorithm baseline
Your implementation is very close to being correct. The issue is in the definition of $\pi$ (which you have as $P$ in your code). From the notes: where here we have also introduced a useful new notat
Gradient Bandit Algorithm baseline Your implementation is very close to being correct. The issue is in the definition of $\pi$ (which you have as $P$ in your code). From the notes: where here we have also introduced a useful new notation, $\pi_t(a)$, for the probability of taking action $a$ at time $t$. But in your c...
Gradient Bandit Algorithm baseline Your implementation is very close to being correct. The issue is in the definition of $\pi$ (which you have as $P$ in your code). From the notes: where here we have also introduced a useful new notat
40,993
Percentiles of $Z=\max(X,Y)$, where $X$ and $Y$ are correlated bivariate normal random variables
You can compute this numerically. As for theoretical results, I don't have a reference to the literature, but here's a calculation of how your problem is related to the standard normal CDF $\Phi$. The joint pdf is $$f(x_1,x_2)=\frac1{2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}}\exp\left[-\frac{z}{2(1-\rho^2)}\right]$$ where $$...
Percentiles of $Z=\max(X,Y)$, where $X$ and $Y$ are correlated bivariate normal random variables
You can compute this numerically. As for theoretical results, I don't have a reference to the literature, but here's a calculation of how your problem is related to the standard normal CDF $\Phi$. The
Percentiles of $Z=\max(X,Y)$, where $X$ and $Y$ are correlated bivariate normal random variables You can compute this numerically. As for theoretical results, I don't have a reference to the literature, but here's a calculation of how your problem is related to the standard normal CDF $\Phi$. The joint pdf is $$f(x_1,x...
Percentiles of $Z=\max(X,Y)$, where $X$ and $Y$ are correlated bivariate normal random variables You can compute this numerically. As for theoretical results, I don't have a reference to the literature, but here's a calculation of how your problem is related to the standard normal CDF $\Phi$. The
40,994
How to simulate n Uniform[0,1] variables with a specified correlation?
Your method works. Take a standard bivariate normal random variable $(X_1,X_2)$ with correlation $\tau$. Let $\Phi$ be the standard Normal distribution function. The copula $(U_1,U_2)$ given by $U_i = \Phi(X_i)$ has some correlation $\rho=f(\tau)$. Although this function $f$ cannot be determined analytically (as far...
How to simulate n Uniform[0,1] variables with a specified correlation?
Your method works. Take a standard bivariate normal random variable $(X_1,X_2)$ with correlation $\tau$. Let $\Phi$ be the standard Normal distribution function. The copula $(U_1,U_2)$ given by $U_i
How to simulate n Uniform[0,1] variables with a specified correlation? Your method works. Take a standard bivariate normal random variable $(X_1,X_2)$ with correlation $\tau$. Let $\Phi$ be the standard Normal distribution function. The copula $(U_1,U_2)$ given by $U_i = \Phi(X_i)$ has some correlation $\rho=f(\tau)$...
How to simulate n Uniform[0,1] variables with a specified correlation? Your method works. Take a standard bivariate normal random variable $(X_1,X_2)$ with correlation $\tau$. Let $\Phi$ be the standard Normal distribution function. The copula $(U_1,U_2)$ given by $U_i
40,995
How to simulate n Uniform[0,1] variables with a specified correlation?
@whuber: Great derivation, and highly useful for those creating copulas. I always wondered where some correlation gets lost when channeling the normal random deviates with desired correlation through the CDF: ## we arrive at rho = 1.91 set.seed(123) X <- mvrnorm(100000, mu = c(0, 0, 0), Sigma = matrix(c(1, 0.2, 0, 0.2,...
How to simulate n Uniform[0,1] variables with a specified correlation?
@whuber: Great derivation, and highly useful for those creating copulas. I always wondered where some correlation gets lost when channeling the normal random deviates with desired correlation through
How to simulate n Uniform[0,1] variables with a specified correlation? @whuber: Great derivation, and highly useful for those creating copulas. I always wondered where some correlation gets lost when channeling the normal random deviates with desired correlation through the CDF: ## we arrive at rho = 1.91 set.seed(123)...
How to simulate n Uniform[0,1] variables with a specified correlation? @whuber: Great derivation, and highly useful for those creating copulas. I always wondered where some correlation gets lost when channeling the normal random deviates with desired correlation through
40,996
non-linear regression: Residual Plots and RMSE on raw and log target variable
Although your question seems to be based on use of a boosted regression tree algorithm (XGBRegressor, with which I have no experience), your issues seem to be some that are also faced in standard linear regression, on which I base much of my answer. How to proceed depends on what you are trying to accomplish. To start,...
non-linear regression: Residual Plots and RMSE on raw and log target variable
Although your question seems to be based on use of a boosted regression tree algorithm (XGBRegressor, with which I have no experience), your issues seem to be some that are also faced in standard line
non-linear regression: Residual Plots and RMSE on raw and log target variable Although your question seems to be based on use of a boosted regression tree algorithm (XGBRegressor, with which I have no experience), your issues seem to be some that are also faced in standard linear regression, on which I base much of my ...
non-linear regression: Residual Plots and RMSE on raw and log target variable Although your question seems to be based on use of a boosted regression tree algorithm (XGBRegressor, with which I have no experience), your issues seem to be some that are also faced in standard line
40,997
Sum of forecasts
You can sum them, but as described by Hyndman et al in the Optimal combination forecasts for hierarchical time series paper (see also their hts package, the fpp2 chapter and those slides), you can do better by using hierarchical forecast that makes forecasts on all the levels (upper and higher) and then combines them.
Sum of forecasts
You can sum them, but as described by Hyndman et al in the Optimal combination forecasts for hierarchical time series paper (see also their hts package, the fpp2 chapter and those slides), you can do
Sum of forecasts You can sum them, but as described by Hyndman et al in the Optimal combination forecasts for hierarchical time series paper (see also their hts package, the fpp2 chapter and those slides), you can do better by using hierarchical forecast that makes forecasts on all the levels (upper and higher) and the...
Sum of forecasts You can sum them, but as described by Hyndman et al in the Optimal combination forecasts for hierarchical time series paper (see also their hts package, the fpp2 chapter and those slides), you can do
40,998
Is there a bivariate $\beta$ distribution I can fit to my data?
There are many ways to define bivariate beta distributions, that is, bivariate distributions on the square $[0,1]\times [0,1]$ with beta marginals.One way is to start with the usual stochastic representation of the beta distribution using gamma variates, let $X\sim\mathcal{Gamma}(\alpha,\theta),~~ Y\sim\mathcal{Gamma}(...
Is there a bivariate $\beta$ distribution I can fit to my data?
There are many ways to define bivariate beta distributions, that is, bivariate distributions on the square $[0,1]\times [0,1]$ with beta marginals.One way is to start with the usual stochastic represe
Is there a bivariate $\beta$ distribution I can fit to my data? There are many ways to define bivariate beta distributions, that is, bivariate distributions on the square $[0,1]\times [0,1]$ with beta marginals.One way is to start with the usual stochastic representation of the beta distribution using gamma variates, l...
Is there a bivariate $\beta$ distribution I can fit to my data? There are many ways to define bivariate beta distributions, that is, bivariate distributions on the square $[0,1]\times [0,1]$ with beta marginals.One way is to start with the usual stochastic represe
40,999
Clustering weighted data with k clusters
You could simply make multiple copies of the points proportional to their weights and then run k-means. Here is an R implementation of that. ## Your data x = c(20, 21, 30, 31, 200, 201) w = c(100, 100, 100, 100, 1, 1) WeightedX = rep(x, w) kmeans(WeightedX, 2) Cluster means: [,1] 1 20.50000 2 32.18317
Clustering weighted data with k clusters
You could simply make multiple copies of the points proportional to their weights and then run k-means. Here is an R implementation of that. ## Your data x = c(20, 21, 30, 31, 200, 201) w = c(100, 10
Clustering weighted data with k clusters You could simply make multiple copies of the points proportional to their weights and then run k-means. Here is an R implementation of that. ## Your data x = c(20, 21, 30, 31, 200, 201) w = c(100, 100, 100, 100, 1, 1) WeightedX = rep(x, w) kmeans(WeightedX, 2) Cluster means: ...
Clustering weighted data with k clusters You could simply make multiple copies of the points proportional to their weights and then run k-means. Here is an R implementation of that. ## Your data x = c(20, 21, 30, 31, 200, 201) w = c(100, 10
41,000
Clustering weighted data with k clusters
You can trivially modify k-means to support weights. When computing the mean, just multiply every point with it's weight, and divide by the weight sum (the usual weighted mean). $$\mu = \frac{1}{\sum_{i\in C} w_i} \sum_{i\in C} w_i x_i$$ This needs to happen in k-means, at each iteration when it is recomputing the clus...
Clustering weighted data with k clusters
You can trivially modify k-means to support weights. When computing the mean, just multiply every point with it's weight, and divide by the weight sum (the usual weighted mean). $$\mu = \frac{1}{\sum_
Clustering weighted data with k clusters You can trivially modify k-means to support weights. When computing the mean, just multiply every point with it's weight, and divide by the weight sum (the usual weighted mean). $$\mu = \frac{1}{\sum_{i\in C} w_i} \sum_{i\in C} w_i x_i$$ This needs to happen in k-means, at each ...
Clustering weighted data with k clusters You can trivially modify k-means to support weights. When computing the mean, just multiply every point with it's weight, and divide by the weight sum (the usual weighted mean). $$\mu = \frac{1}{\sum_