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 |
|---|---|---|---|---|---|---|
29,701 | Using ARMA-GARCH models to simulate foreign exchange prices | I am working with forex data forecasting and trust me whenever you use Statistical forecasting methods be it ARMA, ARIMA, GARCH, ARCH etc. They always tend to get deteriorated as you try to predict much ahead in time. They may or may not work for next one or two periods but definitely not more than that. Because the data you are dealing with has no auto-correlation, no trend and no seasonality.
My question to you, have you checked ACF and PACF or tests for trend, seasonality before using ARMA and GARCH? Without the above mentioned properties in the data statistical forecasting doesn't work because you are violating the basic assumptions of these models. | Using ARMA-GARCH models to simulate foreign exchange prices | I am working with forex data forecasting and trust me whenever you use Statistical forecasting methods be it ARMA, ARIMA, GARCH, ARCH etc. They always tend to get deteriorated as you try to predict mu | Using ARMA-GARCH models to simulate foreign exchange prices
I am working with forex data forecasting and trust me whenever you use Statistical forecasting methods be it ARMA, ARIMA, GARCH, ARCH etc. They always tend to get deteriorated as you try to predict much ahead in time. They may or may not work for next one or two periods but definitely not more than that. Because the data you are dealing with has no auto-correlation, no trend and no seasonality.
My question to you, have you checked ACF and PACF or tests for trend, seasonality before using ARMA and GARCH? Without the above mentioned properties in the data statistical forecasting doesn't work because you are violating the basic assumptions of these models. | Using ARMA-GARCH models to simulate foreign exchange prices
I am working with forex data forecasting and trust me whenever you use Statistical forecasting methods be it ARMA, ARIMA, GARCH, ARCH etc. They always tend to get deteriorated as you try to predict mu |
29,702 | Using ARMA-GARCH models to simulate foreign exchange prices | My suggestions would be to make sure the model you have selected is appropriate for the data.
Make sure there are no cyclic or seasonal components.
Perform an Augmented Dickey Fuller Test to test the presence of unit root. If unit root is present then keep differencing the data until The Augmented Dickey Fuller Test shows presence of no unit roots. Alternatively observe the Auto correlation coefficients, they should drop after some n time lags for stationarity.
Maybe you have over-fit or under-fit the model using incorrect orders? Find the correct orders using AIC and BIC. | Using ARMA-GARCH models to simulate foreign exchange prices | My suggestions would be to make sure the model you have selected is appropriate for the data.
Make sure there are no cyclic or seasonal components.
Perform an Augmented Dickey Fuller Test to test the | Using ARMA-GARCH models to simulate foreign exchange prices
My suggestions would be to make sure the model you have selected is appropriate for the data.
Make sure there are no cyclic or seasonal components.
Perform an Augmented Dickey Fuller Test to test the presence of unit root. If unit root is present then keep differencing the data until The Augmented Dickey Fuller Test shows presence of no unit roots. Alternatively observe the Auto correlation coefficients, they should drop after some n time lags for stationarity.
Maybe you have over-fit or under-fit the model using incorrect orders? Find the correct orders using AIC and BIC. | Using ARMA-GARCH models to simulate foreign exchange prices
My suggestions would be to make sure the model you have selected is appropriate for the data.
Make sure there are no cyclic or seasonal components.
Perform an Augmented Dickey Fuller Test to test the |
29,703 | What does L2-regularization in LightGBM do? | It does basicly the same. It penalizes the weights upon training depending on your choice of the LightGBM L2-regularization parameter 'lambda_l2', aiming to avoid any of the weights booming up to a level that can cause overfitting, suppressing the variance of the model. Regularization term again is simply the sum of the Frobenius norm of weights over all samples multiplied by the regularization parameter lambda and divided by the number of samples. You add this to the cost function of the machine learning algorithm that you work on just like linear regression. If you want to have a mathematical landscape specificly for LightGBM, you can refer to the LightGBM paper published at Conference on Neural Information Processing Systems (NIPS) 2017 to see the cost function which Microsoft Team have designed for the boosting algorithm:
https://papers.nips.cc/paper/6907-lightgbm-a-highly-efficient-gradient-boosting-decision-tree.pdf
Just imagine or express manually that you add the regularization term to the cost function just like it is done on the cost function of the linear regression. | What does L2-regularization in LightGBM do? | It does basicly the same. It penalizes the weights upon training depending on your choice of the LightGBM L2-regularization parameter 'lambda_l2', aiming to avoid any of the weights booming up to a le | What does L2-regularization in LightGBM do?
It does basicly the same. It penalizes the weights upon training depending on your choice of the LightGBM L2-regularization parameter 'lambda_l2', aiming to avoid any of the weights booming up to a level that can cause overfitting, suppressing the variance of the model. Regularization term again is simply the sum of the Frobenius norm of weights over all samples multiplied by the regularization parameter lambda and divided by the number of samples. You add this to the cost function of the machine learning algorithm that you work on just like linear regression. If you want to have a mathematical landscape specificly for LightGBM, you can refer to the LightGBM paper published at Conference on Neural Information Processing Systems (NIPS) 2017 to see the cost function which Microsoft Team have designed for the boosting algorithm:
https://papers.nips.cc/paper/6907-lightgbm-a-highly-efficient-gradient-boosting-decision-tree.pdf
Just imagine or express manually that you add the regularization term to the cost function just like it is done on the cost function of the linear regression. | What does L2-regularization in LightGBM do?
It does basicly the same. It penalizes the weights upon training depending on your choice of the LightGBM L2-regularization parameter 'lambda_l2', aiming to avoid any of the weights booming up to a le |
29,704 | What is the loss/cost function of decision trees? | I think it helps to distinguish between training metrics and evaluation metrics, and between global training metrics and local training metrics. When we talk about evaluation metrics, as @AlvaroFuentes said, a loss function can always be defined for decision trees, in the same way as for any other model. In training, it is true that often a global metric is chosen and training attempts to optimize over that metric *. But training does not have to be this way, and in the case of decision trees, training proceeds through a greedy search, each step based on a local metric (eg, information gain or Gini index). In fact, even when a global training metric is defined (say, likelihood), each step in training is still is evaluated based on some local metric (say, gradient of likelihood) and hence in a sense "greedy"; it is just that in this case the local metric is inspired by the global one. And in both cases there is no guarantee that a greedy search based on some local metric actually optimizes the global metric (eg, local optima).
* Side note: This training metric is often different from the evaluation metrics, chosen for its nicer mathematical properties to help the training; eg, likelihood, L2 or cross entropy vs accuracy or AUC. | What is the loss/cost function of decision trees? | I think it helps to distinguish between training metrics and evaluation metrics, and between global training metrics and local training metrics. When we talk about evaluation metrics, as @AlvaroFuente | What is the loss/cost function of decision trees?
I think it helps to distinguish between training metrics and evaluation metrics, and between global training metrics and local training metrics. When we talk about evaluation metrics, as @AlvaroFuentes said, a loss function can always be defined for decision trees, in the same way as for any other model. In training, it is true that often a global metric is chosen and training attempts to optimize over that metric *. But training does not have to be this way, and in the case of decision trees, training proceeds through a greedy search, each step based on a local metric (eg, information gain or Gini index). In fact, even when a global training metric is defined (say, likelihood), each step in training is still is evaluated based on some local metric (say, gradient of likelihood) and hence in a sense "greedy"; it is just that in this case the local metric is inspired by the global one. And in both cases there is no guarantee that a greedy search based on some local metric actually optimizes the global metric (eg, local optima).
* Side note: This training metric is often different from the evaluation metrics, chosen for its nicer mathematical properties to help the training; eg, likelihood, L2 or cross entropy vs accuracy or AUC. | What is the loss/cost function of decision trees?
I think it helps to distinguish between training metrics and evaluation metrics, and between global training metrics and local training metrics. When we talk about evaluation metrics, as @AlvaroFuente |
29,705 | What is the loss/cost function of decision trees? | Chapter 8 of Introduction to Statistical Learning by Gareth James et al. talks about how Decision Tree follows a greedy top-down approach also known as recursive binary splitting to stratify the predictor space. What this algorithm tries to do is, starting at the top (a single region containing all observations) it tries to analyze all predictors and all cutpoint values for each predictor to choose the optimal set of predictors and cutpoint values that will have the least sum of squared error.
The sum of squared error here is the sum of squares of the difference between each observation in the split region and the mean response value of that region. This is the loss function that is being optimized. | What is the loss/cost function of decision trees? | Chapter 8 of Introduction to Statistical Learning by Gareth James et al. talks about how Decision Tree follows a greedy top-down approach also known as recursive binary splitting to stratify the predi | What is the loss/cost function of decision trees?
Chapter 8 of Introduction to Statistical Learning by Gareth James et al. talks about how Decision Tree follows a greedy top-down approach also known as recursive binary splitting to stratify the predictor space. What this algorithm tries to do is, starting at the top (a single region containing all observations) it tries to analyze all predictors and all cutpoint values for each predictor to choose the optimal set of predictors and cutpoint values that will have the least sum of squared error.
The sum of squared error here is the sum of squares of the difference between each observation in the split region and the mean response value of that region. This is the loss function that is being optimized. | What is the loss/cost function of decision trees?
Chapter 8 of Introduction to Statistical Learning by Gareth James et al. talks about how Decision Tree follows a greedy top-down approach also known as recursive binary splitting to stratify the predi |
29,706 | What is the loss/cost function of decision trees? | Its just simply the count of leaves. Trees exchange their series for parallel, at an equalization of the leaf count. You can figure out the exact relationship yourself. | What is the loss/cost function of decision trees? | Its just simply the count of leaves. Trees exchange their series for parallel, at an equalization of the leaf count. You can figure out the exact relationship yourself. | What is the loss/cost function of decision trees?
Its just simply the count of leaves. Trees exchange their series for parallel, at an equalization of the leaf count. You can figure out the exact relationship yourself. | What is the loss/cost function of decision trees?
Its just simply the count of leaves. Trees exchange their series for parallel, at an equalization of the leaf count. You can figure out the exact relationship yourself. |
29,707 | Choosing informative priors for Bayesian ordered logistic regression | The use of an informative prior implies, of course, that you have information from which to be informed. For a similar problem, where I had binary outcome data, I happened to have twenty years of success/failure data leading up to the time period of my predictor variables. As it appeared to be relatively stable, I used the center of location of that two decades of data, but radically increased its variance.
My failure rate, up to when predictor variables became available, was about 1 in 1000. Of course, I had hundreds of thousands of observations so I could make a very good estimate of the center with a very tight variance, but that could have overwhelmed the predictors if they were far away from the group mean.
So, I placed a Beta(1,999) distribution as my informative prior density for the failure rate. You are doing something slightly different, but if you do have outside data on the incidence of the different values of the dependent variable, or if you want to use an empirical prior, then you could estimate the rate by adding significantly to the variance. You cannot use a beta distribution because of the use of logistic regression
You will also need to rescale the probabilities into log-odds and reverse engineer the prior. So that, as in my example with a binary case, $$\log(.001)-\log(.999)=log(p)-log(1-p)=m\bar{x}+b=-2.9996$$ if you treat treated the various predictors as independent. Now there is a center of location. $b$ should probably be some large diffuse value such as $\mathcal{N}(0,1000^2)$ and $m$ needs adjusted for $\bar{x}$. You want the prior on $m$ to be informative as to within the ranges you would consider surprising, but diffuse enough that the prior does not control the outcome.
Just a note, for my own project, I did not use logistic regression. There were enough violations of assumptions that I chose to use a math trick and solve it a different way than logistic regression. My own problem had a convenient natural structure that let me sneak around your headache.
Avoid improper priors, they may not integrate to unity.
As to the cut-off points, you have an ordering of variables, where $p_1$ percent are in category one, $p_2$ percent are in category 2 and so forth. Your cut-off should be centered around where those log probabilities actually sit at in aggregate. Same as above, but with more parameters. A cutoff $c_2$ sits at the boundary between category 2 and category 3 and sits at the point $p_1+p_2$. | Choosing informative priors for Bayesian ordered logistic regression | The use of an informative prior implies, of course, that you have information from which to be informed. For a similar problem, where I had binary outcome data, I happened to have twenty years of suc | Choosing informative priors for Bayesian ordered logistic regression
The use of an informative prior implies, of course, that you have information from which to be informed. For a similar problem, where I had binary outcome data, I happened to have twenty years of success/failure data leading up to the time period of my predictor variables. As it appeared to be relatively stable, I used the center of location of that two decades of data, but radically increased its variance.
My failure rate, up to when predictor variables became available, was about 1 in 1000. Of course, I had hundreds of thousands of observations so I could make a very good estimate of the center with a very tight variance, but that could have overwhelmed the predictors if they were far away from the group mean.
So, I placed a Beta(1,999) distribution as my informative prior density for the failure rate. You are doing something slightly different, but if you do have outside data on the incidence of the different values of the dependent variable, or if you want to use an empirical prior, then you could estimate the rate by adding significantly to the variance. You cannot use a beta distribution because of the use of logistic regression
You will also need to rescale the probabilities into log-odds and reverse engineer the prior. So that, as in my example with a binary case, $$\log(.001)-\log(.999)=log(p)-log(1-p)=m\bar{x}+b=-2.9996$$ if you treat treated the various predictors as independent. Now there is a center of location. $b$ should probably be some large diffuse value such as $\mathcal{N}(0,1000^2)$ and $m$ needs adjusted for $\bar{x}$. You want the prior on $m$ to be informative as to within the ranges you would consider surprising, but diffuse enough that the prior does not control the outcome.
Just a note, for my own project, I did not use logistic regression. There were enough violations of assumptions that I chose to use a math trick and solve it a different way than logistic regression. My own problem had a convenient natural structure that let me sneak around your headache.
Avoid improper priors, they may not integrate to unity.
As to the cut-off points, you have an ordering of variables, where $p_1$ percent are in category one, $p_2$ percent are in category 2 and so forth. Your cut-off should be centered around where those log probabilities actually sit at in aggregate. Same as above, but with more parameters. A cutoff $c_2$ sits at the boundary between category 2 and category 3 and sits at the point $p_1+p_2$. | Choosing informative priors for Bayesian ordered logistic regression
The use of an informative prior implies, of course, that you have information from which to be informed. For a similar problem, where I had binary outcome data, I happened to have twenty years of suc |
29,708 | Applying machine learning techniques to panel data | I don't believe I can offer what you're looking for, but the first step is to use the repeated individual_id as a variable to ensure that each individual is in 1 partition. For example if you're using cross-fold validation, then an individual should only show up in 1 fold and not be spread out amongst the others.
As far as what machine learning algorithms to try - that is ultimately up to the data. In my experience though, I think your best results will come from some sort of boosted tree such as LightGBM or xGBoost. This will lead to you deciding how to encode the categorical variables, for which I recommend category_encoders library in python, if you're using python.
I'm sure there's interesting and novel ideas around RNN's but to be honest I don't think this problem is suited for that type of algorithm. This sounds like a classic regression problem to me. | Applying machine learning techniques to panel data | I don't believe I can offer what you're looking for, but the first step is to use the repeated individual_id as a variable to ensure that each individual is in 1 partition. For example if you're using | Applying machine learning techniques to panel data
I don't believe I can offer what you're looking for, but the first step is to use the repeated individual_id as a variable to ensure that each individual is in 1 partition. For example if you're using cross-fold validation, then an individual should only show up in 1 fold and not be spread out amongst the others.
As far as what machine learning algorithms to try - that is ultimately up to the data. In my experience though, I think your best results will come from some sort of boosted tree such as LightGBM or xGBoost. This will lead to you deciding how to encode the categorical variables, for which I recommend category_encoders library in python, if you're using python.
I'm sure there's interesting and novel ideas around RNN's but to be honest I don't think this problem is suited for that type of algorithm. This sounds like a classic regression problem to me. | Applying machine learning techniques to panel data
I don't believe I can offer what you're looking for, but the first step is to use the repeated individual_id as a variable to ensure that each individual is in 1 partition. For example if you're using |
29,709 | Applying machine learning techniques to panel data | Adding to Josh that using some tree based algorithm is lacking some clear transparency on how the features are impacting your sales (like you have in a classic linear regression framework, which is called a white-box model, because the coefficients are very easy to intertrep).
What you can get as relative importance from these tree based algorithms, which basically tell you how important the individual features are for constructing your tree and the output is a ranking. But with this ranking you can not get an understanding of how much an increase of x impacts your y.
There are two algorithms out there, which I know exist but I have never use so far:
Causal Forest is like a tree based algorithm, but incorporates the idea of causal inference and can be found here: https://lost-stats.github.io/Machine_Learning/causal_forest.html
Google's What-If Tool (WIT) is designed to follow the idea of counterfactuals, which can answer the question what would have happened if...
You can build your own counterfactuals using predictions. Train a model and get your predictions for varying values of the individual features (c.p.) and see how the output changes. Like this you can have an understanding which features impact the y how much even using some black-box models like neural nets or boosted trees.
Lastly I also want to mention that using scikit-learn you can return PDP (partial dependency plot) and ICE (individual conditional expectation) plots, which can give you an understanding of the relationship between your feature(s) and your target. | Applying machine learning techniques to panel data | Adding to Josh that using some tree based algorithm is lacking some clear transparency on how the features are impacting your sales (like you have in a classic linear regression framework, which is ca | Applying machine learning techniques to panel data
Adding to Josh that using some tree based algorithm is lacking some clear transparency on how the features are impacting your sales (like you have in a classic linear regression framework, which is called a white-box model, because the coefficients are very easy to intertrep).
What you can get as relative importance from these tree based algorithms, which basically tell you how important the individual features are for constructing your tree and the output is a ranking. But with this ranking you can not get an understanding of how much an increase of x impacts your y.
There are two algorithms out there, which I know exist but I have never use so far:
Causal Forest is like a tree based algorithm, but incorporates the idea of causal inference and can be found here: https://lost-stats.github.io/Machine_Learning/causal_forest.html
Google's What-If Tool (WIT) is designed to follow the idea of counterfactuals, which can answer the question what would have happened if...
You can build your own counterfactuals using predictions. Train a model and get your predictions for varying values of the individual features (c.p.) and see how the output changes. Like this you can have an understanding which features impact the y how much even using some black-box models like neural nets or boosted trees.
Lastly I also want to mention that using scikit-learn you can return PDP (partial dependency plot) and ICE (individual conditional expectation) plots, which can give you an understanding of the relationship between your feature(s) and your target. | Applying machine learning techniques to panel data
Adding to Josh that using some tree based algorithm is lacking some clear transparency on how the features are impacting your sales (like you have in a classic linear regression framework, which is ca |
29,710 | Final Model from Time Series Cross Validation | You can combine rolling forward origin with k-fold cross-validation (aka backtesting with cross-validation). Determine the folds up-front once, and at each rolling time iterate through the k folds, train on k-1 and test on k. The union of all the held out test folds gives you one complete coverage of the entire dataset at that time, and the train folds cover the dataset k-1 times at that time, which you can aggregate in whatever way is appropriate (e.g., mean). Then score train and test separately as you ordinarily would to get the separate train/test scores at that time.
When optimizing parameters, create a separate holdout set first, and then do the cross-validation just described on only the remaining data. For each parameter to be optimized, you need to decide whether that parameter is independent of time (so you can perform the optimization over all rolling times) or dependent on time (so the parameter is optimized separately at each time). If the latter, you might represent the parameter as a function of time (possibly linear) and then optimize the time-independent coefficients of that function over all times. | Final Model from Time Series Cross Validation | You can combine rolling forward origin with k-fold cross-validation (aka backtesting with cross-validation). Determine the folds up-front once, and at each rolling time iterate through the k folds, tr | Final Model from Time Series Cross Validation
You can combine rolling forward origin with k-fold cross-validation (aka backtesting with cross-validation). Determine the folds up-front once, and at each rolling time iterate through the k folds, train on k-1 and test on k. The union of all the held out test folds gives you one complete coverage of the entire dataset at that time, and the train folds cover the dataset k-1 times at that time, which you can aggregate in whatever way is appropriate (e.g., mean). Then score train and test separately as you ordinarily would to get the separate train/test scores at that time.
When optimizing parameters, create a separate holdout set first, and then do the cross-validation just described on only the remaining data. For each parameter to be optimized, you need to decide whether that parameter is independent of time (so you can perform the optimization over all rolling times) or dependent on time (so the parameter is optimized separately at each time). If the latter, you might represent the parameter as a function of time (possibly linear) and then optimize the time-independent coefficients of that function over all times. | Final Model from Time Series Cross Validation
You can combine rolling forward origin with k-fold cross-validation (aka backtesting with cross-validation). Determine the folds up-front once, and at each rolling time iterate through the k folds, tr |
29,711 | Final Model from Time Series Cross Validation | If you optimized parameters to the test data, you'd be partially fitting your data to test data instead of training data. You want to know which method is best over withheld data not, for example, what a gamma should be set to in a Holt Winters model. | Final Model from Time Series Cross Validation | If you optimized parameters to the test data, you'd be partially fitting your data to test data instead of training data. You want to know which method is best over withheld data not, for example, wha | Final Model from Time Series Cross Validation
If you optimized parameters to the test data, you'd be partially fitting your data to test data instead of training data. You want to know which method is best over withheld data not, for example, what a gamma should be set to in a Holt Winters model. | Final Model from Time Series Cross Validation
If you optimized parameters to the test data, you'd be partially fitting your data to test data instead of training data. You want to know which method is best over withheld data not, for example, wha |
29,712 | Computation of Conditional Expectation on $\sigma$-algebras | This does not answer the question but it does provide a sort of "counter-example". Not quite, but it does address a potential issue that can take place when using your intuition to approximate the conditional approximation.
The book by Brezniak, "Basic Stochastic Processes", computes the following conditional expectation exercise via the formal definition. I redid his example using the 'method of approximations' as asked in the original post.
Consider the following example. $\Omega = [0,1]$ with $\mu$ the standard Lebesgue measure.
Define the random variables, $\xi(\omega) = 2\omega^2$ and $\eta(\omega) = 1 - |2\omega - 1|$. We will calculate $E[\xi|\eta]$. Given $\omega\in \Omega$, the conditional expectation $E[\xi|\eta](\omega)$ ought to be equal to $E[\xi|\eta = \eta(\omega)]$. However, the event $(\eta = \eta(\omega))$ is the set $\{ \omega,1-\omega\}$, which is of measure zero, and so $[\xi|\eta = \eta(\omega)]$ is undefined.
So we will approximate the event $A=\{\omega,1-\omega\}$. Choose a small $\varepsilon > 0$, and construct the event $A_{\varepsilon} = [\omega - \varepsilon,\omega + \varepsilon] \cup \{ 1 - \omega \}$. The events $A_{\varepsilon}$ approximate $A$, and approach $A$ in the limit as we shrink the $\varepsilon$. Furthermore, $\mu(A_{\varepsilon}) = 2\varepsilon$.
We calculate, in the limit,
$$ E[\xi|A_{\varepsilon}] = \frac{1}{2\varepsilon} \int_{\omega - \varepsilon}^{\omega + \varepsilon} 2t^2 ~ dt \to 2\omega^2 $$
But this is the wrong answer!
However, if we approximate by $B_{\varepsilon} = [\omega - \varepsilon,\omega + \varepsilon] \cup [1- \omega - \varepsilon,1-\omega + \varepsilon] $ then,
$$ E[\xi|B_{\varepsilon}] = \frac{1}{4\varepsilon} \left\{ \int_{\omega - \varepsilon}^{\omega + \varepsilon} 2t^2 ~ dt + \int_{1-\omega - \varepsilon}^{1-\omega + \varepsilon} 2t^2 ~ dt \right\} \to \omega^2 + (1-\omega)^2 $$
Which is the right answer!
Why does one approach work and the other does not? Clearly, in the first approximation, the approximating sets $A_{\omega}$ did not belong to the $\sigma$-algebra generated by $\xi$. In the second approximation, the approximating sets $B_{\omega}$ did belong to $\sigma(\xi)$. | Computation of Conditional Expectation on $\sigma$-algebras | This does not answer the question but it does provide a sort of "counter-example". Not quite, but it does address a potential issue that can take place when using your intuition to approximate the con | Computation of Conditional Expectation on $\sigma$-algebras
This does not answer the question but it does provide a sort of "counter-example". Not quite, but it does address a potential issue that can take place when using your intuition to approximate the conditional approximation.
The book by Brezniak, "Basic Stochastic Processes", computes the following conditional expectation exercise via the formal definition. I redid his example using the 'method of approximations' as asked in the original post.
Consider the following example. $\Omega = [0,1]$ with $\mu$ the standard Lebesgue measure.
Define the random variables, $\xi(\omega) = 2\omega^2$ and $\eta(\omega) = 1 - |2\omega - 1|$. We will calculate $E[\xi|\eta]$. Given $\omega\in \Omega$, the conditional expectation $E[\xi|\eta](\omega)$ ought to be equal to $E[\xi|\eta = \eta(\omega)]$. However, the event $(\eta = \eta(\omega))$ is the set $\{ \omega,1-\omega\}$, which is of measure zero, and so $[\xi|\eta = \eta(\omega)]$ is undefined.
So we will approximate the event $A=\{\omega,1-\omega\}$. Choose a small $\varepsilon > 0$, and construct the event $A_{\varepsilon} = [\omega - \varepsilon,\omega + \varepsilon] \cup \{ 1 - \omega \}$. The events $A_{\varepsilon}$ approximate $A$, and approach $A$ in the limit as we shrink the $\varepsilon$. Furthermore, $\mu(A_{\varepsilon}) = 2\varepsilon$.
We calculate, in the limit,
$$ E[\xi|A_{\varepsilon}] = \frac{1}{2\varepsilon} \int_{\omega - \varepsilon}^{\omega + \varepsilon} 2t^2 ~ dt \to 2\omega^2 $$
But this is the wrong answer!
However, if we approximate by $B_{\varepsilon} = [\omega - \varepsilon,\omega + \varepsilon] \cup [1- \omega - \varepsilon,1-\omega + \varepsilon] $ then,
$$ E[\xi|B_{\varepsilon}] = \frac{1}{4\varepsilon} \left\{ \int_{\omega - \varepsilon}^{\omega + \varepsilon} 2t^2 ~ dt + \int_{1-\omega - \varepsilon}^{1-\omega + \varepsilon} 2t^2 ~ dt \right\} \to \omega^2 + (1-\omega)^2 $$
Which is the right answer!
Why does one approach work and the other does not? Clearly, in the first approximation, the approximating sets $A_{\omega}$ did not belong to the $\sigma$-algebra generated by $\xi$. In the second approximation, the approximating sets $B_{\omega}$ did belong to $\sigma(\xi)$. | Computation of Conditional Expectation on $\sigma$-algebras
This does not answer the question but it does provide a sort of "counter-example". Not quite, but it does address a potential issue that can take place when using your intuition to approximate the con |
29,713 | Are early stopping and dropout sufficient to regularize the vast majority of deep neural networks in practice? | Let's recall the main aim of regularization is to reduce over fitting.
What other techniques are currently being used to reduce over fitting:
1) Weight sharing- as done in CNN's, applying the same filters across the image.
2) Data Augmentation- Augmenting existing data and generate synthetic data with generative models
3) Large amount of training data- thanks to ImageNet etc.
4) Pre-training- For example say Use ImageNet learnt weights before training classifier on say Caltech dataset.
5) The use of RelU's in Neural Nets by itself encourages sparsity as they allow for zero activations. In fact for more complex regions in feature space use more RelU's, deactivate them for simple regions. So basically vary model complexity based on problem complexity.
Use of a bunch of such techniques in addition to dropout and early stopping seems sufficient for the problems being solved today. However for novel problems with lesser data you may find other regularization techniques useful. | Are early stopping and dropout sufficient to regularize the vast majority of deep neural networks in | Let's recall the main aim of regularization is to reduce over fitting.
What other techniques are currently being used to reduce over fitting:
1) Weight sharing- as done in CNN's, applying the same fil | Are early stopping and dropout sufficient to regularize the vast majority of deep neural networks in practice?
Let's recall the main aim of regularization is to reduce over fitting.
What other techniques are currently being used to reduce over fitting:
1) Weight sharing- as done in CNN's, applying the same filters across the image.
2) Data Augmentation- Augmenting existing data and generate synthetic data with generative models
3) Large amount of training data- thanks to ImageNet etc.
4) Pre-training- For example say Use ImageNet learnt weights before training classifier on say Caltech dataset.
5) The use of RelU's in Neural Nets by itself encourages sparsity as they allow for zero activations. In fact for more complex regions in feature space use more RelU's, deactivate them for simple regions. So basically vary model complexity based on problem complexity.
Use of a bunch of such techniques in addition to dropout and early stopping seems sufficient for the problems being solved today. However for novel problems with lesser data you may find other regularization techniques useful. | Are early stopping and dropout sufficient to regularize the vast majority of deep neural networks in
Let's recall the main aim of regularization is to reduce over fitting.
What other techniques are currently being used to reduce over fitting:
1) Weight sharing- as done in CNN's, applying the same fil |
29,714 | How efficient is Q-learning with Neural Networks when there is one output unit per action? | So the two options we want to compare are:
Inputs = state representation, Outputs = 1 node per action
Inputs = state representation + one-hot encoding of actions, Outputs = 1 node
Going by my own intuition, I doubt there's a significant difference in terms of representation power or learning speed (in terms of iterations) between those two options.
For representation power, the first option gives a slightly ''smaller'' network near the inputs, and a ''wider'' network near the outputs. If for whatever reason it were beneficial to have more weights close to the input nodes for example, that could pretty much be achieved by making the first hidden layer (close to the inputs) a bit bigger too.
As for learning speed, the concern you seem to have is basically along the lines of generally only having an accurate learning signal for one of the outputs, and not for the others. With the second option, exactly the same can be said for weights connected to input nodes though, so I doubt there's a significant difference there.
Like I mentioned, all of the above is based just on my intuition though, would be interesting to see more credible references on that.
One important advantage I see for the first option is in computational speed; suppose you want to compute $Q$-values for all actions in order to decide which action to select; a single forwards pass through the network, giving you all the $Q$-values at once, will be much more efficient computationally than having $n$ separate forwards passes (for an action set of size $n$). | How efficient is Q-learning with Neural Networks when there is one output unit per action? | So the two options we want to compare are:
Inputs = state representation, Outputs = 1 node per action
Inputs = state representation + one-hot encoding of actions, Outputs = 1 node
Going by my own in | How efficient is Q-learning with Neural Networks when there is one output unit per action?
So the two options we want to compare are:
Inputs = state representation, Outputs = 1 node per action
Inputs = state representation + one-hot encoding of actions, Outputs = 1 node
Going by my own intuition, I doubt there's a significant difference in terms of representation power or learning speed (in terms of iterations) between those two options.
For representation power, the first option gives a slightly ''smaller'' network near the inputs, and a ''wider'' network near the outputs. If for whatever reason it were beneficial to have more weights close to the input nodes for example, that could pretty much be achieved by making the first hidden layer (close to the inputs) a bit bigger too.
As for learning speed, the concern you seem to have is basically along the lines of generally only having an accurate learning signal for one of the outputs, and not for the others. With the second option, exactly the same can be said for weights connected to input nodes though, so I doubt there's a significant difference there.
Like I mentioned, all of the above is based just on my intuition though, would be interesting to see more credible references on that.
One important advantage I see for the first option is in computational speed; suppose you want to compute $Q$-values for all actions in order to decide which action to select; a single forwards pass through the network, giving you all the $Q$-values at once, will be much more efficient computationally than having $n$ separate forwards passes (for an action set of size $n$). | How efficient is Q-learning with Neural Networks when there is one output unit per action?
So the two options we want to compare are:
Inputs = state representation, Outputs = 1 node per action
Inputs = state representation + one-hot encoding of actions, Outputs = 1 node
Going by my own in |
29,715 | In machine learning, Is it better to have class ratios balanced or representative of the population? | Check this paper for a good review of learning with inbalanced datasets.
One way of dealing with the problem is to do artificial subsampling or upsampling in the training set to balance the datasets.
I think it is usually better to have a balanced training set, since otherwise the decision boundary is gonna give too much space to the bigger class and you are going to misclassify too much the small class. This is usually bad. (think of cancer detection where the smaller class is the most costly, namely having a tumor).
If you don't want to use sampling methods, than you can use cost based methods, where you weight the importance of every sample so that the loss function has more contribution from the samples of the most important class. In cancer detection, you would weight more the cost coming from training samples of hte positive class (having a tumor).
Finally, remember that if the test set is very unbalanced classification accuracy is not a good measure of performance. You would be better off using precision/recall and the f-score, easily computed from the confusion matrix.
Check this paper for references on classification performance measures for a lots of different scenarios.
Also another good read on the topic is this one. | In machine learning, Is it better to have class ratios balanced or representative of the population? | Check this paper for a good review of learning with inbalanced datasets.
One way of dealing with the problem is to do artificial subsampling or upsampling in the training set to balance the datasets.
| In machine learning, Is it better to have class ratios balanced or representative of the population?
Check this paper for a good review of learning with inbalanced datasets.
One way of dealing with the problem is to do artificial subsampling or upsampling in the training set to balance the datasets.
I think it is usually better to have a balanced training set, since otherwise the decision boundary is gonna give too much space to the bigger class and you are going to misclassify too much the small class. This is usually bad. (think of cancer detection where the smaller class is the most costly, namely having a tumor).
If you don't want to use sampling methods, than you can use cost based methods, where you weight the importance of every sample so that the loss function has more contribution from the samples of the most important class. In cancer detection, you would weight more the cost coming from training samples of hte positive class (having a tumor).
Finally, remember that if the test set is very unbalanced classification accuracy is not a good measure of performance. You would be better off using precision/recall and the f-score, easily computed from the confusion matrix.
Check this paper for references on classification performance measures for a lots of different scenarios.
Also another good read on the topic is this one. | In machine learning, Is it better to have class ratios balanced or representative of the population?
Check this paper for a good review of learning with inbalanced datasets.
One way of dealing with the problem is to do artificial subsampling or upsampling in the training set to balance the datasets.
|
29,716 | In machine learning, Is it better to have class ratios balanced or representative of the population? | Correct me if I am wrong, but the actual proportion of the classes in the population does not matter for ML in terms of the classification. Where it matters is in obtaining the training data for both classes that spans the entire feature space. So in general if you had a 80/20 split for classes A/B, it is much more likely that you are going to find an representative sample for class A relative to class B.
Thus On the question of whether its is better to have a 50/50 ratio, Intuitively my guess is that it might not be as important as having a larger training set by using all the data. However, this is the part that i am unsure of... which is how the unequal ratios could possibly impact misclassification rates, especially on the boundary of separation. For the test set, the proportions should not be relevant. | In machine learning, Is it better to have class ratios balanced or representative of the population? | Correct me if I am wrong, but the actual proportion of the classes in the population does not matter for ML in terms of the classification. Where it matters is in obtaining the training data for both | In machine learning, Is it better to have class ratios balanced or representative of the population?
Correct me if I am wrong, but the actual proportion of the classes in the population does not matter for ML in terms of the classification. Where it matters is in obtaining the training data for both classes that spans the entire feature space. So in general if you had a 80/20 split for classes A/B, it is much more likely that you are going to find an representative sample for class A relative to class B.
Thus On the question of whether its is better to have a 50/50 ratio, Intuitively my guess is that it might not be as important as having a larger training set by using all the data. However, this is the part that i am unsure of... which is how the unequal ratios could possibly impact misclassification rates, especially on the boundary of separation. For the test set, the proportions should not be relevant. | In machine learning, Is it better to have class ratios balanced or representative of the population?
Correct me if I am wrong, but the actual proportion of the classes in the population does not matter for ML in terms of the classification. Where it matters is in obtaining the training data for both |
29,717 | Is there a useful way to define the "best" confidence interval? | A bit long for a comment. Check out the discussion on UMP's in this paper "The fallacy of placing confidence in confidence intervals" by Morey et al. In particular, there are some examples where:
"Even more strangely, intervals from the UMP procedure initially
increase in width with the uncertainty in the data, but when the width
of the likelihood is greater than 5 meters, the width of the UMP
interval is inversely related to the uncertainty in the data, like the
nonparametric interval. The UMP and sampling distribution procedures
share the dubious distinction that their CIs cannot be used to work
backwards to the observations. In spite of being the “most powerful”
procedure, the UMP procedure clearly throws away important
information." | Is there a useful way to define the "best" confidence interval? | A bit long for a comment. Check out the discussion on UMP's in this paper "The fallacy of placing confidence in confidence intervals" by Morey et al. In particular, there are some examples where:
"E | Is there a useful way to define the "best" confidence interval?
A bit long for a comment. Check out the discussion on UMP's in this paper "The fallacy of placing confidence in confidence intervals" by Morey et al. In particular, there are some examples where:
"Even more strangely, intervals from the UMP procedure initially
increase in width with the uncertainty in the data, but when the width
of the likelihood is greater than 5 meters, the width of the UMP
interval is inversely related to the uncertainty in the data, like the
nonparametric interval. The UMP and sampling distribution procedures
share the dubious distinction that their CIs cannot be used to work
backwards to the observations. In spite of being the “most powerful”
procedure, the UMP procedure clearly throws away important
information." | Is there a useful way to define the "best" confidence interval?
A bit long for a comment. Check out the discussion on UMP's in this paper "The fallacy of placing confidence in confidence intervals" by Morey et al. In particular, there are some examples where:
"E |
29,718 | Is there a useful way to define the "best" confidence interval? | Rejection is only part of the inference, don't get stuck there. You're making a decision. Let's say you need to decide whether to go to a mechanic when "check engine" light goes on or forget about it.
So, your null hypothesis is that the engine's fine, and the light is just the nuisance. The check engine light is your test. Let's say the p-value is 5%, while your significance is $\alpha=0.01$, so you can't reject the null, and move on with your business. This is how statistical significance works in its naive form.
That's not how decisions to be made and how economic significance should be taken into account. You have to calculate the cost of going with null vs. rejecting it and selecting the alternative hypo.
I completely omitted the alternative hypothesis in above example, because that's how everybody does it: they think alternative hypo is just some kind of formality like curtsy. In real life alternative is as important as null, because that's how you calculate the cost of not choosing the null. Only when you account for costs of null and alternative, you should be making the decision to go or not to go to a mechanic. The p-value and confidence intervals on theirs own have no meaning in this regard, only in conjuction with costs they become meaningful | Is there a useful way to define the "best" confidence interval? | Rejection is only part of the inference, don't get stuck there. You're making a decision. Let's say you need to decide whether to go to a mechanic when "check engine" light goes on or forget about it. | Is there a useful way to define the "best" confidence interval?
Rejection is only part of the inference, don't get stuck there. You're making a decision. Let's say you need to decide whether to go to a mechanic when "check engine" light goes on or forget about it.
So, your null hypothesis is that the engine's fine, and the light is just the nuisance. The check engine light is your test. Let's say the p-value is 5%, while your significance is $\alpha=0.01$, so you can't reject the null, and move on with your business. This is how statistical significance works in its naive form.
That's not how decisions to be made and how economic significance should be taken into account. You have to calculate the cost of going with null vs. rejecting it and selecting the alternative hypo.
I completely omitted the alternative hypothesis in above example, because that's how everybody does it: they think alternative hypo is just some kind of formality like curtsy. In real life alternative is as important as null, because that's how you calculate the cost of not choosing the null. Only when you account for costs of null and alternative, you should be making the decision to go or not to go to a mechanic. The p-value and confidence intervals on theirs own have no meaning in this regard, only in conjuction with costs they become meaningful | Is there a useful way to define the "best" confidence interval?
Rejection is only part of the inference, don't get stuck there. You're making a decision. Let's say you need to decide whether to go to a mechanic when "check engine" light goes on or forget about it. |
29,719 | Sum of coefficients of multinomial distribution | The present question is a specific case where you are dealing with a quantity that is a linear function of a multinomial random variable. It is possible to solve your problem exactly, by enumerating the multinomial combinations that satisfy the required inequality, and summing the distribution over that range. In the case where $N$ is large this may become computationally infeasible. In this case it is possible to obtain an approximate distribution using the normal approximation to the multinomial. A generalised version of this approximation is shown below, and then this is applied to your specific example.
General approximation problem: Suppose we have a sequence of exchangeable random variables with range $1, 2, ..., m$. For any $n \in \mathbb{N}$ we can form the count vector $\boldsymbol{X} \equiv \boldsymbol{X} (n) \equiv (X_1, X_2, ..., X_m)$, which counts the number of occurences of each outcome in the first $n$ values of the sequence. Since the underlying sequence is exchangeable, the count vector is distributed as:
$$\begin{array}
\boldsymbol{X} \text{ ~ Mu}(n, \boldsymbol{\theta}) & & \boldsymbol{\theta} = \lim_{n \rightarrow \infty} \boldsymbol{X}(n)/n.
\end{array}$$
Now, suppose we have some vector of non-negative weights $\boldsymbol{w} = (w_1, w_2, ..., w_m)$ and we use these weights to define the linear function:
$$A(n) \equiv \sum_{i=1}^m w_i X_i.$$
Since the weights are non-negative, this new quantity is non-decreasing in $n$. We then define the number $N(a) \equiv \min \{ n \in \mathbb{N} | A(n) \geqslant a \}$, which is the smallest number of observations required to obtain a specified minimum value for our linear function. We want to approximate the distribution of $N(a)$ in the case where this value is (stochastically) large.
Solving the general approximation problem: Firstly, we note that since $A(n)$ is non-decreasing in $n$ (which holds because we have assumed that all the weights are non-negative), we have:
$$\mathbb{P} (N(a) \geqslant n) = \mathbb{P} (N(a) > n - 1) = \mathbb{P} (A(n-1) < a).$$
Hence, the distribution of $N$ is directly related to the distribution of $A$. Assuming that the former quantity is large, we can approximate the distribution of the latter by replacing the discrete random vector $\boldsymbol{X}$ with a continuous approximation from the multivariate normal distribution. This leads to a normal approximation for the linear quantitiy $A(n)$, and we can calculate the moments of this quantity directly. To do this, we use the fact that $\mathbb{E}(X_i) = n \theta_i$, $\mathbb{V}(X_i) = n \theta_i (1 - \theta_i)$ and $\mathbb{C}(X_i, X_j) = -n \theta_i \theta_j$ for $i \neq j$. With some basic algebra, this gives us:
$$\mu \equiv \mathbb{E}\left(\frac{1}{n} A(n)\right) = \sum_{i=1}^m w_i \theta_i,$$
$$\sigma^2 \equiv \mathbb{V}\left(\frac{1}{\sqrt{n}} A(n)\right) = \sum_{i=1}^m w_i \theta_i - \left(\sum_{i=1}^m w_i \theta_i\right)^2 = \mu (1 - \mu).$$
Taking the normal approximation to the multinomial now gives us the approximate distribution $A(n) \text{ ~ N} (n \mu, n \mu (1 - \mu))$. Applying this approximation yields:
$$\mathbb{P} (N(a) \geqslant n) = \mathbb{P} (A(n-1) < a) \approx \Phi \left(\frac{a - (n-1) \mu}{\sqrt{(n-1) \mu (1 - \mu)}}\right).$$
(The symbol $\Phi$ is the standard notation for the standard normal distribution function.) It is possible to apply this approximation to find probabilities pertaining to the quantity $N(a)$ for a specified value of $a$. This is a basic approximation which has not attempted to incorporate continuity correction on the values of the underlying multinomial count values. It is obtained by taking a normal approximation using the same first two central moments as the exact linear function.
Application to your problem: In your problem you have probabilities $\boldsymbol{\theta} = (\tfrac{1}{2}, \tfrac{1}{6}, \tfrac{1}{3})$, weights $\boldsymbol{w} = (0, \ln 2, \ln 3)$, and cut-off value $a = \ln 100000$. You therefore have (rounding to six decimal points) $\mu = \tfrac{1}{6}\ln 2 + \tfrac{1}{3}\ln 3 = 0.481729$. Applying the above approximation we have (rounding to six decimal points):
$$\mathbb{P}(N(a) \geqslant 25) \approx \Phi \left(\frac{\ln 100000 - 24 \cdot 0.481729}{\sqrt{24} \cdot 0.499666}\right) =\Phi (-0.019838) = 0.492086.$$
By application of the exact multinomial distribution, summing over all combinations satisfying the requirement $\mathbb{P}(A(24) < a)$, it can be shown that the exact result is $\mathbb{P}(N(a) \geqslant 25) = 0.483500$. Hence, we can see that the approximation is quite close to the exact answer in the present case.
Hopefully this answer gives you an answer to your specific question, while also placing it within a more general framework of probabilistic results that apply to linear functions of multinomial random vectors. The present method should allow you to obtain approximate solutions to problems of the general type you are facing, allowing for variation in the specific numbers in your example. | Sum of coefficients of multinomial distribution | The present question is a specific case where you are dealing with a quantity that is a linear function of a multinomial random variable. It is possible to solve your problem exactly, by enumerating | Sum of coefficients of multinomial distribution
The present question is a specific case where you are dealing with a quantity that is a linear function of a multinomial random variable. It is possible to solve your problem exactly, by enumerating the multinomial combinations that satisfy the required inequality, and summing the distribution over that range. In the case where $N$ is large this may become computationally infeasible. In this case it is possible to obtain an approximate distribution using the normal approximation to the multinomial. A generalised version of this approximation is shown below, and then this is applied to your specific example.
General approximation problem: Suppose we have a sequence of exchangeable random variables with range $1, 2, ..., m$. For any $n \in \mathbb{N}$ we can form the count vector $\boldsymbol{X} \equiv \boldsymbol{X} (n) \equiv (X_1, X_2, ..., X_m)$, which counts the number of occurences of each outcome in the first $n$ values of the sequence. Since the underlying sequence is exchangeable, the count vector is distributed as:
$$\begin{array}
\boldsymbol{X} \text{ ~ Mu}(n, \boldsymbol{\theta}) & & \boldsymbol{\theta} = \lim_{n \rightarrow \infty} \boldsymbol{X}(n)/n.
\end{array}$$
Now, suppose we have some vector of non-negative weights $\boldsymbol{w} = (w_1, w_2, ..., w_m)$ and we use these weights to define the linear function:
$$A(n) \equiv \sum_{i=1}^m w_i X_i.$$
Since the weights are non-negative, this new quantity is non-decreasing in $n$. We then define the number $N(a) \equiv \min \{ n \in \mathbb{N} | A(n) \geqslant a \}$, which is the smallest number of observations required to obtain a specified minimum value for our linear function. We want to approximate the distribution of $N(a)$ in the case where this value is (stochastically) large.
Solving the general approximation problem: Firstly, we note that since $A(n)$ is non-decreasing in $n$ (which holds because we have assumed that all the weights are non-negative), we have:
$$\mathbb{P} (N(a) \geqslant n) = \mathbb{P} (N(a) > n - 1) = \mathbb{P} (A(n-1) < a).$$
Hence, the distribution of $N$ is directly related to the distribution of $A$. Assuming that the former quantity is large, we can approximate the distribution of the latter by replacing the discrete random vector $\boldsymbol{X}$ with a continuous approximation from the multivariate normal distribution. This leads to a normal approximation for the linear quantitiy $A(n)$, and we can calculate the moments of this quantity directly. To do this, we use the fact that $\mathbb{E}(X_i) = n \theta_i$, $\mathbb{V}(X_i) = n \theta_i (1 - \theta_i)$ and $\mathbb{C}(X_i, X_j) = -n \theta_i \theta_j$ for $i \neq j$. With some basic algebra, this gives us:
$$\mu \equiv \mathbb{E}\left(\frac{1}{n} A(n)\right) = \sum_{i=1}^m w_i \theta_i,$$
$$\sigma^2 \equiv \mathbb{V}\left(\frac{1}{\sqrt{n}} A(n)\right) = \sum_{i=1}^m w_i \theta_i - \left(\sum_{i=1}^m w_i \theta_i\right)^2 = \mu (1 - \mu).$$
Taking the normal approximation to the multinomial now gives us the approximate distribution $A(n) \text{ ~ N} (n \mu, n \mu (1 - \mu))$. Applying this approximation yields:
$$\mathbb{P} (N(a) \geqslant n) = \mathbb{P} (A(n-1) < a) \approx \Phi \left(\frac{a - (n-1) \mu}{\sqrt{(n-1) \mu (1 - \mu)}}\right).$$
(The symbol $\Phi$ is the standard notation for the standard normal distribution function.) It is possible to apply this approximation to find probabilities pertaining to the quantity $N(a)$ for a specified value of $a$. This is a basic approximation which has not attempted to incorporate continuity correction on the values of the underlying multinomial count values. It is obtained by taking a normal approximation using the same first two central moments as the exact linear function.
Application to your problem: In your problem you have probabilities $\boldsymbol{\theta} = (\tfrac{1}{2}, \tfrac{1}{6}, \tfrac{1}{3})$, weights $\boldsymbol{w} = (0, \ln 2, \ln 3)$, and cut-off value $a = \ln 100000$. You therefore have (rounding to six decimal points) $\mu = \tfrac{1}{6}\ln 2 + \tfrac{1}{3}\ln 3 = 0.481729$. Applying the above approximation we have (rounding to six decimal points):
$$\mathbb{P}(N(a) \geqslant 25) \approx \Phi \left(\frac{\ln 100000 - 24 \cdot 0.481729}{\sqrt{24} \cdot 0.499666}\right) =\Phi (-0.019838) = 0.492086.$$
By application of the exact multinomial distribution, summing over all combinations satisfying the requirement $\mathbb{P}(A(24) < a)$, it can be shown that the exact result is $\mathbb{P}(N(a) \geqslant 25) = 0.483500$. Hence, we can see that the approximation is quite close to the exact answer in the present case.
Hopefully this answer gives you an answer to your specific question, while also placing it within a more general framework of probabilistic results that apply to linear functions of multinomial random vectors. The present method should allow you to obtain approximate solutions to problems of the general type you are facing, allowing for variation in the specific numbers in your example. | Sum of coefficients of multinomial distribution
The present question is a specific case where you are dealing with a quantity that is a linear function of a multinomial random variable. It is possible to solve your problem exactly, by enumerating |
29,720 | Sum of coefficients of multinomial distribution | Let's do a normal approximation.
First, let's rephrase completely your problem in logs. You start at 0 at time t=0. Then, at each time step, you add:
0 with probability 1/2
$\log(2)$ with probability 1/6
$\log(3)$ with probability 1/3
You stop this process when your sum exceeds $\log(10^5)$ at which point you look at how many throws you have made. The number of throws it took you to reach that point is $N$^
My calculator tells me that the mean of your increments is: $\approx 0.48$ and that the variance is $\approx 0.25$. For reference, the ending point is at $\approx 11.51$ so we'll reach him in roughly 24 steps
Conditional on the fact that we have done 25 steps, the distribution of the sum is roughly a Gaussian centered at 12.0 and with variance 6.25. This gives us a rough Gaussian approximation of $p(N\geq25)\approx 0.5 $
You'd need to look at the cumulants of the sum at N=25 to know whether or not the Gaussian approximation is allright. Given that the increments aren't symmetric, the approx might not be the best | Sum of coefficients of multinomial distribution | Let's do a normal approximation.
First, let's rephrase completely your problem in logs. You start at 0 at time t=0. Then, at each time step, you add:
0 with probability 1/2
$\log(2)$ with probability | Sum of coefficients of multinomial distribution
Let's do a normal approximation.
First, let's rephrase completely your problem in logs. You start at 0 at time t=0. Then, at each time step, you add:
0 with probability 1/2
$\log(2)$ with probability 1/6
$\log(3)$ with probability 1/3
You stop this process when your sum exceeds $\log(10^5)$ at which point you look at how many throws you have made. The number of throws it took you to reach that point is $N$^
My calculator tells me that the mean of your increments is: $\approx 0.48$ and that the variance is $\approx 0.25$. For reference, the ending point is at $\approx 11.51$ so we'll reach him in roughly 24 steps
Conditional on the fact that we have done 25 steps, the distribution of the sum is roughly a Gaussian centered at 12.0 and with variance 6.25. This gives us a rough Gaussian approximation of $p(N\geq25)\approx 0.5 $
You'd need to look at the cumulants of the sum at N=25 to know whether or not the Gaussian approximation is allright. Given that the increments aren't symmetric, the approx might not be the best | Sum of coefficients of multinomial distribution
Let's do a normal approximation.
First, let's rephrase completely your problem in logs. You start at 0 at time t=0. Then, at each time step, you add:
0 with probability 1/2
$\log(2)$ with probability |
29,721 | Why is Wald's decision theory not universally recognized as the foundation of statistics? | I think whuber gave excellent insight in the comments.
An inadmissible estimator might be dominated by an estimator that takes a long time to compute in practice. Thus, when we expand the utility function to include not just statistical loss (square loss, for example), we might wind up with a dramatically different view of an estimator.
Expanding on this, if we include other (perhaps intangible) facets in our utility function, such as ease of explanation, it might be that the estimator called inadmissible by statistics actually works very well, considering all components: statistical, computational, and interpretability. A modest score on the statistical loss might be made up for when it comes to computational tractability and/or ease of interpretation for explaining results to customers, investors, etc. | Why is Wald's decision theory not universally recognized as the foundation of statistics? | I think whuber gave excellent insight in the comments.
An inadmissible estimator might be dominated by an estimator that takes a long time to compute in practice. Thus, when we expand the utility func | Why is Wald's decision theory not universally recognized as the foundation of statistics?
I think whuber gave excellent insight in the comments.
An inadmissible estimator might be dominated by an estimator that takes a long time to compute in practice. Thus, when we expand the utility function to include not just statistical loss (square loss, for example), we might wind up with a dramatically different view of an estimator.
Expanding on this, if we include other (perhaps intangible) facets in our utility function, such as ease of explanation, it might be that the estimator called inadmissible by statistics actually works very well, considering all components: statistical, computational, and interpretability. A modest score on the statistical loss might be made up for when it comes to computational tractability and/or ease of interpretation for explaining results to customers, investors, etc. | Why is Wald's decision theory not universally recognized as the foundation of statistics?
I think whuber gave excellent insight in the comments.
An inadmissible estimator might be dominated by an estimator that takes a long time to compute in practice. Thus, when we expand the utility func |
29,722 | When do we use gblinear versus gbtree? | If we think that we should be using a gradient boosting implementation like XGBoost, the answer on when to use gblinear instead of gbtree is: "probably never". With gblinear we will get an elastic-net fit equivalent and essentially create a single linear regularised model. Unless we are dealing with a task we would expect/know that a LASSO/ridge/elastic-net regression is already competitive, it does not worth our trouble aside maybe if we have already in place a data pipeline serving an XGBoost model and we want to try a GLM quickly. That said though, R, Python, MATLAB, Julia, etc. have better and more well-developed specialised routines to fit elastic-net regression tasks.The CV.SE thread: Difference in regression coefficients of sklearn's LinearRegression and XGBRegressor provides further details on comparing XGBoost's gblinear to a standard linear regression.
Note if we believe some linear relation to be present at a low/local level, LightGBM's argument lineartree is emulating the methodology of Cubist (or M5) where a tree is grown such that the terminal leaves contain linear regression models. This is structurally different to gblinear though as it is first and foremost a tree rather than a regularised linear model. | When do we use gblinear versus gbtree? | If we think that we should be using a gradient boosting implementation like XGBoost, the answer on when to use gblinear instead of gbtree is: "probably never". With gblinear we will get an elastic-ne | When do we use gblinear versus gbtree?
If we think that we should be using a gradient boosting implementation like XGBoost, the answer on when to use gblinear instead of gbtree is: "probably never". With gblinear we will get an elastic-net fit equivalent and essentially create a single linear regularised model. Unless we are dealing with a task we would expect/know that a LASSO/ridge/elastic-net regression is already competitive, it does not worth our trouble aside maybe if we have already in place a data pipeline serving an XGBoost model and we want to try a GLM quickly. That said though, R, Python, MATLAB, Julia, etc. have better and more well-developed specialised routines to fit elastic-net regression tasks.The CV.SE thread: Difference in regression coefficients of sklearn's LinearRegression and XGBRegressor provides further details on comparing XGBoost's gblinear to a standard linear regression.
Note if we believe some linear relation to be present at a low/local level, LightGBM's argument lineartree is emulating the methodology of Cubist (or M5) where a tree is grown such that the terminal leaves contain linear regression models. This is structurally different to gblinear though as it is first and foremost a tree rather than a regularised linear model. | When do we use gblinear versus gbtree?
If we think that we should be using a gradient boosting implementation like XGBoost, the answer on when to use gblinear instead of gbtree is: "probably never". With gblinear we will get an elastic-ne |
29,723 | Does EM algorithm consistently estimate the parameters in Gaussian Mixture model? | If the algorithm is initialized with random values each time, then no, the convergence will not necessarily be consistent. Non-random initialization will presumably produce the same result every time, but I don't believe that this would necessary produce the "correct" values of $\mu_k$.
As an aside, by fixing the mixing ratio to $1/K$ and fixing $\Sigma$ to be diagonal, the algorithm becomes very similar to the $k$-means algorithm. This also has inconsistent convergence, depending on the random initialization. | Does EM algorithm consistently estimate the parameters in Gaussian Mixture model? | If the algorithm is initialized with random values each time, then no, the convergence will not necessarily be consistent. Non-random initialization will presumably produce the same result every time, | Does EM algorithm consistently estimate the parameters in Gaussian Mixture model?
If the algorithm is initialized with random values each time, then no, the convergence will not necessarily be consistent. Non-random initialization will presumably produce the same result every time, but I don't believe that this would necessary produce the "correct" values of $\mu_k$.
As an aside, by fixing the mixing ratio to $1/K$ and fixing $\Sigma$ to be diagonal, the algorithm becomes very similar to the $k$-means algorithm. This also has inconsistent convergence, depending on the random initialization. | Does EM algorithm consistently estimate the parameters in Gaussian Mixture model?
If the algorithm is initialized with random values each time, then no, the convergence will not necessarily be consistent. Non-random initialization will presumably produce the same result every time, |
29,724 | Regression results have unexpected upper bound | Your dep var is bounded between 0 and 1 and thus OLS is not fully appropriate, I suggest beta regression for instance, and there may be other methods.
But secondly, after your box-cox transformation, you say that your predictions are bounded, but your graph doesn't show that. | Regression results have unexpected upper bound | Your dep var is bounded between 0 and 1 and thus OLS is not fully appropriate, I suggest beta regression for instance, and there may be other methods.
But secondly, after your box-cox transformation, | Regression results have unexpected upper bound
Your dep var is bounded between 0 and 1 and thus OLS is not fully appropriate, I suggest beta regression for instance, and there may be other methods.
But secondly, after your box-cox transformation, you say that your predictions are bounded, but your graph doesn't show that. | Regression results have unexpected upper bound
Your dep var is bounded between 0 and 1 and thus OLS is not fully appropriate, I suggest beta regression for instance, and there may be other methods.
But secondly, after your box-cox transformation, |
29,725 | Regression results have unexpected upper bound | While there is a lot of focus on using regressions that obey the bounds of 0/1, and this is reasonable (and important!), the specific question of why your LPM does not predict results greater than 0.8 strikes me as a slightly different question.
In either case, there is a noted pattern in your residuals, namely, your linear model fits the upper tail of your distribution poorly. This means there is something nonlinear about the correct model.
Solutions that also consider the 0/1 bound of your data: probit, logit, and beta regression. This bound is critical and must be addressed for your work to be rigorous, given your relatively close to 1 distribution, and thus the large number of answers on that topic.
Usually, though, the problem is that a LPM exceeds the 0/1 bound. This is not the case here! If you are not concerned with the 0/1 bound and actively want a solution that can be fitted with (x'x)^-1(x'y), then consider that perhaps the model is not stictly linear. Fitting the model as a function of x^2, cross products of independent variables, or logs of independent variables can help improve your fit and possibly improve the explanatory power of your model so that it estimates values greater than 0.8. | Regression results have unexpected upper bound | While there is a lot of focus on using regressions that obey the bounds of 0/1, and this is reasonable (and important!), the specific question of why your LPM does not predict results greater than 0.8 | Regression results have unexpected upper bound
While there is a lot of focus on using regressions that obey the bounds of 0/1, and this is reasonable (and important!), the specific question of why your LPM does not predict results greater than 0.8 strikes me as a slightly different question.
In either case, there is a noted pattern in your residuals, namely, your linear model fits the upper tail of your distribution poorly. This means there is something nonlinear about the correct model.
Solutions that also consider the 0/1 bound of your data: probit, logit, and beta regression. This bound is critical and must be addressed for your work to be rigorous, given your relatively close to 1 distribution, and thus the large number of answers on that topic.
Usually, though, the problem is that a LPM exceeds the 0/1 bound. This is not the case here! If you are not concerned with the 0/1 bound and actively want a solution that can be fitted with (x'x)^-1(x'y), then consider that perhaps the model is not stictly linear. Fitting the model as a function of x^2, cross products of independent variables, or logs of independent variables can help improve your fit and possibly improve the explanatory power of your model so that it estimates values greater than 0.8. | Regression results have unexpected upper bound
While there is a lot of focus on using regressions that obey the bounds of 0/1, and this is reasonable (and important!), the specific question of why your LPM does not predict results greater than 0.8 |
29,726 | What's the distinction between a "Null hypothesis statistical test" and any other test? | Background: The editorial in question is this one from Basic and Applied Social Psychology, a journal with a 2015 impact factor of 1.168, i.e., not highly quotable.
Re: OP question, i.e., Is an NHSTP something different from a "test of hypothesis" or a "significance test"? The applicable editorial statements are
1) "...the null hypothesis significance testing procedure (NHSTP) is invalid..." [Sic, with alpha = 0.05]
2) "...authors will have to remove all vestiges of the NHSTP (p-values, t-values, F-values, statements about ‘‘significant’’ differences or lack thereof, and so on)."
3) "...confidence intervals [Sic, 95%] also are banned from BASP."
4) "...Bayesian procedures are neither required nor banned from BASP." [Sic, depends on which ones, they are either banned or not.]
5) "Are any inferential statistical procedures required?...No..."
The motivation offered for this is in part "...the $p<.05$ bar is too easy to pass and sometimes serves as an excuse for lower quality research. We hope and anticipate that banning the NHSTP will have the effect of increasing the quality of submitted manuscripts by liberating authors from the stultified structure of NHSTP thinking thereby eliminating an important obstacle to creative thinking."
Answer to OP: These editors would probably claim a test of significance is often an improper test of hypothesis. For example, they state that "...Bayesian proposals that at least somewhat circumvent the Laplacian assumption [Sic, I know nothing a priori]...[such that] there might even be cases where there are strong grounds for assuming that the numbers really are there..." This relates in part to the Fisher versus Neyman and Pearson argument as pointed out above by @Livid and for which the editorial would side with Fisher.
Discussion: I am a firm believer in intellectual humility as a fundamental, and indispensable tenet of scientific method. If I, as a researcher, am not allowed to proceed from an assumption-less initial premise in which all prior theory is disbelieved, then I will lose all of my ability to examine data with a creative and open mind. The premise that all numerical processing must be absolute truth is an exposition of cupidity that is sublime. The only truth is data, and I would humbly paraphrase Box by stating that all models are false, especially and most certainly those that presume that any truth arises from anything that is not identically the data itself. That does not mean that I have to choose between Fisher and Neyman/Pearson, rather that I firmly believe neither premise taken alone, but rather examine things exhaustively until my hypotheses are supported and/or rejected to self-consistency of the ensemble. Only self-consistency can be used as a criterion, as no analysis can reveal an absolute truth.
My way of doing things is not for everyone. Many prefer to plan testing in a rigid controlled experiment design that I would call 'top down'. However, controlled experiments are inefficient for data mining, pattern recognition, and generating hypotheses. They are useful for testing narrow questions, and that is when the controversy about NHSTP can arise. Without supporting evidence, e.g., an entire structure of self-consistency to rely on, any one test is open to criticism. This might be considered as Bonferroni in reverse; if multiple tests lead to an inescapably self-consistent ensemble, the chance of the ensemble occurring by chance alone is diminished. In planning experiments for psychology, the nonsense about not using $p<0.05$ is due to not also testing all of the implications of any particular test outcome, and if one cannot tolerate a type I error of $0.05$ because the experimental design is so rigid, restricted and narrow, then use $0.001$. However, to ban a particular statistical method because it is being used mindlessly and that mindless work passes muster when reviewed merely means that the editors are not identifying low quality work prior to agreeing to review it, and do not approach qualified reviewers. Certainly one cannot establish a reasonable conviction based on a single piece of circumstantial evidence. Rather, an ensemble of circumstantial evidence leads to a reasonable conviction. Eliminating an entire category of evidence because it is circumstantial will not improve a journal's content. | What's the distinction between a "Null hypothesis statistical test" and any other test? | Background: The editorial in question is this one from Basic and Applied Social Psychology, a journal with a 2015 impact factor of 1.168, i.e., not highly quotable.
Re: OP question, i.e., Is an NHSTP | What's the distinction between a "Null hypothesis statistical test" and any other test?
Background: The editorial in question is this one from Basic and Applied Social Psychology, a journal with a 2015 impact factor of 1.168, i.e., not highly quotable.
Re: OP question, i.e., Is an NHSTP something different from a "test of hypothesis" or a "significance test"? The applicable editorial statements are
1) "...the null hypothesis significance testing procedure (NHSTP) is invalid..." [Sic, with alpha = 0.05]
2) "...authors will have to remove all vestiges of the NHSTP (p-values, t-values, F-values, statements about ‘‘significant’’ differences or lack thereof, and so on)."
3) "...confidence intervals [Sic, 95%] also are banned from BASP."
4) "...Bayesian procedures are neither required nor banned from BASP." [Sic, depends on which ones, they are either banned or not.]
5) "Are any inferential statistical procedures required?...No..."
The motivation offered for this is in part "...the $p<.05$ bar is too easy to pass and sometimes serves as an excuse for lower quality research. We hope and anticipate that banning the NHSTP will have the effect of increasing the quality of submitted manuscripts by liberating authors from the stultified structure of NHSTP thinking thereby eliminating an important obstacle to creative thinking."
Answer to OP: These editors would probably claim a test of significance is often an improper test of hypothesis. For example, they state that "...Bayesian proposals that at least somewhat circumvent the Laplacian assumption [Sic, I know nothing a priori]...[such that] there might even be cases where there are strong grounds for assuming that the numbers really are there..." This relates in part to the Fisher versus Neyman and Pearson argument as pointed out above by @Livid and for which the editorial would side with Fisher.
Discussion: I am a firm believer in intellectual humility as a fundamental, and indispensable tenet of scientific method. If I, as a researcher, am not allowed to proceed from an assumption-less initial premise in which all prior theory is disbelieved, then I will lose all of my ability to examine data with a creative and open mind. The premise that all numerical processing must be absolute truth is an exposition of cupidity that is sublime. The only truth is data, and I would humbly paraphrase Box by stating that all models are false, especially and most certainly those that presume that any truth arises from anything that is not identically the data itself. That does not mean that I have to choose between Fisher and Neyman/Pearson, rather that I firmly believe neither premise taken alone, but rather examine things exhaustively until my hypotheses are supported and/or rejected to self-consistency of the ensemble. Only self-consistency can be used as a criterion, as no analysis can reveal an absolute truth.
My way of doing things is not for everyone. Many prefer to plan testing in a rigid controlled experiment design that I would call 'top down'. However, controlled experiments are inefficient for data mining, pattern recognition, and generating hypotheses. They are useful for testing narrow questions, and that is when the controversy about NHSTP can arise. Without supporting evidence, e.g., an entire structure of self-consistency to rely on, any one test is open to criticism. This might be considered as Bonferroni in reverse; if multiple tests lead to an inescapably self-consistent ensemble, the chance of the ensemble occurring by chance alone is diminished. In planning experiments for psychology, the nonsense about not using $p<0.05$ is due to not also testing all of the implications of any particular test outcome, and if one cannot tolerate a type I error of $0.05$ because the experimental design is so rigid, restricted and narrow, then use $0.001$. However, to ban a particular statistical method because it is being used mindlessly and that mindless work passes muster when reviewed merely means that the editors are not identifying low quality work prior to agreeing to review it, and do not approach qualified reviewers. Certainly one cannot establish a reasonable conviction based on a single piece of circumstantial evidence. Rather, an ensemble of circumstantial evidence leads to a reasonable conviction. Eliminating an entire category of evidence because it is circumstantial will not improve a journal's content. | What's the distinction between a "Null hypothesis statistical test" and any other test?
Background: The editorial in question is this one from Basic and Applied Social Psychology, a journal with a 2015 impact factor of 1.168, i.e., not highly quotable.
Re: OP question, i.e., Is an NHSTP |
29,727 | Maximum likelihood estimator for minimum of exponential distributions | I don't have enough points to comment, so I will write here.
I think the problem you post can be viewed from a survival analysis perspective, if you consider the following:
$X_i$: True survival time,
$Y_i$: Censoring time,
Both have an exponential distribution with $X$ and $Y$ independent. Then $Z_i$ is the observed survival time and $W_i$ the censoring indicator.
If you are familiar with survival analysis, I believe you can start from this point.
Notes: A good source: Analysis of Survival Data by D.R.Cox and D.Oakes
Below is an example:
Assuming the p.d.f of the survival time distribution is $f(t)=\rho e^{-\rho t}$. Then the survival function is: $S(t)=e^{-\rho t}$. And the log-likelihood is:
$\mathcal{l}= \sum_u \log f(z_i) + \sum_c \log S(z_i)$
with summation over uncensored people ($u$) and censored people ($c$) respectively.
Due to the fact that $f(t)=h(t)S(t)$ where h(t) is the hazard function, this can be written:
$\mathcal{l}= \sum_u \log h(z_i) + \sum \log S(z_i)$
$\mathcal{l}= \sum_u \log \rho - \rho \sum z_i$
And the maximum likelihood estimator $\hat{\rho}$ of $\rho$ is:
$\hat{\rho}=d/\sum z_i$ where $d$ is the total number of cases of $W_i=1$ | Maximum likelihood estimator for minimum of exponential distributions | I don't have enough points to comment, so I will write here.
I think the problem you post can be viewed from a survival analysis perspective, if you consider the following:
$X_i$: True survival time,
| Maximum likelihood estimator for minimum of exponential distributions
I don't have enough points to comment, so I will write here.
I think the problem you post can be viewed from a survival analysis perspective, if you consider the following:
$X_i$: True survival time,
$Y_i$: Censoring time,
Both have an exponential distribution with $X$ and $Y$ independent. Then $Z_i$ is the observed survival time and $W_i$ the censoring indicator.
If you are familiar with survival analysis, I believe you can start from this point.
Notes: A good source: Analysis of Survival Data by D.R.Cox and D.Oakes
Below is an example:
Assuming the p.d.f of the survival time distribution is $f(t)=\rho e^{-\rho t}$. Then the survival function is: $S(t)=e^{-\rho t}$. And the log-likelihood is:
$\mathcal{l}= \sum_u \log f(z_i) + \sum_c \log S(z_i)$
with summation over uncensored people ($u$) and censored people ($c$) respectively.
Due to the fact that $f(t)=h(t)S(t)$ where h(t) is the hazard function, this can be written:
$\mathcal{l}= \sum_u \log h(z_i) + \sum \log S(z_i)$
$\mathcal{l}= \sum_u \log \rho - \rho \sum z_i$
And the maximum likelihood estimator $\hat{\rho}$ of $\rho$ is:
$\hat{\rho}=d/\sum z_i$ where $d$ is the total number of cases of $W_i=1$ | Maximum likelihood estimator for minimum of exponential distributions
I don't have enough points to comment, so I will write here.
I think the problem you post can be viewed from a survival analysis perspective, if you consider the following:
$X_i$: True survival time,
|
29,728 | Should I check the z-score if the p-value of Local Moran's I is significant? | As I understand it .. and I would be happy to be corrected .. the local Morans I looks for spatial autocorrelation in local values (i.e. relative to the adjacent areas), abit like a GeoWeighted version of Global Morans I. As compared with say Gettis Ord which identifies spatial clusters of globally extreme values.
If so the result would seem to accord with your map, significant Z for the small region of very high incomes, while the blue area is only a broad basin within a more gradual local surface.
So the importance of the Z value depends if you are just looking for clusters of high and low incomes, or looking for clusters with steep boundaries e.g if comparing actual vs perceived income inequality? | Should I check the z-score if the p-value of Local Moran's I is significant? | As I understand it .. and I would be happy to be corrected .. the local Morans I looks for spatial autocorrelation in local values (i.e. relative to the adjacent areas), abit like a GeoWeighted versio | Should I check the z-score if the p-value of Local Moran's I is significant?
As I understand it .. and I would be happy to be corrected .. the local Morans I looks for spatial autocorrelation in local values (i.e. relative to the adjacent areas), abit like a GeoWeighted version of Global Morans I. As compared with say Gettis Ord which identifies spatial clusters of globally extreme values.
If so the result would seem to accord with your map, significant Z for the small region of very high incomes, while the blue area is only a broad basin within a more gradual local surface.
So the importance of the Z value depends if you are just looking for clusters of high and low incomes, or looking for clusters with steep boundaries e.g if comparing actual vs perceived income inequality? | Should I check the z-score if the p-value of Local Moran's I is significant?
As I understand it .. and I would be happy to be corrected .. the local Morans I looks for spatial autocorrelation in local values (i.e. relative to the adjacent areas), abit like a GeoWeighted versio |
29,729 | An intuitive meaning of the area under the PR curve? [duplicate] | The area under the PR-Curve is ill-defined. Because there is no well-defined precision at recall 0: you get a division by zero there.
You also cannot close this gap easily - it may be anything from 0 to 1, depending on how well your retrieval works.
There is a common approximation to this - AveP, average precision. | An intuitive meaning of the area under the PR curve? [duplicate] | The area under the PR-Curve is ill-defined. Because there is no well-defined precision at recall 0: you get a division by zero there.
You also cannot close this gap easily - it may be anything from 0 | An intuitive meaning of the area under the PR curve? [duplicate]
The area under the PR-Curve is ill-defined. Because there is no well-defined precision at recall 0: you get a division by zero there.
You also cannot close this gap easily - it may be anything from 0 to 1, depending on how well your retrieval works.
There is a common approximation to this - AveP, average precision. | An intuitive meaning of the area under the PR curve? [duplicate]
The area under the PR-Curve is ill-defined. Because there is no well-defined precision at recall 0: you get a division by zero there.
You also cannot close this gap easily - it may be anything from 0 |
29,730 | An intuitive meaning of the area under the PR curve? [duplicate] | Well, I will try to give some intuition close to the one of Wikipedia as you may desire. The PR-AUC can be thought of as the probability that a classifier will rank a randomly chosen "positive" instance (from the retrieved predictions) higher than a randomly chosen "positive" one (from the original positive class). It should be noted that this is based on my own interpretation and may be subject to error.
In another Wikipedia page, the following text is relevant "precision (also called positive predictive value) is the fraction of retrieved instances that are relevant, while recall (also known as sensitivity) is the fraction of relevant instances that are retrieved".
PR-Curve is a very important metric, especially, when dealing with imbalance datasets. I would advise looking at this study for further details.
From a different persepctive, I would say that when both sensitivity and precision are of importance to the experimenter, then we can think of them as exploration and exploitation terms, respectively. Basically, you may limit strictly the threshold of predictions over the positive class, allowing a very high precision but at the cost of less exploration (i.e. lower sensitivity) (or new insights about the the positive class). Relaxing this constraint, can allow for exploring those cases that we predict as positives and never thought they are.
One would want to always maximize both but for certain cases, this might be very difficult and in some applications, sacrificing one towards enhancing the other is preferable. | An intuitive meaning of the area under the PR curve? [duplicate] | Well, I will try to give some intuition close to the one of Wikipedia as you may desire. The PR-AUC can be thought of as the probability that a classifier will rank a randomly chosen "positive" instan | An intuitive meaning of the area under the PR curve? [duplicate]
Well, I will try to give some intuition close to the one of Wikipedia as you may desire. The PR-AUC can be thought of as the probability that a classifier will rank a randomly chosen "positive" instance (from the retrieved predictions) higher than a randomly chosen "positive" one (from the original positive class). It should be noted that this is based on my own interpretation and may be subject to error.
In another Wikipedia page, the following text is relevant "precision (also called positive predictive value) is the fraction of retrieved instances that are relevant, while recall (also known as sensitivity) is the fraction of relevant instances that are retrieved".
PR-Curve is a very important metric, especially, when dealing with imbalance datasets. I would advise looking at this study for further details.
From a different persepctive, I would say that when both sensitivity and precision are of importance to the experimenter, then we can think of them as exploration and exploitation terms, respectively. Basically, you may limit strictly the threshold of predictions over the positive class, allowing a very high precision but at the cost of less exploration (i.e. lower sensitivity) (or new insights about the the positive class). Relaxing this constraint, can allow for exploring those cases that we predict as positives and never thought they are.
One would want to always maximize both but for certain cases, this might be very difficult and in some applications, sacrificing one towards enhancing the other is preferable. | An intuitive meaning of the area under the PR curve? [duplicate]
Well, I will try to give some intuition close to the one of Wikipedia as you may desire. The PR-AUC can be thought of as the probability that a classifier will rank a randomly chosen "positive" instan |
29,731 | Variance inflation factor for generalized additive models | There is a function in r corvif() which can be found in AED package. For examples and references see Zuur et al. 2009. Mixed Effects Models and Extensions in Ecology with R pp. 386-387. The code for the package is available from the book website http://www.highstat.com/book2.htm. | Variance inflation factor for generalized additive models | There is a function in r corvif() which can be found in AED package. For examples and references see Zuur et al. 2009. Mixed Effects Models and Extensions in Ecology with R pp. 386-387. The code f | Variance inflation factor for generalized additive models
There is a function in r corvif() which can be found in AED package. For examples and references see Zuur et al. 2009. Mixed Effects Models and Extensions in Ecology with R pp. 386-387. The code for the package is available from the book website http://www.highstat.com/book2.htm. | Variance inflation factor for generalized additive models
There is a function in r corvif() which can be found in AED package. For examples and references see Zuur et al. 2009. Mixed Effects Models and Extensions in Ecology with R pp. 386-387. The code f |
29,732 | How to compare repeatability (ICC) of different groups? | Leaving aside material issues about the study question and demo data (and sample size for getting a reasonable estimate of an ICC), the output you are getting from the ICCest function has confidence intervals attached: as a starting point for comparing groups, you could consider whether there is overlap between each confidence interval and the other group's point estimate of the ICC.
At any rate, reporting the point estimate of the ICC and the confidence interval for each group is going to be more useful (and hence I'd recommend reporting these in any instance) than reporting just the point estimates and the result of some kind of hypothesis test.
dummy <- structure(list(ID = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L),
gr = c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L),
day = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L),
behaviour = c(0.361, 0.232, 0.24, 0.693, 0.483, 0.267, 0.18, 0.515, 0.485,
0.567, 0, 0.324, 0.055, 0.407, 0.422, 0.174, 0.613, 0.311,
0.631, 0.283, 0.512, 0.127, 0, 0)),
.Names = c("ID", "gr", "day", "behaviour"),
class = "data.frame", row.names = c(NA, -24L))
library(ICC)
ICCest(ID, behaviour, data=dummy[dummy$gr=="1",])
# First few lines of console output:
#$ICC
#[1] -0.1317788
#$LowerCI
#[1] -0.7728603
#$UpperCI
#[1] 0.6851783
ICCest(ID, behaviour, data=dummy[dummy$gr=="2",])
# First few lines of console output:
#$ICC
#[1] 0.1934523
#$LowerCI
#[1] -0.6036826
#$UpperCI
#[1] 0.8233986 | How to compare repeatability (ICC) of different groups? | Leaving aside material issues about the study question and demo data (and sample size for getting a reasonable estimate of an ICC), the output you are getting from the ICCest function has confidence i | How to compare repeatability (ICC) of different groups?
Leaving aside material issues about the study question and demo data (and sample size for getting a reasonable estimate of an ICC), the output you are getting from the ICCest function has confidence intervals attached: as a starting point for comparing groups, you could consider whether there is overlap between each confidence interval and the other group's point estimate of the ICC.
At any rate, reporting the point estimate of the ICC and the confidence interval for each group is going to be more useful (and hence I'd recommend reporting these in any instance) than reporting just the point estimates and the result of some kind of hypothesis test.
dummy <- structure(list(ID = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L),
gr = c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L),
day = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L),
behaviour = c(0.361, 0.232, 0.24, 0.693, 0.483, 0.267, 0.18, 0.515, 0.485,
0.567, 0, 0.324, 0.055, 0.407, 0.422, 0.174, 0.613, 0.311,
0.631, 0.283, 0.512, 0.127, 0, 0)),
.Names = c("ID", "gr", "day", "behaviour"),
class = "data.frame", row.names = c(NA, -24L))
library(ICC)
ICCest(ID, behaviour, data=dummy[dummy$gr=="1",])
# First few lines of console output:
#$ICC
#[1] -0.1317788
#$LowerCI
#[1] -0.7728603
#$UpperCI
#[1] 0.6851783
ICCest(ID, behaviour, data=dummy[dummy$gr=="2",])
# First few lines of console output:
#$ICC
#[1] 0.1934523
#$LowerCI
#[1] -0.6036826
#$UpperCI
#[1] 0.8233986 | How to compare repeatability (ICC) of different groups?
Leaving aside material issues about the study question and demo data (and sample size for getting a reasonable estimate of an ICC), the output you are getting from the ICCest function has confidence i |
29,733 | Test if people drop out or decrease bets after repeated losses | It almost seems "obvious by looking" that losers were more apt to drop out than winners.
You could try a set of contingency tables to establish whether the above is statistically significant. For instance, of the 450 winners of the first bet, 25 dropped out and 425 stayed and of the 550 losers, 150 dropped out and 400 stayed. Etc. | Test if people drop out or decrease bets after repeated losses | It almost seems "obvious by looking" that losers were more apt to drop out than winners.
You could try a set of contingency tables to establish whether the above is statistically significant. For ins | Test if people drop out or decrease bets after repeated losses
It almost seems "obvious by looking" that losers were more apt to drop out than winners.
You could try a set of contingency tables to establish whether the above is statistically significant. For instance, of the 450 winners of the first bet, 25 dropped out and 425 stayed and of the 550 losers, 150 dropped out and 400 stayed. Etc. | Test if people drop out or decrease bets after repeated losses
It almost seems "obvious by looking" that losers were more apt to drop out than winners.
You could try a set of contingency tables to establish whether the above is statistically significant. For ins |
29,734 | Test if people drop out or decrease bets after repeated losses | This response will probably be a bit off topic, but I'll start with what's on topic. If I were asked specifically to determine whether the change in mean bet size from WW to WWW were significant, I would ignore the people who did not reach both of these nodes. If the goal of this analysis is to be able to make predictions for future behaviour, then the mechanics of the trial, should do well to emulate the mechanics of future behaviour, even if the game is not a game of chance. What is the point of measuring how someone's bet would change from WW to WWW if they're not the type of person to go from WW to WWW.
That being said, in general we obviously don't like to systematically exclude certain populations. If I were given this data I would focus on the more doable types of analysis. Most notably (especially if this is not a game of chance) the players at a similar node have a lot in common. They have had the same sequence of (W,L) and have no left. Answering questions along the lines of "What is the effect of losing a giving round on bet size and attrition," is quite doable while controlling for the node dependent behaviour, in the form of a multi-level model.
A last piece of advice would be to focus on player level differences from round to round. The mean bet going down by 5 cents after a bit may be statistically insignificant, while 90% of the players bets going down probably will be. | Test if people drop out or decrease bets after repeated losses | This response will probably be a bit off topic, but I'll start with what's on topic. If I were asked specifically to determine whether the change in mean bet size from WW to WWW were significant, I w | Test if people drop out or decrease bets after repeated losses
This response will probably be a bit off topic, but I'll start with what's on topic. If I were asked specifically to determine whether the change in mean bet size from WW to WWW were significant, I would ignore the people who did not reach both of these nodes. If the goal of this analysis is to be able to make predictions for future behaviour, then the mechanics of the trial, should do well to emulate the mechanics of future behaviour, even if the game is not a game of chance. What is the point of measuring how someone's bet would change from WW to WWW if they're not the type of person to go from WW to WWW.
That being said, in general we obviously don't like to systematically exclude certain populations. If I were given this data I would focus on the more doable types of analysis. Most notably (especially if this is not a game of chance) the players at a similar node have a lot in common. They have had the same sequence of (W,L) and have no left. Answering questions along the lines of "What is the effect of losing a giving round on bet size and attrition," is quite doable while controlling for the node dependent behaviour, in the form of a multi-level model.
A last piece of advice would be to focus on player level differences from round to round. The mean bet going down by 5 cents after a bit may be statistically insignificant, while 90% of the players bets going down probably will be. | Test if people drop out or decrease bets after repeated losses
This response will probably be a bit off topic, but I'll start with what's on topic. If I were asked specifically to determine whether the change in mean bet size from WW to WWW were significant, I w |
29,735 | Measuring some of the patients more than once | Take a look at paper of Brennan (1992) on Generalizability Theory or his book, also titled "Generalizability Theory" (2010, Springer). Brennan writes about GT using ANOVA, but mixed models could be used the same way - and many would consider them as a more recent method.
You could think of a mixed model for cross-classified data (e.g. Raudenbush, 1993). Say you have $N$ patients measured by $R$ researchers, and your measurement is denoted as $X_{ij}$ for $i = 1,...,N$ and $j = 1,...,R$. In this case, the measurement has both effects of patients and researchers, with patients "nested" in researchers (multiple measures for a single patient) and researchers "nested" in patients (multiple measurements for each patient), so
$$ X_{ij} = \beta_0 + b_i + b_j + \varepsilon_{ij} $$
where $\beta_0$ is an fixed intercept (if the data is not centered), $b_i$ is patient random effect (random intercept) and $b_j$ is a researcher random effect, while $\varepsilon_{ij}$ is an error term. In lme4 this would be
x ~ (1|patient) + (1|researcher)
you could extend this approach to using $X$ as an independent variable or define a hierarchical Bayesian model where you include both sources of variability. | Measuring some of the patients more than once | Take a look at paper of Brennan (1992) on Generalizability Theory or his book, also titled "Generalizability Theory" (2010, Springer). Brennan writes about GT using ANOVA, but mixed models could be us | Measuring some of the patients more than once
Take a look at paper of Brennan (1992) on Generalizability Theory or his book, also titled "Generalizability Theory" (2010, Springer). Brennan writes about GT using ANOVA, but mixed models could be used the same way - and many would consider them as a more recent method.
You could think of a mixed model for cross-classified data (e.g. Raudenbush, 1993). Say you have $N$ patients measured by $R$ researchers, and your measurement is denoted as $X_{ij}$ for $i = 1,...,N$ and $j = 1,...,R$. In this case, the measurement has both effects of patients and researchers, with patients "nested" in researchers (multiple measures for a single patient) and researchers "nested" in patients (multiple measurements for each patient), so
$$ X_{ij} = \beta_0 + b_i + b_j + \varepsilon_{ij} $$
where $\beta_0$ is an fixed intercept (if the data is not centered), $b_i$ is patient random effect (random intercept) and $b_j$ is a researcher random effect, while $\varepsilon_{ij}$ is an error term. In lme4 this would be
x ~ (1|patient) + (1|researcher)
you could extend this approach to using $X$ as an independent variable or define a hierarchical Bayesian model where you include both sources of variability. | Measuring some of the patients more than once
Take a look at paper of Brennan (1992) on Generalizability Theory or his book, also titled "Generalizability Theory" (2010, Springer). Brennan writes about GT using ANOVA, but mixed models could be us |
29,736 | Measuring some of the patients more than once | I will take a poke at this even though I can only provide a mathematical model, as I am a bit of a math nerd, but not a statistician.
Kalman Filters can handle state estimation with multiple-inputs and missing information.
If I had to show this to engineers, they would require me to make variability plots of measures between measuring-technicians to show there is no operator-to-operator variability. They would treat two measurements as paired. Stats folks are good at this. If the operator-to-operator variability was negligible then I could formulate my data with each as a single line.
[... measurement_1 ... result]
[... measurement_2 ... result]
if only one technician made the measurement there would be only one line of data
otherwise, I would want to have an indication of operator within the data
[... operatorname measurement ... result]
If you can characterize the difference each operator has on the same measurement, then you can account for it in your model. If you don't supply an indicator of operator, when it is a significant source of variability ... that could be a problem.
The data model informs the mathematic model. I think GLM's have had good results in these areas. http://www.uta.edu/faculty/sawasthi/Statistics/stglm.html | Measuring some of the patients more than once | I will take a poke at this even though I can only provide a mathematical model, as I am a bit of a math nerd, but not a statistician.
Kalman Filters can handle state estimation with multiple-inputs an | Measuring some of the patients more than once
I will take a poke at this even though I can only provide a mathematical model, as I am a bit of a math nerd, but not a statistician.
Kalman Filters can handle state estimation with multiple-inputs and missing information.
If I had to show this to engineers, they would require me to make variability plots of measures between measuring-technicians to show there is no operator-to-operator variability. They would treat two measurements as paired. Stats folks are good at this. If the operator-to-operator variability was negligible then I could formulate my data with each as a single line.
[... measurement_1 ... result]
[... measurement_2 ... result]
if only one technician made the measurement there would be only one line of data
otherwise, I would want to have an indication of operator within the data
[... operatorname measurement ... result]
If you can characterize the difference each operator has on the same measurement, then you can account for it in your model. If you don't supply an indicator of operator, when it is a significant source of variability ... that could be a problem.
The data model informs the mathematic model. I think GLM's have had good results in these areas. http://www.uta.edu/faculty/sawasthi/Statistics/stglm.html | Measuring some of the patients more than once
I will take a poke at this even though I can only provide a mathematical model, as I am a bit of a math nerd, but not a statistician.
Kalman Filters can handle state estimation with multiple-inputs an |
29,737 | Measuring some of the patients more than once | I am also coming at this question from a different field. Regardless, it sounds to me like the purpose of having multiple people use the measuring device is to be able to account for measurement error? If I am correct in my understanding of what you are trying to do, then it sounds like a case for structural equation modeling (SEM), which would allow you to run your model free of measurement error. SEM can account for missing data if you use FIML estimation techniques, you have to make the usual assumptions about the missing data (i.e., at least missing at random). SEM models have been used increasingly in RCT settings, so I don't think it would be uncommon to use this technique. The question I'd have is: do you have enough information to make a properly identifiable SEM model? | Measuring some of the patients more than once | I am also coming at this question from a different field. Regardless, it sounds to me like the purpose of having multiple people use the measuring device is to be able to account for measurement error | Measuring some of the patients more than once
I am also coming at this question from a different field. Regardless, it sounds to me like the purpose of having multiple people use the measuring device is to be able to account for measurement error? If I am correct in my understanding of what you are trying to do, then it sounds like a case for structural equation modeling (SEM), which would allow you to run your model free of measurement error. SEM can account for missing data if you use FIML estimation techniques, you have to make the usual assumptions about the missing data (i.e., at least missing at random). SEM models have been used increasingly in RCT settings, so I don't think it would be uncommon to use this technique. The question I'd have is: do you have enough information to make a properly identifiable SEM model? | Measuring some of the patients more than once
I am also coming at this question from a different field. Regardless, it sounds to me like the purpose of having multiple people use the measuring device is to be able to account for measurement error |
29,738 | Build a path probability tree for journeys through a website | Isn't one way to start, is to have a $n \times n$ matrix (say $M_{n \times n}$) where $n$ is the number of pages. Then based on your raw data increment matrix element $M_{rc}$ by one whenever you have a user hop from page $r$ to page $c$. That gets you the transition probabilities.
Your first question is already answered by this: "What percent of users on homepage (say page 1) travel next to, say, Kitchen Items (say page 2)?"
$\frac{M_{12}}{ \sum_c M_{1c}}$
Or is this too simplistic? | Build a path probability tree for journeys through a website | Isn't one way to start, is to have a $n \times n$ matrix (say $M_{n \times n}$) where $n$ is the number of pages. Then based on your raw data increment matrix element $M_{rc}$ by one whenever you have | Build a path probability tree for journeys through a website
Isn't one way to start, is to have a $n \times n$ matrix (say $M_{n \times n}$) where $n$ is the number of pages. Then based on your raw data increment matrix element $M_{rc}$ by one whenever you have a user hop from page $r$ to page $c$. That gets you the transition probabilities.
Your first question is already answered by this: "What percent of users on homepage (say page 1) travel next to, say, Kitchen Items (say page 2)?"
$\frac{M_{12}}{ \sum_c M_{1c}}$
Or is this too simplistic? | Build a path probability tree for journeys through a website
Isn't one way to start, is to have a $n \times n$ matrix (say $M_{n \times n}$) where $n$ is the number of pages. Then based on your raw data increment matrix element $M_{rc}$ by one whenever you have |
29,739 | Build a path probability tree for journeys through a website | It looks like you are trying to recreate the PageRank algorithm of Google. Most of the PageRank algorithm was developed using Markov Chains. You can find a lot of mentions of developing PageRank methods in R.
igraph.sourceforge.net/doc/R/page.rank.htm | Build a path probability tree for journeys through a website | It looks like you are trying to recreate the PageRank algorithm of Google. Most of the PageRank algorithm was developed using Markov Chains. You can find a lot of mentions of developing PageRank met | Build a path probability tree for journeys through a website
It looks like you are trying to recreate the PageRank algorithm of Google. Most of the PageRank algorithm was developed using Markov Chains. You can find a lot of mentions of developing PageRank methods in R.
igraph.sourceforge.net/doc/R/page.rank.htm | Build a path probability tree for journeys through a website
It looks like you are trying to recreate the PageRank algorithm of Google. Most of the PageRank algorithm was developed using Markov Chains. You can find a lot of mentions of developing PageRank met |
29,740 | Build a path probability tree for journeys through a website | From what I see here, I agree that igraphs / Markov Chains is probably the way to go, however you could definitely use rpart and/or the partykit.
It's hard for me to give a simple answer with your limited example, but I can explain generally how you would do it.
You want look at where all your users had been, and summarize that into a string for example
"Home / product4 / product3 / product4 / buynow"
"Home / product3 / buynow"
"Home / product3 / product4"
You could then segment your users into categories, say ones who ended up in the "buy now" page, and ones who didn't. Then you could simply start predicting on that terminal result. In this example, maybe you would find out that people who did the most comparison shop did / didn't buy something.
You could also make more variables, like "what was the page before the buynow page" "how many pages did they visit before buying something" or "when did they create their first account", and you could add those metrics to your analysis.
There are a lot of different ways you could go, and this begins to answer different questions, but my point is that you could use the trees and for some problems it might be a faster and simpler route to insight.
By the way, you would need to make non-numeric variables factors by using factor or as.factor, if you're going to use party. Party has some nice vignettes to get you started. | Build a path probability tree for journeys through a website | From what I see here, I agree that igraphs / Markov Chains is probably the way to go, however you could definitely use rpart and/or the partykit.
It's hard for me to give a simple answer with your lim | Build a path probability tree for journeys through a website
From what I see here, I agree that igraphs / Markov Chains is probably the way to go, however you could definitely use rpart and/or the partykit.
It's hard for me to give a simple answer with your limited example, but I can explain generally how you would do it.
You want look at where all your users had been, and summarize that into a string for example
"Home / product4 / product3 / product4 / buynow"
"Home / product3 / buynow"
"Home / product3 / product4"
You could then segment your users into categories, say ones who ended up in the "buy now" page, and ones who didn't. Then you could simply start predicting on that terminal result. In this example, maybe you would find out that people who did the most comparison shop did / didn't buy something.
You could also make more variables, like "what was the page before the buynow page" "how many pages did they visit before buying something" or "when did they create their first account", and you could add those metrics to your analysis.
There are a lot of different ways you could go, and this begins to answer different questions, but my point is that you could use the trees and for some problems it might be a faster and simpler route to insight.
By the way, you would need to make non-numeric variables factors by using factor or as.factor, if you're going to use party. Party has some nice vignettes to get you started. | Build a path probability tree for journeys through a website
From what I see here, I agree that igraphs / Markov Chains is probably the way to go, however you could definitely use rpart and/or the partykit.
It's hard for me to give a simple answer with your lim |
29,741 | R and EViews differences in AR(1) estimates | Your NLLS has four ortoghonality conditions, one per variable plus the constant (analogue to normal equations in standard OLS) to solve for three parameters ($\rho, \beta, \alpha$ ). The Non-linear algorithms often have heterogenous configurations for tolerance parameters across softwares. MAy I suggest you drop $X_{t-1}$ from your equation in order to get exactly identified system and then test Eviews against R ? if both agree, it probably means one of them has troubles with the overidentification. | R and EViews differences in AR(1) estimates | Your NLLS has four ortoghonality conditions, one per variable plus the constant (analogue to normal equations in standard OLS) to solve for three parameters ($\rho, \beta, \alpha$ ). The Non-linear al | R and EViews differences in AR(1) estimates
Your NLLS has four ortoghonality conditions, one per variable plus the constant (analogue to normal equations in standard OLS) to solve for three parameters ($\rho, \beta, \alpha$ ). The Non-linear algorithms often have heterogenous configurations for tolerance parameters across softwares. MAy I suggest you drop $X_{t-1}$ from your equation in order to get exactly identified system and then test Eviews against R ? if both agree, it probably means one of them has troubles with the overidentification. | R and EViews differences in AR(1) estimates
Your NLLS has four ortoghonality conditions, one per variable plus the constant (analogue to normal equations in standard OLS) to solve for three parameters ($\rho, \beta, \alpha$ ). The Non-linear al |
29,742 | Can I use bootstrapping, why or why not? | I don't understand your data very well, but I can tell you that an alternative to the multinomial bootstrap that works better for rare events is perturbation / wild bootstrap. Perturbation is extremely flexible and is often able to handle non-iid data, however sometimes a great deal of finesse is needed to correctly approximate the cdf. If you succeed in correctly specifying the bootstrap formula, you will make fewer assumptions and likely be less biased than the smoothing method suggested previously, particularly given your sparse dataset, which may make density estimates unstable. | Can I use bootstrapping, why or why not? | I don't understand your data very well, but I can tell you that an alternative to the multinomial bootstrap that works better for rare events is perturbation / wild bootstrap. Perturbation is extremel | Can I use bootstrapping, why or why not?
I don't understand your data very well, but I can tell you that an alternative to the multinomial bootstrap that works better for rare events is perturbation / wild bootstrap. Perturbation is extremely flexible and is often able to handle non-iid data, however sometimes a great deal of finesse is needed to correctly approximate the cdf. If you succeed in correctly specifying the bootstrap formula, you will make fewer assumptions and likely be less biased than the smoothing method suggested previously, particularly given your sparse dataset, which may make density estimates unstable. | Can I use bootstrapping, why or why not?
I don't understand your data very well, but I can tell you that an alternative to the multinomial bootstrap that works better for rare events is perturbation / wild bootstrap. Perturbation is extremel |
29,743 | Can I use bootstrapping, why or why not? | If I had to approach this problem I would first start by:
looking at a map of the source data
attempting some sort of 2d smoothing on the surface, try to inform it with AIC
compute the derivative of the smooth at the location and relate variation in input to variation in output using the delta method
Compare the results of this to some "known" values in order to verify/validate the approach
Relevant links:
http://www.stanford.edu/class/cme308/notes/TaylorAppDeltaMethod.pdf
http://www.ingentaconnect.com/content/klu/stco/2010/00000020/00000004/00009140?crawler=true | Can I use bootstrapping, why or why not? | If I had to approach this problem I would first start by:
looking at a map of the source data
attempting some sort of 2d smoothing on the surface, try to inform it with AIC
compute the derivative of | Can I use bootstrapping, why or why not?
If I had to approach this problem I would first start by:
looking at a map of the source data
attempting some sort of 2d smoothing on the surface, try to inform it with AIC
compute the derivative of the smooth at the location and relate variation in input to variation in output using the delta method
Compare the results of this to some "known" values in order to verify/validate the approach
Relevant links:
http://www.stanford.edu/class/cme308/notes/TaylorAppDeltaMethod.pdf
http://www.ingentaconnect.com/content/klu/stco/2010/00000020/00000004/00009140?crawler=true | Can I use bootstrapping, why or why not?
If I had to approach this problem I would first start by:
looking at a map of the source data
attempting some sort of 2d smoothing on the surface, try to inform it with AIC
compute the derivative of |
29,744 | Evaluating clusters of first-order Markov chains | To make a statement about the steady state behaviour of each cluster you could compute the steady state distributions of each transition matrix by eigenvectors, then compare box-plots by cluster. You're likely to run into issues in the computation of steady state without applying some sort of smoothing first.
How are you clustering the transition matrices? If it were me, I'd apply additive smoothing to each row then take the centered log-ratio transform of each row then flatten the matrices.
If you're clustering with K-means or a variant, you could analyze the normalized cluster centers. Or just pick a few observations from each cluster and analyze them. | Evaluating clusters of first-order Markov chains | To make a statement about the steady state behaviour of each cluster you could compute the steady state distributions of each transition matrix by eigenvectors, then compare box-plots by cluster. You' | Evaluating clusters of first-order Markov chains
To make a statement about the steady state behaviour of each cluster you could compute the steady state distributions of each transition matrix by eigenvectors, then compare box-plots by cluster. You're likely to run into issues in the computation of steady state without applying some sort of smoothing first.
How are you clustering the transition matrices? If it were me, I'd apply additive smoothing to each row then take the centered log-ratio transform of each row then flatten the matrices.
If you're clustering with K-means or a variant, you could analyze the normalized cluster centers. Or just pick a few observations from each cluster and analyze them. | Evaluating clusters of first-order Markov chains
To make a statement about the steady state behaviour of each cluster you could compute the steady state distributions of each transition matrix by eigenvectors, then compare box-plots by cluster. You' |
29,745 | Evaluating clusters of first-order Markov chains | First, to get an idea, are your matrices of dimension 105 x 105, corresponding with the applications that you mention? When you say 'stay in state Y' does that mean stick around application Y?
Then, I would assume that outcomes such as "Processes in cluster A tend to stay in state Y once they get there, which is not true for processes in other clusters" are a bit too fine-grained with just 10 clusters. Have you tried a clustering of the application domain -- if I understand correctly you could cluster the 105 applications based on user behaviour. Next, have you looked at simple presence of users rather than transition, i.e. look at profiles of users across the 105 applications? It sounds as if you could use Pearson coefficient between user profiles; either on clusters of applications, or on the applications themselves. This could perhaps be extended towards transitions between applications, but currently I feel there is a huge mismatch between the number of clusters and the type of outcome you are interested in. | Evaluating clusters of first-order Markov chains | First, to get an idea, are your matrices of dimension 105 x 105, corresponding with the applications that you mention? When you say 'stay in state Y' does that mean stick around application Y?
Then, I | Evaluating clusters of first-order Markov chains
First, to get an idea, are your matrices of dimension 105 x 105, corresponding with the applications that you mention? When you say 'stay in state Y' does that mean stick around application Y?
Then, I would assume that outcomes such as "Processes in cluster A tend to stay in state Y once they get there, which is not true for processes in other clusters" are a bit too fine-grained with just 10 clusters. Have you tried a clustering of the application domain -- if I understand correctly you could cluster the 105 applications based on user behaviour. Next, have you looked at simple presence of users rather than transition, i.e. look at profiles of users across the 105 applications? It sounds as if you could use Pearson coefficient between user profiles; either on clusters of applications, or on the applications themselves. This could perhaps be extended towards transitions between applications, but currently I feel there is a huge mismatch between the number of clusters and the type of outcome you are interested in. | Evaluating clusters of first-order Markov chains
First, to get an idea, are your matrices of dimension 105 x 105, corresponding with the applications that you mention? When you say 'stay in state Y' does that mean stick around application Y?
Then, I |
29,746 | How to compare the accuracy of two different models using statistical significance | One of the linked posts above alludes to using a likelihood ratio test, although your models have to be nested in one another for this to work (i.e. all the parameters in one of the models must be present in the model you are testing it against).
RMSE is clearly a measure of how well the model fits the data. However, so is likelihood ratio. The likelihood for a given person, say Mrs. Chen, is the probability that a person with all her parameters had the outcome she had. The joint likelihood of the dataset is Mrs. Chen's likelihood * Mrs. Gundersen's likelihood * Mrs. Johnson's likelihood * ... etc.
Adding a covariate, or any number of covariates, can't really make the likelihood ratio worse, I don't think. But it can improve the likelihood ratio by a non-significant amount. Models that fit better will have a higher likelihood. You can formally test whether model A fits model B better. You should have some sort of LR test function available in whatever software you use, but basically, the LR test statistic is -2 * the difference of the logs of the likelihoods, and it's distributed chi-square with df = the difference in the number of parameters.
Also, comparing the AIC or BIC of the two models and finding the lowest one is also acceptable. AIC and BIC are basically the log likelihoods penalized for number of parameters.
I'm not sure about using a t-test for the RMSEs, and I would actually lean against it unless you can find some theoretical work that's been done in the area. Basically, do you know how the values of RMSE are asymptotically distributed? I'm not sure. Some further discussion here:
http://www.stata.com/statalist/archive/2012-11/index.html#01017 | How to compare the accuracy of two different models using statistical significance | One of the linked posts above alludes to using a likelihood ratio test, although your models have to be nested in one another for this to work (i.e. all the parameters in one of the models must be pre | How to compare the accuracy of two different models using statistical significance
One of the linked posts above alludes to using a likelihood ratio test, although your models have to be nested in one another for this to work (i.e. all the parameters in one of the models must be present in the model you are testing it against).
RMSE is clearly a measure of how well the model fits the data. However, so is likelihood ratio. The likelihood for a given person, say Mrs. Chen, is the probability that a person with all her parameters had the outcome she had. The joint likelihood of the dataset is Mrs. Chen's likelihood * Mrs. Gundersen's likelihood * Mrs. Johnson's likelihood * ... etc.
Adding a covariate, or any number of covariates, can't really make the likelihood ratio worse, I don't think. But it can improve the likelihood ratio by a non-significant amount. Models that fit better will have a higher likelihood. You can formally test whether model A fits model B better. You should have some sort of LR test function available in whatever software you use, but basically, the LR test statistic is -2 * the difference of the logs of the likelihoods, and it's distributed chi-square with df = the difference in the number of parameters.
Also, comparing the AIC or BIC of the two models and finding the lowest one is also acceptable. AIC and BIC are basically the log likelihoods penalized for number of parameters.
I'm not sure about using a t-test for the RMSEs, and I would actually lean against it unless you can find some theoretical work that's been done in the area. Basically, do you know how the values of RMSE are asymptotically distributed? I'm not sure. Some further discussion here:
http://www.stata.com/statalist/archive/2012-11/index.html#01017 | How to compare the accuracy of two different models using statistical significance
One of the linked posts above alludes to using a likelihood ratio test, although your models have to be nested in one another for this to work (i.e. all the parameters in one of the models must be pre |
29,747 | How to compare the accuracy of two different models using statistical significance | This answer doesn't take the fact into account, that your data form a time series but I don't think this would be a problem.
When using RMSE, this post suggests using a t-test:
Testing significance of RMSE of models
You could also use Pearson's correlation to assess your fit. According to this post, you can use Wolfe's t-Test for that: Statistical significance of increase in correlation
I currently trying to learn about the same problem. I would appreciate more detailed answers myself. | How to compare the accuracy of two different models using statistical significance | This answer doesn't take the fact into account, that your data form a time series but I don't think this would be a problem.
When using RMSE, this post suggests using a t-test:
Testing significance of | How to compare the accuracy of two different models using statistical significance
This answer doesn't take the fact into account, that your data form a time series but I don't think this would be a problem.
When using RMSE, this post suggests using a t-test:
Testing significance of RMSE of models
You could also use Pearson's correlation to assess your fit. According to this post, you can use Wolfe's t-Test for that: Statistical significance of increase in correlation
I currently trying to learn about the same problem. I would appreciate more detailed answers myself. | How to compare the accuracy of two different models using statistical significance
This answer doesn't take the fact into account, that your data form a time series but I don't think this would be a problem.
When using RMSE, this post suggests using a t-test:
Testing significance of |
29,748 | How to compare the accuracy of two different models using statistical significance | There are two main ways to do this, but first I’ll challenge the idea that you want to pick only one. Most likely, an ensemble model of the three separate models will achieve the best performance of all.
The main, perhaps best, way to do it is to use the model to obtain confidence intervals around the evaluation metric. This is commonly done via bootstrapping (or Poisson bootstrap).
The other way is to use a statistical test. Every test makes different assumptions, and these are often used to compare a value or sample taken from a distribution rather than a single point evaluation. Many of these statistical tests formally require independence, which you usually don’t have when comparing multiple results of the same model or multiple models over time series data.
With time series prediction specifically, you should be doing backtesting with cross-validation and evaluating train and test error at each time (example). When you do this, I doubt your models will all perform so similarly that you need a statistical test to differentiate; most likely, you’ll see large differences.
Note also that historical evaluation metrics (comparing actuals to forecast) alone are insufficient for prediction evaluation. Given two predictions that fit known historical data perfectly but one also matches prior beliefs about the future and the other clearly violates (e.g., if one vanishes to zero but you have reason to believe that can’t happen), you’ll prefer the prediction that better matches your prior. | How to compare the accuracy of two different models using statistical significance | There are two main ways to do this, but first I’ll challenge the idea that you want to pick only one. Most likely, an ensemble model of the three separate models will achieve the best performance of a | How to compare the accuracy of two different models using statistical significance
There are two main ways to do this, but first I’ll challenge the idea that you want to pick only one. Most likely, an ensemble model of the three separate models will achieve the best performance of all.
The main, perhaps best, way to do it is to use the model to obtain confidence intervals around the evaluation metric. This is commonly done via bootstrapping (or Poisson bootstrap).
The other way is to use a statistical test. Every test makes different assumptions, and these are often used to compare a value or sample taken from a distribution rather than a single point evaluation. Many of these statistical tests formally require independence, which you usually don’t have when comparing multiple results of the same model or multiple models over time series data.
With time series prediction specifically, you should be doing backtesting with cross-validation and evaluating train and test error at each time (example). When you do this, I doubt your models will all perform so similarly that you need a statistical test to differentiate; most likely, you’ll see large differences.
Note also that historical evaluation metrics (comparing actuals to forecast) alone are insufficient for prediction evaluation. Given two predictions that fit known historical data perfectly but one also matches prior beliefs about the future and the other clearly violates (e.g., if one vanishes to zero but you have reason to believe that can’t happen), you’ll prefer the prediction that better matches your prior. | How to compare the accuracy of two different models using statistical significance
There are two main ways to do this, but first I’ll challenge the idea that you want to pick only one. Most likely, an ensemble model of the three separate models will achieve the best performance of a |
29,749 | How to obtain decision boundaries from linear SVM in R? | For data point $x$ your SVM calculates decision value $d$ in the following way:
d <- sum(w * x) + b
If $d > 0$ then label of $x$ is $+1$, else it's $-1$. You can also get labels or decision values for data matrix newdata by saying
predict(m, newdata)
or
predict(m, newdata, decision.values = TRUE)
Be cautious when using SVM from package e1071, see Problem with e1071 libsvm? question. Several other SVM packages for R are kernlab, klaR and svmpath, see this overview: Support Vector Machines in R by A. Karatzoglou and
D. Meyer. | How to obtain decision boundaries from linear SVM in R? | For data point $x$ your SVM calculates decision value $d$ in the following way:
d <- sum(w * x) + b
If $d > 0$ then label of $x$ is $+1$, else it's $-1$. You can also get labels or decision values fo | How to obtain decision boundaries from linear SVM in R?
For data point $x$ your SVM calculates decision value $d$ in the following way:
d <- sum(w * x) + b
If $d > 0$ then label of $x$ is $+1$, else it's $-1$. You can also get labels or decision values for data matrix newdata by saying
predict(m, newdata)
or
predict(m, newdata, decision.values = TRUE)
Be cautious when using SVM from package e1071, see Problem with e1071 libsvm? question. Several other SVM packages for R are kernlab, klaR and svmpath, see this overview: Support Vector Machines in R by A. Karatzoglou and
D. Meyer. | How to obtain decision boundaries from linear SVM in R?
For data point $x$ your SVM calculates decision value $d$ in the following way:
d <- sum(w * x) + b
If $d > 0$ then label of $x$ is $+1$, else it's $-1$. You can also get labels or decision values fo |
29,750 | What problems should I watch out for when combining multiple time series? | First, I'd like to say that I would be adding a comment, but I can't do that yet (rep), but I like the question and wanted to participate, so here's an "answer". Also, I see that this is old, but it's interesting.
First, would it be possible to use a dimension-reduction technique, like PCA, to condense the time series? If the first eigenvalue is large, maybe that means that your use of the eigenvector would represent most of the dynamics.
Second, and more generally, what is your desired use of the time series? Not knowing much else, I would guess that the temperatures could vary quite a bit. E.g., if some temperature records are near cities, you could get a "heat island" type effect. Or perhaps a small change in lateral distance happens to yield a large change in vertical distance--- one location could be at sea level and right on the ocean, and another not "too far away", but at a kilometer in elevation. Those would definitely have different temperatures!
These are just some thoughts. Maybe someone else could jump in and give a better answer. | What problems should I watch out for when combining multiple time series? | First, I'd like to say that I would be adding a comment, but I can't do that yet (rep), but I like the question and wanted to participate, so here's an "answer". Also, I see that this is old, but it' | What problems should I watch out for when combining multiple time series?
First, I'd like to say that I would be adding a comment, but I can't do that yet (rep), but I like the question and wanted to participate, so here's an "answer". Also, I see that this is old, but it's interesting.
First, would it be possible to use a dimension-reduction technique, like PCA, to condense the time series? If the first eigenvalue is large, maybe that means that your use of the eigenvector would represent most of the dynamics.
Second, and more generally, what is your desired use of the time series? Not knowing much else, I would guess that the temperatures could vary quite a bit. E.g., if some temperature records are near cities, you could get a "heat island" type effect. Or perhaps a small change in lateral distance happens to yield a large change in vertical distance--- one location could be at sea level and right on the ocean, and another not "too far away", but at a kilometer in elevation. Those would definitely have different temperatures!
These are just some thoughts. Maybe someone else could jump in and give a better answer. | What problems should I watch out for when combining multiple time series?
First, I'd like to say that I would be adding a comment, but I can't do that yet (rep), but I like the question and wanted to participate, so here's an "answer". Also, I see that this is old, but it' |
29,751 | How can I find correlations between crashes and system environments? | Could you sample your user's [non-crashed] machines for the same info as you get in a crash report? Because then you could use logistic regression to model those attributes (and interactions) to the probability of getting a crash. | How can I find correlations between crashes and system environments? | Could you sample your user's [non-crashed] machines for the same info as you get in a crash report? Because then you could use logistic regression to model those attributes (and interactions) to the p | How can I find correlations between crashes and system environments?
Could you sample your user's [non-crashed] machines for the same info as you get in a crash report? Because then you could use logistic regression to model those attributes (and interactions) to the probability of getting a crash. | How can I find correlations between crashes and system environments?
Could you sample your user's [non-crashed] machines for the same info as you get in a crash report? Because then you could use logistic regression to model those attributes (and interactions) to the p |
29,752 | Variance of the Kaplan-Meier estimate for dependent observations | In this situation, multiple events of the same type can occur in parallel within the same group. For the first reference, grouping is of multiple implanted teeth within the same individual. For the second reference, by Ying and Wei, litters are the groups, and a multiple event is more than 1 member of a litter developing a tumor.
This within-group dependence can be taken into account with an infinitesimal jackknife variance estimator, which can be thought of as related to removing one group at a time from the model.* In the R survival package, that's done for a simple Kaplan-Meier estimate by specifying an id variable for each group.
The data used in the example by Ying and Wei turn out to be a subset of the rats data included in the survival package (untreated females). The standard errors (SE) with the jackknife are very close to those reported by Ying and Wei.
time
KM estimate
SE, uncorrected
SE, Ying and Wei
SE, jackknife
70
0.9190
0.028
0.026
0.0265
80
0.8733
0.034
0.032
0.0320
90
0.8227
0.041
0.046
0.0466
100
0.8074
0.043
0.047
0.0477
Code that does this in R:
> library(survival)
> fitJackknife <- survfit(Surv(time,status)~1,data=rats, subset=rx==0&sex=="f",id=litter)
> summary(fitJackknife,times=c(70,80,90,100))
Call: survfit(formula = Surv(time, status) ~ 1, data = rats, subset = rx ==
0 & sex == "f", id = litter)
time n.risk n.event survival std.err lower 95% CI upper 95% CI
70 88 8 0.919 0.0265 0.868 0.972
80 71 4 0.873 0.0320 0.813 0.938
90 63 4 0.823 0.0466 0.736 0.919
100 50 1 0.807 0.0477 0.719 0.907
*The infinitesimal jackknife is a limiting case of the original jackknife, in which one observation at a time is removed (weight = 0) while others are maintained (weights = 1). It's the liming situation as weights approach 0. Therneau and Grambsch explain in Section 7.2 how that's implemented to get variance estimates in survival models. | Variance of the Kaplan-Meier estimate for dependent observations | In this situation, multiple events of the same type can occur in parallel within the same group. For the first reference, grouping is of multiple implanted teeth within the same individual. For the se | Variance of the Kaplan-Meier estimate for dependent observations
In this situation, multiple events of the same type can occur in parallel within the same group. For the first reference, grouping is of multiple implanted teeth within the same individual. For the second reference, by Ying and Wei, litters are the groups, and a multiple event is more than 1 member of a litter developing a tumor.
This within-group dependence can be taken into account with an infinitesimal jackknife variance estimator, which can be thought of as related to removing one group at a time from the model.* In the R survival package, that's done for a simple Kaplan-Meier estimate by specifying an id variable for each group.
The data used in the example by Ying and Wei turn out to be a subset of the rats data included in the survival package (untreated females). The standard errors (SE) with the jackknife are very close to those reported by Ying and Wei.
time
KM estimate
SE, uncorrected
SE, Ying and Wei
SE, jackknife
70
0.9190
0.028
0.026
0.0265
80
0.8733
0.034
0.032
0.0320
90
0.8227
0.041
0.046
0.0466
100
0.8074
0.043
0.047
0.0477
Code that does this in R:
> library(survival)
> fitJackknife <- survfit(Surv(time,status)~1,data=rats, subset=rx==0&sex=="f",id=litter)
> summary(fitJackknife,times=c(70,80,90,100))
Call: survfit(formula = Surv(time, status) ~ 1, data = rats, subset = rx ==
0 & sex == "f", id = litter)
time n.risk n.event survival std.err lower 95% CI upper 95% CI
70 88 8 0.919 0.0265 0.868 0.972
80 71 4 0.873 0.0320 0.813 0.938
90 63 4 0.823 0.0466 0.736 0.919
100 50 1 0.807 0.0477 0.719 0.907
*The infinitesimal jackknife is a limiting case of the original jackknife, in which one observation at a time is removed (weight = 0) while others are maintained (weights = 1). It's the liming situation as weights approach 0. Therneau and Grambsch explain in Section 7.2 how that's implemented to get variance estimates in survival models. | Variance of the Kaplan-Meier estimate for dependent observations
In this situation, multiple events of the same type can occur in parallel within the same group. For the first reference, grouping is of multiple implanted teeth within the same individual. For the se |
29,753 | Conditions for the M-estimator to converge to the true mean | The paper Asymptotics for minimisers of convex processes by Hjort and Pollard may help here, although it does not specialize to Gaussian distributions, and it considers a more general form of contrast function, namely $\rho(x,a)$, though their notation is $g(y,t)$. In addition to convexity of $g$ in $t$, they require an expansion of $g$ in $t$ around $\theta_0$, in a certain sense that's related to the data distribution. So, not as simple as just saying $\rho$ is convex or increasing, but perhaps if you restrict the theorem to Gaussian distributions and $g$ to have the form you specify, you can get an even neater set of conditions. I'll rewrite their theorem here for completeness, slightly paraphrased:
Suppose we have
$Y,Y_{1},Y_{2},\ldots$ i.i.d. from distribution $F$
Parameter of interest $\theta_{0}=\theta(F)\in\cal{R}^{p}$
$\theta_{0}\in\arg\min_{t\in\cal{R}^{p}}\mathbb{E} g(Y,t)$,
where $g(y,t)$ is convex in $t$.
We have a "weak expansion" of $g(y,t)$ in $t$ around $\theta_{0}$:
$$
g(y,\theta_{0}+t)-g(y,\theta_{0})=D(y)^{T}t+R(y,t),
$$
for a $D(y)$ with mean zero under $F$ and
$$
\mathbb{E} R(Y,t)=\frac{1}{2}t^{T}Jt+o(\left|t\right|^{2}),\mbox{ as }t\to0
$$
for a positive definite matrix $J$.
$\mbox{Var}[ R(Y,t) ]=o(\left|t\right|^{2})$ as $t\to0$.
$D(Y)$ has a finite covariance matrix $K=\int D(y)D(y)^{T}\, dF(y)$.
THEN any estimator $\hat{\theta}_{n}\in\arg\min_{\theta\in\cal{R}^{p}}\sum_{i=1}^{n}g(Y_{i},t)$
is $\sqrt{n}$-consistent for $\theta_{0}$, and asymptotically normal with
$$
\sqrt{n}\left(\hat{\theta}_{n}-\theta_{0}\right)\stackrel{d}{\rightarrow}\mathcal{N}_{p}(0,J^{-1} K J^{-1}).
$$ | Conditions for the M-estimator to converge to the true mean | The paper Asymptotics for minimisers of convex processes by Hjort and Pollard may help here, although it does not specialize to Gaussian distributions, and it considers a more general form of contrast | Conditions for the M-estimator to converge to the true mean
The paper Asymptotics for minimisers of convex processes by Hjort and Pollard may help here, although it does not specialize to Gaussian distributions, and it considers a more general form of contrast function, namely $\rho(x,a)$, though their notation is $g(y,t)$. In addition to convexity of $g$ in $t$, they require an expansion of $g$ in $t$ around $\theta_0$, in a certain sense that's related to the data distribution. So, not as simple as just saying $\rho$ is convex or increasing, but perhaps if you restrict the theorem to Gaussian distributions and $g$ to have the form you specify, you can get an even neater set of conditions. I'll rewrite their theorem here for completeness, slightly paraphrased:
Suppose we have
$Y,Y_{1},Y_{2},\ldots$ i.i.d. from distribution $F$
Parameter of interest $\theta_{0}=\theta(F)\in\cal{R}^{p}$
$\theta_{0}\in\arg\min_{t\in\cal{R}^{p}}\mathbb{E} g(Y,t)$,
where $g(y,t)$ is convex in $t$.
We have a "weak expansion" of $g(y,t)$ in $t$ around $\theta_{0}$:
$$
g(y,\theta_{0}+t)-g(y,\theta_{0})=D(y)^{T}t+R(y,t),
$$
for a $D(y)$ with mean zero under $F$ and
$$
\mathbb{E} R(Y,t)=\frac{1}{2}t^{T}Jt+o(\left|t\right|^{2}),\mbox{ as }t\to0
$$
for a positive definite matrix $J$.
$\mbox{Var}[ R(Y,t) ]=o(\left|t\right|^{2})$ as $t\to0$.
$D(Y)$ has a finite covariance matrix $K=\int D(y)D(y)^{T}\, dF(y)$.
THEN any estimator $\hat{\theta}_{n}\in\arg\min_{\theta\in\cal{R}^{p}}\sum_{i=1}^{n}g(Y_{i},t)$
is $\sqrt{n}$-consistent for $\theta_{0}$, and asymptotically normal with
$$
\sqrt{n}\left(\hat{\theta}_{n}-\theta_{0}\right)\stackrel{d}{\rightarrow}\mathcal{N}_{p}(0,J^{-1} K J^{-1}).
$$ | Conditions for the M-estimator to converge to the true mean
The paper Asymptotics for minimisers of convex processes by Hjort and Pollard may help here, although it does not specialize to Gaussian distributions, and it considers a more general form of contrast |
29,754 | Conditions for the M-estimator to converge to the true mean | This will not be an answer, since it will reduce your problem to another one, but I think it might be useful. Your question is basically about consistency of M-estimator. So first we can look at the general results. Here is the result from van der Vaart book (theorem 5.7, page 45):
Theorem Let $M_n$ be random functions and let $M$ be a fixed function of $\theta$ such that for every $\varepsilon>0$
$$\sup_{\theta\in\Theta}|M_n(\theta)-M(\theta)|\xrightarrow{P}0,$$
$$\sup_{\theta:d(\theta,\theta_0)\ge\varepsilon} M(\theta)<M(\theta_0).$$
Then any sequence of estimators $\hat\theta_n$ with $M_n(\hat\theta_n)\ge M_n(\theta_0)-o_P(1)$ converges in probability to $\theta_0$
In your case $\theta_0=\mu$, $M(\theta)=E\rho(|X-\theta|)$ and $M_n(\theta)=\frac{1}{n}\sum \rho(|X_i-\theta|)$
The key condition here is the uniform convergence. In page 46 van der Vaart says
that for averages which is your case this condition is equivalent
to set of functions $\{m_\theta, \theta\in\Theta\}$
($m_\theta=\rho(|x-\theta|)$ in your case) being
Glivenko-Canteli. One simple set of sufficient conditions is that $\Theta$ be
compact, that the functions $\theta\to m_\theta(x)$ are continuous for every $x$, and that > they are dominated by an integrable function.
In Wooldridge this result is formulated as theorem called Uniform Weak Law of Large Numbers, page 347 (first edition), theorem 12.1. It only adds measurability requirements to what van der Vaart states.
In your case you can safely pick $\Theta=[\mu-C,\mu+C]$ for some $C$, so you need to show that there exists function $b$ such that
$$|\rho(|x-\theta|)|\le b(x)$$
for all $\theta\in\Theta$, such that $Eb(X)<\infty$. Convex function theory might be of help here, since you basicaly can take
$$b(x)=\sup_{\theta\in\Theta}|\rho(|x-\theta|)|.$$
If this function has nice properties then you are good to go. | Conditions for the M-estimator to converge to the true mean | This will not be an answer, since it will reduce your problem to another one, but I think it might be useful. Your question is basically about consistency of M-estimator. So first we can look at the g | Conditions for the M-estimator to converge to the true mean
This will not be an answer, since it will reduce your problem to another one, but I think it might be useful. Your question is basically about consistency of M-estimator. So first we can look at the general results. Here is the result from van der Vaart book (theorem 5.7, page 45):
Theorem Let $M_n$ be random functions and let $M$ be a fixed function of $\theta$ such that for every $\varepsilon>0$
$$\sup_{\theta\in\Theta}|M_n(\theta)-M(\theta)|\xrightarrow{P}0,$$
$$\sup_{\theta:d(\theta,\theta_0)\ge\varepsilon} M(\theta)<M(\theta_0).$$
Then any sequence of estimators $\hat\theta_n$ with $M_n(\hat\theta_n)\ge M_n(\theta_0)-o_P(1)$ converges in probability to $\theta_0$
In your case $\theta_0=\mu$, $M(\theta)=E\rho(|X-\theta|)$ and $M_n(\theta)=\frac{1}{n}\sum \rho(|X_i-\theta|)$
The key condition here is the uniform convergence. In page 46 van der Vaart says
that for averages which is your case this condition is equivalent
to set of functions $\{m_\theta, \theta\in\Theta\}$
($m_\theta=\rho(|x-\theta|)$ in your case) being
Glivenko-Canteli. One simple set of sufficient conditions is that $\Theta$ be
compact, that the functions $\theta\to m_\theta(x)$ are continuous for every $x$, and that > they are dominated by an integrable function.
In Wooldridge this result is formulated as theorem called Uniform Weak Law of Large Numbers, page 347 (first edition), theorem 12.1. It only adds measurability requirements to what van der Vaart states.
In your case you can safely pick $\Theta=[\mu-C,\mu+C]$ for some $C$, so you need to show that there exists function $b$ such that
$$|\rho(|x-\theta|)|\le b(x)$$
for all $\theta\in\Theta$, such that $Eb(X)<\infty$. Convex function theory might be of help here, since you basicaly can take
$$b(x)=\sup_{\theta\in\Theta}|\rho(|x-\theta|)|.$$
If this function has nice properties then you are good to go. | Conditions for the M-estimator to converge to the true mean
This will not be an answer, since it will reduce your problem to another one, but I think it might be useful. Your question is basically about consistency of M-estimator. So first we can look at the g |
29,755 | How to test the statistical significance of AUC? | ROC analysis answers the following question (in short): is your predictor different in the two groups?
You are confident that the subset obtained at step 4 is highly enriched in true positives. However this result won't answer the question: "If I submit a new data point, is my predictive method going to get it right?" which is the typical question in ROC analysis. Instead, it will tell you "If this has a p < 0.05, am I highly confident this is a positive?". That is not the point of ROC analysis. While this type of analysis might be relevant in your case (please note I said might, I have no idea if it is actually the case here), it is clearly not a standard ROC analysis and you'd have to make this clear.
To convince yourself that your procedure is not correct, repeat the procedure you showed above (generating a random dataset and computing the AUCs) multiple times. If this is random data, so you expect to obtain an AUC of 0.5 on average, right? Is it what you get? I bet not!
A few more comments:
If you are especially interested in the positives, and you want to ensure that all your positive observations are predicted in the positive group, you may be interested in the partial area under the ROC curve that focuses on the high specificity region. See this paper by McClish.
If you are interested in the enrichment of true positives, you want to check the positive predictive value rather than the specificity / ROC. | How to test the statistical significance of AUC? | ROC analysis answers the following question (in short): is your predictor different in the two groups?
You are confident that the subset obtained at step 4 is highly enriched in true positives. Howeve | How to test the statistical significance of AUC?
ROC analysis answers the following question (in short): is your predictor different in the two groups?
You are confident that the subset obtained at step 4 is highly enriched in true positives. However this result won't answer the question: "If I submit a new data point, is my predictive method going to get it right?" which is the typical question in ROC analysis. Instead, it will tell you "If this has a p < 0.05, am I highly confident this is a positive?". That is not the point of ROC analysis. While this type of analysis might be relevant in your case (please note I said might, I have no idea if it is actually the case here), it is clearly not a standard ROC analysis and you'd have to make this clear.
To convince yourself that your procedure is not correct, repeat the procedure you showed above (generating a random dataset and computing the AUCs) multiple times. If this is random data, so you expect to obtain an AUC of 0.5 on average, right? Is it what you get? I bet not!
A few more comments:
If you are especially interested in the positives, and you want to ensure that all your positive observations are predicted in the positive group, you may be interested in the partial area under the ROC curve that focuses on the high specificity region. See this paper by McClish.
If you are interested in the enrichment of true positives, you want to check the positive predictive value rather than the specificity / ROC. | How to test the statistical significance of AUC?
ROC analysis answers the following question (in short): is your predictor different in the two groups?
You are confident that the subset obtained at step 4 is highly enriched in true positives. Howeve |
29,756 | Multivariate orthogonal polynomial regression? | For completion's sake (and to help improve the stats of this site, ha) I have to wonder if this paper wouldn't also answer your question?
ABSTRACT:
We discuss the choice of polynomial basis for approximation of uncertainty propagation through complex simulation models with capability to output derivative information. Our work is part of a larger research effort in uncertainty quantification using sampling methods augmented with derivative information. The approach has new challenges compared with standard polynomial regression. In particular, we show that a tensor product multivariate orthogonal polynomial basis of an arbitrary degree may no longer be constructed. We provide sufficient conditions for an orthonormal set of this type to exist, a basis for the space it spans. We demonstrate the benefits of the basis in the propagation of material uncertainties through a simplified model of heat transport in a nuclear reactor core. Compared with the tensor product Hermite polynomial basis, the orthogonal basis results in a better numerical conditioning of the regression procedure, a modest improvement in approximation error when basis polynomials are chosen a priori, and a significant improvement when basis polynomials are chosen adaptively, using a stepwise fitting procedure.
Otherwise, the tensor-product basis of one-dimensional polynomials is not only the appropriate technique, but also the only one I can find for this. | Multivariate orthogonal polynomial regression? | For completion's sake (and to help improve the stats of this site, ha) I have to wonder if this paper wouldn't also answer your question?
ABSTRACT:
We discuss the choice of polynomial basis for app | Multivariate orthogonal polynomial regression?
For completion's sake (and to help improve the stats of this site, ha) I have to wonder if this paper wouldn't also answer your question?
ABSTRACT:
We discuss the choice of polynomial basis for approximation of uncertainty propagation through complex simulation models with capability to output derivative information. Our work is part of a larger research effort in uncertainty quantification using sampling methods augmented with derivative information. The approach has new challenges compared with standard polynomial regression. In particular, we show that a tensor product multivariate orthogonal polynomial basis of an arbitrary degree may no longer be constructed. We provide sufficient conditions for an orthonormal set of this type to exist, a basis for the space it spans. We demonstrate the benefits of the basis in the propagation of material uncertainties through a simplified model of heat transport in a nuclear reactor core. Compared with the tensor product Hermite polynomial basis, the orthogonal basis results in a better numerical conditioning of the regression procedure, a modest improvement in approximation error when basis polynomials are chosen a priori, and a significant improvement when basis polynomials are chosen adaptively, using a stepwise fitting procedure.
Otherwise, the tensor-product basis of one-dimensional polynomials is not only the appropriate technique, but also the only one I can find for this. | Multivariate orthogonal polynomial regression?
For completion's sake (and to help improve the stats of this site, ha) I have to wonder if this paper wouldn't also answer your question?
ABSTRACT:
We discuss the choice of polynomial basis for app |
29,757 | Using kurtosis to assess significance of components from independent component analysis | Seeing this question still lacks an answer, I'd like to reiterate, as @Tarantula commented, an accepted method to select assess the number of components retained is through the explained variance. You retain $K$ components given a criterion from the a priori whitening PCA and perform ICA on those components.
I don't know of any accepted method to do this kind of assessment with the kurtosis, this question might be unanswerable in it's fully. | Using kurtosis to assess significance of components from independent component analysis | Seeing this question still lacks an answer, I'd like to reiterate, as @Tarantula commented, an accepted method to select assess the number of components retained is through the explained variance. You | Using kurtosis to assess significance of components from independent component analysis
Seeing this question still lacks an answer, I'd like to reiterate, as @Tarantula commented, an accepted method to select assess the number of components retained is through the explained variance. You retain $K$ components given a criterion from the a priori whitening PCA and perform ICA on those components.
I don't know of any accepted method to do this kind of assessment with the kurtosis, this question might be unanswerable in it's fully. | Using kurtosis to assess significance of components from independent component analysis
Seeing this question still lacks an answer, I'd like to reiterate, as @Tarantula commented, an accepted method to select assess the number of components retained is through the explained variance. You |
29,758 | Bootstrap confidence intervals on parameters or on distribution? | Basically, if you have a joint confidence interval for the parameters that uniquely describe a distribution, then you have a distribution confidence interval. So your problem vanishes... as per whuber's comment. | Bootstrap confidence intervals on parameters or on distribution? | Basically, if you have a joint confidence interval for the parameters that uniquely describe a distribution, then you have a distribution confidence interval. So your problem vanishes... as per whube | Bootstrap confidence intervals on parameters or on distribution?
Basically, if you have a joint confidence interval for the parameters that uniquely describe a distribution, then you have a distribution confidence interval. So your problem vanishes... as per whuber's comment. | Bootstrap confidence intervals on parameters or on distribution?
Basically, if you have a joint confidence interval for the parameters that uniquely describe a distribution, then you have a distribution confidence interval. So your problem vanishes... as per whube |
29,759 | How can I assess GEE/logistic model fit when covariates have some missing data? | I would definitely try multiple imputation (eg with mice or Amelia in R), possibly with several alternative methods to impute missing values.
In the worst case scenario you can consider it a sensitivity analysis. | How can I assess GEE/logistic model fit when covariates have some missing data? | I would definitely try multiple imputation (eg with mice or Amelia in R), possibly with several alternative methods to impute missing values.
In the worst case scenario you can consider it a sensitiv | How can I assess GEE/logistic model fit when covariates have some missing data?
I would definitely try multiple imputation (eg with mice or Amelia in R), possibly with several alternative methods to impute missing values.
In the worst case scenario you can consider it a sensitivity analysis. | How can I assess GEE/logistic model fit when covariates have some missing data?
I would definitely try multiple imputation (eg with mice or Amelia in R), possibly with several alternative methods to impute missing values.
In the worst case scenario you can consider it a sensitiv |
29,760 | Significance of (GAM) regression coefficients when model likelihood is not significantly higher than null | I see no immediate reason why this should be related to GAM. The fact is that you are using two tests for the same thing. Since there is no absolute certainty in statistics, it is very well possible to have one give a significant result and the other not.
Perhaps one of the two tests is simply more powerful (but then maybe relies on some more assumptions), or maybe the single significant one is your one-in-twenty type I error.
A good example is tests for whether samples come from the same distribution: you have very parametric tests for that (the T-test is one that can be used for this: if the means are different, so should the distributions), and also nonparametric ones: it could happen that the parametric one gives a significant result and the nonparametric one doesn't. This could be because the assumptions of the parametric test are false, because the data is simply extraordinary (type I), or because the sample size is not sufficient for the nonparametric test to pick up the difference, or, finally, because the aspect of what you really want to test (different distributions) that is checked by the different tests is just different (different means <-> chance of being "higher than").
If one test result shows significant results, and the other is only slightly non-significant, I wouldn't worry too much. | Significance of (GAM) regression coefficients when model likelihood is not significantly higher than | I see no immediate reason why this should be related to GAM. The fact is that you are using two tests for the same thing. Since there is no absolute certainty in statistics, it is very well possible t | Significance of (GAM) regression coefficients when model likelihood is not significantly higher than null
I see no immediate reason why this should be related to GAM. The fact is that you are using two tests for the same thing. Since there is no absolute certainty in statistics, it is very well possible to have one give a significant result and the other not.
Perhaps one of the two tests is simply more powerful (but then maybe relies on some more assumptions), or maybe the single significant one is your one-in-twenty type I error.
A good example is tests for whether samples come from the same distribution: you have very parametric tests for that (the T-test is one that can be used for this: if the means are different, so should the distributions), and also nonparametric ones: it could happen that the parametric one gives a significant result and the nonparametric one doesn't. This could be because the assumptions of the parametric test are false, because the data is simply extraordinary (type I), or because the sample size is not sufficient for the nonparametric test to pick up the difference, or, finally, because the aspect of what you really want to test (different distributions) that is checked by the different tests is just different (different means <-> chance of being "higher than").
If one test result shows significant results, and the other is only slightly non-significant, I wouldn't worry too much. | Significance of (GAM) regression coefficients when model likelihood is not significantly higher than
I see no immediate reason why this should be related to GAM. The fact is that you are using two tests for the same thing. Since there is no absolute certainty in statistics, it is very well possible t |
29,761 | Advice on identifying curve shape using quantreg | All models are wrong, but some are useful (George Box). You are forcing a logrithmic shape to your fitted curve, and honestly it doesn't look that bad. The fit is poor at the tail because there are less points there; the two parameters you have allowed will fit the bulk of the data. In other words, on a log scale, that tail isn't far enough away from the bulk of your data to provide leverage. It doesn't have to do with the quantile nature of the regression; OLS would also disregard those points (especially on the log scale).
It's pretty easy to allow for some more non-linearity. I'm partial to natural splines, but again, all models are wrong:
library(splines)
mod <- rq(y ~ ns(log(x), df=6), data=df, tau=.99)
The quantreg package has some special hooks for monotonic splines if that's of concern to you. | Advice on identifying curve shape using quantreg | All models are wrong, but some are useful (George Box). You are forcing a logrithmic shape to your fitted curve, and honestly it doesn't look that bad. The fit is poor at the tail because there are | Advice on identifying curve shape using quantreg
All models are wrong, but some are useful (George Box). You are forcing a logrithmic shape to your fitted curve, and honestly it doesn't look that bad. The fit is poor at the tail because there are less points there; the two parameters you have allowed will fit the bulk of the data. In other words, on a log scale, that tail isn't far enough away from the bulk of your data to provide leverage. It doesn't have to do with the quantile nature of the regression; OLS would also disregard those points (especially on the log scale).
It's pretty easy to allow for some more non-linearity. I'm partial to natural splines, but again, all models are wrong:
library(splines)
mod <- rq(y ~ ns(log(x), df=6), data=df, tau=.99)
The quantreg package has some special hooks for monotonic splines if that's of concern to you. | Advice on identifying curve shape using quantreg
All models are wrong, but some are useful (George Box). You are forcing a logrithmic shape to your fitted curve, and honestly it doesn't look that bad. The fit is poor at the tail because there are |
29,762 | What type of post-fit analysis of residuals do you use? | There are various types of residual analyses you can carry out depending upon what you are checking for. Depending upon the analysis, you either use original residuals or standardized residuals. You need to specify what exactly you are tying to verify post fitting of your model (constant variance assumption, normality assumption, IID assumption, etc). | What type of post-fit analysis of residuals do you use? | There are various types of residual analyses you can carry out depending upon what you are checking for. Depending upon the analysis, you either use original residuals or standardized residuals. You n | What type of post-fit analysis of residuals do you use?
There are various types of residual analyses you can carry out depending upon what you are checking for. Depending upon the analysis, you either use original residuals or standardized residuals. You need to specify what exactly you are tying to verify post fitting of your model (constant variance assumption, normality assumption, IID assumption, etc). | What type of post-fit analysis of residuals do you use?
There are various types of residual analyses you can carry out depending upon what you are checking for. Depending upon the analysis, you either use original residuals or standardized residuals. You n |
29,763 | How to guess the size of a set? | First some notation: Assume $N$ unique words, sampled with the same probability. We are doing $R$ (independent) rounds of simple random sampling without replacement, each round the sample size is $n \le N$ (generalization to unequal sample sizes should be straightforward).
Define indicator random variables
$$ X_{ij} =\begin{cases} 1 & \text{word $j$ sampled in round $i$} \\
0 & \text{otherwise} \end{cases} $$
Note that we have
\begin{align}
\sum_j X_{ij} &= n ~(\text{for all $i$}) \\
\sum_i X_{ij} &\sim \mathcal{Binom}(R, n/N)
\end{align}
but all these binomial random variables are not independent, since they have a fixed, constant sum $nR$. But if $N$ is large and $n/N$ small the dependence would be slight.
Define $Y_j = \sum_i X_{ij}$ each having the binomial distribution defined above. The exact likelihood function for this problem will be intractable, so I will not write it out. But based on this binomials $Y_j$ we can construct a composite likelihood function, see the references at Parameter Estimation for intractable Likelihoods / Alternatives to approximate Bayesian computation.
But before going into the details, we can also define pair statistics
$$ Y_{jl} = \sum_{i=1}^R X_{ij} X_{il} \quad \text{for $j\not=l$}
$$
which will also have binomial distributions: $\mathcal{Binom}(R,\frac{n}{N}\cdot\frac{n-1}{N-1})$.
The idea with composite likelihood (a specific form of pseudo-likelihood) is to construct individual likelihood functions from parts of the data, and then just multiply them together, as would be correct if they where independent ... even if they are not independent. See the linked page above for details.
First, we find the composite likelihood only based on the $Y_j$. First, suppose the total number of unique words sampled in the $R$ rounds are $M \le N$. Then the composite likelihood for the one unknown parameter $N$ becomes
$$ \prod_{j=1}^M \binom{R}{y_j}(n/N)^{y_j} (1-n/N)^{R-y_j} \cdot \left[ (1-n/N)^R \right]^{(N-M)}
$$ the last factor coming from the $N-M$ unobserved words.
(sorry, now it is late night here, so I will continue this answer tomorrow) | How to guess the size of a set? | First some notation: Assume $N$ unique words, sampled with the same probability. We are doing $R$ (independent) rounds of simple random sampling without replacement, each round the sample size is $n \ | How to guess the size of a set?
First some notation: Assume $N$ unique words, sampled with the same probability. We are doing $R$ (independent) rounds of simple random sampling without replacement, each round the sample size is $n \le N$ (generalization to unequal sample sizes should be straightforward).
Define indicator random variables
$$ X_{ij} =\begin{cases} 1 & \text{word $j$ sampled in round $i$} \\
0 & \text{otherwise} \end{cases} $$
Note that we have
\begin{align}
\sum_j X_{ij} &= n ~(\text{for all $i$}) \\
\sum_i X_{ij} &\sim \mathcal{Binom}(R, n/N)
\end{align}
but all these binomial random variables are not independent, since they have a fixed, constant sum $nR$. But if $N$ is large and $n/N$ small the dependence would be slight.
Define $Y_j = \sum_i X_{ij}$ each having the binomial distribution defined above. The exact likelihood function for this problem will be intractable, so I will not write it out. But based on this binomials $Y_j$ we can construct a composite likelihood function, see the references at Parameter Estimation for intractable Likelihoods / Alternatives to approximate Bayesian computation.
But before going into the details, we can also define pair statistics
$$ Y_{jl} = \sum_{i=1}^R X_{ij} X_{il} \quad \text{for $j\not=l$}
$$
which will also have binomial distributions: $\mathcal{Binom}(R,\frac{n}{N}\cdot\frac{n-1}{N-1})$.
The idea with composite likelihood (a specific form of pseudo-likelihood) is to construct individual likelihood functions from parts of the data, and then just multiply them together, as would be correct if they where independent ... even if they are not independent. See the linked page above for details.
First, we find the composite likelihood only based on the $Y_j$. First, suppose the total number of unique words sampled in the $R$ rounds are $M \le N$. Then the composite likelihood for the one unknown parameter $N$ becomes
$$ \prod_{j=1}^M \binom{R}{y_j}(n/N)^{y_j} (1-n/N)^{R-y_j} \cdot \left[ (1-n/N)^R \right]^{(N-M)}
$$ the last factor coming from the $N-M$ unobserved words.
(sorry, now it is late night here, so I will continue this answer tomorrow) | How to guess the size of a set?
First some notation: Assume $N$ unique words, sampled with the same probability. We are doing $R$ (independent) rounds of simple random sampling without replacement, each round the sample size is $n \ |
29,764 | How to guess the size of a set? | Using the following notation:
$s_i$: the number of samples for the $i^{th}$ round
$k_i$: the number of words sampled in the $i^{th}$ round that had not been previously sampled
$m_i=\sum_{j=1}^ik_j$
$\pi_1(n)$: the prior distribution of $n$
We'll also assume $n\geq{s}$; otherwise we can determine $n$ after the first round of sampling. We can update $\pi(n)$ beginning with the second round of sampling:
$$\pi_i(n)\propto\frac{\binom{m_{i-1}}{s_i-k_i}\binom{n-m_{i-1}}{k_i}}{\binom{n}{s_i}}\pi_{i-1}(n)$$
$$\propto\pi_1(n)\prod_{j=2}^i\frac{(n-m_{j-1})!(n-s_j)!}{n!(n-m_{j-1}-k_j)!}$$
Implemented as an R function:
pn <- function(s, k, prior) {
l <- length(s)
m <- cumsum(k[-l])
s <- s[-1]
k <- k[-1]
function(n) pmax(prior(n)*exp(colSums(lgamma(outer(1 - m, n, "+")) + lgamma(outer(1 - s, n, "+")) - lgamma(outer(1 - m - k, n, "+"))) - (l - 1)*lgamma(n + 1)), 0, na.rm = TRUE)
}
For example, say $\pi_1(n)\sim{U(8,30)}$, $k=5,3,1$, and $s=5,5,5$.
k <- c(5, 3, 1)
s <- rep(5, 3)
post <- pn(s, k, function(n) 1)
like <- post(8:30)
plot(8:30, like/sum(like), xlab = "n", ylab = "p(n)", col = "blue", pch = 3)
We can verify the results with simulation:
library(parallel)
set.seed(724526144)
nreps <- tabulate(sample(23, 23e6, TRUE), 23)
clust <- makeCluster(detectCores() - 1)
clusterExport(clust, c("nreps", "s", "k"))
sim <- unlist(parLapply(clust, 1:23, function(i) sum(replicate(nreps[i], all(cumsum(!duplicated(c(replicate(3, sample(i + 7, 5)))))[cumsum(s)] == cumsum(k))))))
stopCluster(clust)
points(8:30, sim/sum(sim), col = "orange")
legend("topright", legend = c("Posterior likelihood", "Simulation"), col = c("blue", "orange"), pch = c(3, 1))
If we had observed $k=5,4,2$ instead of $k=5,3,1$, we can see the posterior distribution shift toward larger values of $n$.
k <- c(5, 4, 2)
post <- pn(s, k, function(n) 1)
like <- post(8:30)
plot(8:30, like/sum(like), xlab = "n", ylab = "p(n)", col = "blue", pch = 3)
Again verifying the results with simulation:
set.seed(353678169)
nreps <- tabulate(sample(23, 23e6, TRUE), 23)
clust <- makeCluster(detectCores() - 1)
clusterExport(clust, c("nreps", "s", "k"))
sim <- unlist(parLapply(clust, 1:23, function(i) sum(replicate(nreps[i], all(cumsum(!duplicated(c(replicate(3, sample(i + 7, 5)))))[cumsum(s)] == cumsum(k))))))
stopCluster(clust)
points(8:30, sim/sum(sim), col = "orange")
legend("topright", legend = c("Posterior likelihood", "Simulation"), col = c("blue", "orange"), pch = c(3, 1)) | How to guess the size of a set? | Using the following notation:
$s_i$: the number of samples for the $i^{th}$ round
$k_i$: the number of words sampled in the $i^{th}$ round that had not been previously sampled
$m_i=\sum_{j=1}^ik_j$
$\ | How to guess the size of a set?
Using the following notation:
$s_i$: the number of samples for the $i^{th}$ round
$k_i$: the number of words sampled in the $i^{th}$ round that had not been previously sampled
$m_i=\sum_{j=1}^ik_j$
$\pi_1(n)$: the prior distribution of $n$
We'll also assume $n\geq{s}$; otherwise we can determine $n$ after the first round of sampling. We can update $\pi(n)$ beginning with the second round of sampling:
$$\pi_i(n)\propto\frac{\binom{m_{i-1}}{s_i-k_i}\binom{n-m_{i-1}}{k_i}}{\binom{n}{s_i}}\pi_{i-1}(n)$$
$$\propto\pi_1(n)\prod_{j=2}^i\frac{(n-m_{j-1})!(n-s_j)!}{n!(n-m_{j-1}-k_j)!}$$
Implemented as an R function:
pn <- function(s, k, prior) {
l <- length(s)
m <- cumsum(k[-l])
s <- s[-1]
k <- k[-1]
function(n) pmax(prior(n)*exp(colSums(lgamma(outer(1 - m, n, "+")) + lgamma(outer(1 - s, n, "+")) - lgamma(outer(1 - m - k, n, "+"))) - (l - 1)*lgamma(n + 1)), 0, na.rm = TRUE)
}
For example, say $\pi_1(n)\sim{U(8,30)}$, $k=5,3,1$, and $s=5,5,5$.
k <- c(5, 3, 1)
s <- rep(5, 3)
post <- pn(s, k, function(n) 1)
like <- post(8:30)
plot(8:30, like/sum(like), xlab = "n", ylab = "p(n)", col = "blue", pch = 3)
We can verify the results with simulation:
library(parallel)
set.seed(724526144)
nreps <- tabulate(sample(23, 23e6, TRUE), 23)
clust <- makeCluster(detectCores() - 1)
clusterExport(clust, c("nreps", "s", "k"))
sim <- unlist(parLapply(clust, 1:23, function(i) sum(replicate(nreps[i], all(cumsum(!duplicated(c(replicate(3, sample(i + 7, 5)))))[cumsum(s)] == cumsum(k))))))
stopCluster(clust)
points(8:30, sim/sum(sim), col = "orange")
legend("topright", legend = c("Posterior likelihood", "Simulation"), col = c("blue", "orange"), pch = c(3, 1))
If we had observed $k=5,4,2$ instead of $k=5,3,1$, we can see the posterior distribution shift toward larger values of $n$.
k <- c(5, 4, 2)
post <- pn(s, k, function(n) 1)
like <- post(8:30)
plot(8:30, like/sum(like), xlab = "n", ylab = "p(n)", col = "blue", pch = 3)
Again verifying the results with simulation:
set.seed(353678169)
nreps <- tabulate(sample(23, 23e6, TRUE), 23)
clust <- makeCluster(detectCores() - 1)
clusterExport(clust, c("nreps", "s", "k"))
sim <- unlist(parLapply(clust, 1:23, function(i) sum(replicate(nreps[i], all(cumsum(!duplicated(c(replicate(3, sample(i + 7, 5)))))[cumsum(s)] == cumsum(k))))))
stopCluster(clust)
points(8:30, sim/sum(sim), col = "orange")
legend("topright", legend = c("Posterior likelihood", "Simulation"), col = c("blue", "orange"), pch = c(3, 1)) | How to guess the size of a set?
Using the following notation:
$s_i$: the number of samples for the $i^{th}$ round
$k_i$: the number of words sampled in the $i^{th}$ round that had not been previously sampled
$m_i=\sum_{j=1}^ik_j$
$\ |
29,765 | How to guess the size of a set? | This is known as the Mark and Recapture problem, because the people who most often encounter it are ecologists estimating population size. There are many methods available, which you can find by searching for "Mark and Recapture". | How to guess the size of a set? | This is known as the Mark and Recapture problem, because the people who most often encounter it are ecologists estimating population size. There are many methods available, which you can find by searc | How to guess the size of a set?
This is known as the Mark and Recapture problem, because the people who most often encounter it are ecologists estimating population size. There are many methods available, which you can find by searching for "Mark and Recapture". | How to guess the size of a set?
This is known as the Mark and Recapture problem, because the people who most often encounter it are ecologists estimating population size. There are many methods available, which you can find by searc |
29,766 | Proof that the addition of a baseline to the REINFORCE algorithm reduces the variance | I do not know any mathematical proof but this explanation may help:
Let's say all of our rewards are positive. Using this formula you wrote above without baseline function boosts the probability of all actions, because we are always multiplying the log probabilities with some positive rewards. This causes to reduce variance and that's why we want to boost the probability of actions better than the average. | Proof that the addition of a baseline to the REINFORCE algorithm reduces the variance | I do not know any mathematical proof but this explanation may help:
Let's say all of our rewards are positive. Using this formula you wrote above without baseline function boosts the probability of a | Proof that the addition of a baseline to the REINFORCE algorithm reduces the variance
I do not know any mathematical proof but this explanation may help:
Let's say all of our rewards are positive. Using this formula you wrote above without baseline function boosts the probability of all actions, because we are always multiplying the log probabilities with some positive rewards. This causes to reduce variance and that's why we want to boost the probability of actions better than the average. | Proof that the addition of a baseline to the REINFORCE algorithm reduces the variance
I do not know any mathematical proof but this explanation may help:
Let's say all of our rewards are positive. Using this formula you wrote above without baseline function boosts the probability of a |
29,767 | Feature selection using chi squared for continuous features | I think you confuse the data itself (which can be continuous) with the fact that when you talk about data, you actually talk about samples, which are discrete.
The $\chi^2$ test (in wikipedia and the model selection by $\chi^2$ criterion) is a test to check for independence of sampled data. I.e. when you have two (or more) of sources of the data (i.e. different features), and you want to select only features that are mutually independent, you can test it by rejecting the Null hypothesis (i.e. data samples are dependant) if the probability to encounter such a sample (under the Null hypothesis), i.e. the p value, is smaller than some threshold value (e.g., p < 0.05).
So now for your questions,
The $\chi^2$ test do work only on categorical data, as you must count the occurences of the samples in each category to use it, but as I've mentioned above, when you use it, you actually have samples in hand, so one thing you can do is to divide your samples into categories based on thresholds (e.g., $cat_1: x \in [th_1 < x < th_2], cat_2: x \in [th_2 < x < th_3]$, etc.) and count all the samples that fall into each category.
As for the scales - you are obviously must use the same scales when you discretize your samples, otherwise it won't make any sense, but when you conduct the $\chi^2$ test itself, as you've correctly pointed out, you are dealing with counts, so they won't have any scales anyway.
Cheers. | Feature selection using chi squared for continuous features | I think you confuse the data itself (which can be continuous) with the fact that when you talk about data, you actually talk about samples, which are discrete.
The $\chi^2$ test (in wikipedia and the | Feature selection using chi squared for continuous features
I think you confuse the data itself (which can be continuous) with the fact that when you talk about data, you actually talk about samples, which are discrete.
The $\chi^2$ test (in wikipedia and the model selection by $\chi^2$ criterion) is a test to check for independence of sampled data. I.e. when you have two (or more) of sources of the data (i.e. different features), and you want to select only features that are mutually independent, you can test it by rejecting the Null hypothesis (i.e. data samples are dependant) if the probability to encounter such a sample (under the Null hypothesis), i.e. the p value, is smaller than some threshold value (e.g., p < 0.05).
So now for your questions,
The $\chi^2$ test do work only on categorical data, as you must count the occurences of the samples in each category to use it, but as I've mentioned above, when you use it, you actually have samples in hand, so one thing you can do is to divide your samples into categories based on thresholds (e.g., $cat_1: x \in [th_1 < x < th_2], cat_2: x \in [th_2 < x < th_3]$, etc.) and count all the samples that fall into each category.
As for the scales - you are obviously must use the same scales when you discretize your samples, otherwise it won't make any sense, but when you conduct the $\chi^2$ test itself, as you've correctly pointed out, you are dealing with counts, so they won't have any scales anyway.
Cheers. | Feature selection using chi squared for continuous features
I think you confuse the data itself (which can be continuous) with the fact that when you talk about data, you actually talk about samples, which are discrete.
The $\chi^2$ test (in wikipedia and the |
29,768 | Need advice on change point (step) detection | I don't know what language you are using, but for Matlab I wrote this Shape based filter. It's a "match based filter".
Matlab can be read as psuedo code for other languages.
I wrote it for a sawtooth pattern I needed to remove, but also used it for removing steps. The shapes you are matching (to remove) are step ups and step downs. Let's say [0,0,0,0,1,1,1,1] or [1,1,1,1,0,0,0,0] | Need advice on change point (step) detection | I don't know what language you are using, but for Matlab I wrote this Shape based filter. It's a "match based filter".
Matlab can be read as psuedo code for other languages.
I wrote it for a sawtooth | Need advice on change point (step) detection
I don't know what language you are using, but for Matlab I wrote this Shape based filter. It's a "match based filter".
Matlab can be read as psuedo code for other languages.
I wrote it for a sawtooth pattern I needed to remove, but also used it for removing steps. The shapes you are matching (to remove) are step ups and step downs. Let's say [0,0,0,0,1,1,1,1] or [1,1,1,1,0,0,0,0] | Need advice on change point (step) detection
I don't know what language you are using, but for Matlab I wrote this Shape based filter. It's a "match based filter".
Matlab can be read as psuedo code for other languages.
I wrote it for a sawtooth |
29,769 | Need advice on change point (step) detection | You can use a short sliding window of a number of samples that can be parametrized, and compute the range over it. When this window is at the "edge" of a jump, the range statistic will change considerably. Than let A and B be the indices of successive range changes, i.e. jumps. You can push each of the values between these indices by the value of range, i.e. the depth of the jump, and get rid of it.
Another method you can use is to make an index of the range statistic as well as mean, than use the sliding window approach to find anomalies in the range-mean index series. | Need advice on change point (step) detection | You can use a short sliding window of a number of samples that can be parametrized, and compute the range over it. When this window is at the "edge" of a jump, the range statistic will change consider | Need advice on change point (step) detection
You can use a short sliding window of a number of samples that can be parametrized, and compute the range over it. When this window is at the "edge" of a jump, the range statistic will change considerably. Than let A and B be the indices of successive range changes, i.e. jumps. You can push each of the values between these indices by the value of range, i.e. the depth of the jump, and get rid of it.
Another method you can use is to make an index of the range statistic as well as mean, than use the sliding window approach to find anomalies in the range-mean index series. | Need advice on change point (step) detection
You can use a short sliding window of a number of samples that can be parametrized, and compute the range over it. When this window is at the "edge" of a jump, the range statistic will change consider |
29,770 | Sampling from distribution known only by its moments [duplicate] | If you have $k$ moments, one reasonable approach is to solve for the metalog distribution that has $k$ coefficients and those moments. (See https://en.wikipedia.org/wiki/Metalog_distribution#Moments for some formulas). Then the quantile function of that distribution has a particularly simple form in terms of those coefficients, and you can use that to sample the distribution. | Sampling from distribution known only by its moments [duplicate] | If you have $k$ moments, one reasonable approach is to solve for the metalog distribution that has $k$ coefficients and those moments. (See https://en.wikipedia.org/wiki/Metalog_distribution#Moments f | Sampling from distribution known only by its moments [duplicate]
If you have $k$ moments, one reasonable approach is to solve for the metalog distribution that has $k$ coefficients and those moments. (See https://en.wikipedia.org/wiki/Metalog_distribution#Moments for some formulas). Then the quantile function of that distribution has a particularly simple form in terms of those coefficients, and you can use that to sample the distribution. | Sampling from distribution known only by its moments [duplicate]
If you have $k$ moments, one reasonable approach is to solve for the metalog distribution that has $k$ coefficients and those moments. (See https://en.wikipedia.org/wiki/Metalog_distribution#Moments f |
29,771 | Methods to detect published mistakes without raw data? | You could simply ask for the data if you think there is an error. If they say no that would be a concern to me, although I find it hard to believe people would falsify results deliberately (well some will, but that will be rare I think). | Methods to detect published mistakes without raw data? | You could simply ask for the data if you think there is an error. If they say no that would be a concern to me, although I find it hard to believe people would falsify results deliberately (well some | Methods to detect published mistakes without raw data?
You could simply ask for the data if you think there is an error. If they say no that would be a concern to me, although I find it hard to believe people would falsify results deliberately (well some will, but that will be rare I think). | Methods to detect published mistakes without raw data?
You could simply ask for the data if you think there is an error. If they say no that would be a concern to me, although I find it hard to believe people would falsify results deliberately (well some |
29,772 | Methods to detect published mistakes without raw data? | Below are heuristics that are not necessarily direct mistakes, but are frequent ways of using statistics sub-optimally.
Use of underpowered statistical tests, do they mention sample size calculations for example?
Data dredging especially on “big data”. If all variables are highly significant this could be a sign of stepwise regression or similar being used, rather than more logical reasoning having been used.
Over reliance on hypothesis tests, as we as consumers of the paper do not know how many other tests were tried, and compensation schemes for multiple comparisons have side effects such as depending on how many (acknowledged) tests were performed. Further, some fields have much prior knowledge which if not encoded into a test through say a Bayesian approach, are too prone to randomness of “significant” results of hypothesis tests.
Not using multiple imputation or similar but instead dropping observations with missing values from the analysis may bias the remaining data, and also reduces the power of subsequent tests.
Something that is more difficult to discern is if the techniques used are not well understood by the authors. This can be more apparent if they give a presentation of the paper. If the technique is not understood sufficiently, it may have been misused. | Methods to detect published mistakes without raw data? | Below are heuristics that are not necessarily direct mistakes, but are frequent ways of using statistics sub-optimally.
Use of underpowered statistical tests, do they mention sample size calculations | Methods to detect published mistakes without raw data?
Below are heuristics that are not necessarily direct mistakes, but are frequent ways of using statistics sub-optimally.
Use of underpowered statistical tests, do they mention sample size calculations for example?
Data dredging especially on “big data”. If all variables are highly significant this could be a sign of stepwise regression or similar being used, rather than more logical reasoning having been used.
Over reliance on hypothesis tests, as we as consumers of the paper do not know how many other tests were tried, and compensation schemes for multiple comparisons have side effects such as depending on how many (acknowledged) tests were performed. Further, some fields have much prior knowledge which if not encoded into a test through say a Bayesian approach, are too prone to randomness of “significant” results of hypothesis tests.
Not using multiple imputation or similar but instead dropping observations with missing values from the analysis may bias the remaining data, and also reduces the power of subsequent tests.
Something that is more difficult to discern is if the techniques used are not well understood by the authors. This can be more apparent if they give a presentation of the paper. If the technique is not understood sufficiently, it may have been misused. | Methods to detect published mistakes without raw data?
Below are heuristics that are not necessarily direct mistakes, but are frequent ways of using statistics sub-optimally.
Use of underpowered statistical tests, do they mention sample size calculations |
29,773 | What is the relation of the negative sampling (NS) objective function to the original objective function in word2vec? | The answer to the question referenced by @amoeba in the comment on your question answers this quite well, but I would like to make two points.
First, to expand on a point in that answer, the objective being minimized is not the negative log of the softmax function. Rather, it is defined as a variant of noise contrastive estimation (NCE), which boils down to a set of $K$ logistic regressions. One is used for the positive sample (i.e., the true context word given the center word), and the remaining $K-1$ are used for the negative samples (i.e., the false/fake context word given the center word).
Second, the reason you would want a large negative inner product between the false context words and the center word is because this implies that the words are maximally dissimilar. To see this, consider the formula for cosine similarity between two vectors $x$ and $y$:
$$
s_{cos}(x, y) = \frac{x^Ty}{\|x\|_2\,\|y\|_2}
$$
This attains a minimum of $-1$ when $x$ and $y$ are oriented in opposite directions and equals $0$ when $x$ and $y$ are perpendicular. If they are perpendicular, they contain none of the same information, while if they are oriented oppositely, they contain opposite information. If you imagine word vectors in 2D, this is like saying that the word "bright" has the embedding $[1\;0],$ "dark" has the embedding $[-1\;0],$ and "delicious" has the embedding $[0\;1].$ In our simple example, "bright" and "dark" are opposites. Predicting that something is "dark" when it is "bright" would be maximally incorrect as it would convey exactly the opposite of the intended information. On the other hand, the word "delicious" carries no information about whether something is "bright" or "dark", so it is oriented perpendicularly to both.
This is also a reason why embeddings learned from word2vec perform well at analogical reasoning, which involves sums and differences of word vectors. You can read more about the task in the word2vec paper. | What is the relation of the negative sampling (NS) objective function to the original objective func | The answer to the question referenced by @amoeba in the comment on your question answers this quite well, but I would like to make two points.
First, to expand on a point in that answer, the objective | What is the relation of the negative sampling (NS) objective function to the original objective function in word2vec?
The answer to the question referenced by @amoeba in the comment on your question answers this quite well, but I would like to make two points.
First, to expand on a point in that answer, the objective being minimized is not the negative log of the softmax function. Rather, it is defined as a variant of noise contrastive estimation (NCE), which boils down to a set of $K$ logistic regressions. One is used for the positive sample (i.e., the true context word given the center word), and the remaining $K-1$ are used for the negative samples (i.e., the false/fake context word given the center word).
Second, the reason you would want a large negative inner product between the false context words and the center word is because this implies that the words are maximally dissimilar. To see this, consider the formula for cosine similarity between two vectors $x$ and $y$:
$$
s_{cos}(x, y) = \frac{x^Ty}{\|x\|_2\,\|y\|_2}
$$
This attains a minimum of $-1$ when $x$ and $y$ are oriented in opposite directions and equals $0$ when $x$ and $y$ are perpendicular. If they are perpendicular, they contain none of the same information, while if they are oriented oppositely, they contain opposite information. If you imagine word vectors in 2D, this is like saying that the word "bright" has the embedding $[1\;0],$ "dark" has the embedding $[-1\;0],$ and "delicious" has the embedding $[0\;1].$ In our simple example, "bright" and "dark" are opposites. Predicting that something is "dark" when it is "bright" would be maximally incorrect as it would convey exactly the opposite of the intended information. On the other hand, the word "delicious" carries no information about whether something is "bright" or "dark", so it is oriented perpendicularly to both.
This is also a reason why embeddings learned from word2vec perform well at analogical reasoning, which involves sums and differences of word vectors. You can read more about the task in the word2vec paper. | What is the relation of the negative sampling (NS) objective function to the original objective func
The answer to the question referenced by @amoeba in the comment on your question answers this quite well, but I would like to make two points.
First, to expand on a point in that answer, the objective |
29,774 | What is the relation of the negative sampling (NS) objective function to the original objective function in word2vec? | The vectors being multiplied are not embedding vectors of the words. They are The inner products are beteen of embedding vectors of words and the weight matrix/vectors of the output layer. So the objective is to minimise either the cross-entropy loss. Whether the innet products are negative or zero does not indicate anything about word similarity.
This is my opinion. | What is the relation of the negative sampling (NS) objective function to the original objective func | The vectors being multiplied are not embedding vectors of the words. They are The inner products are beteen of embedding vectors of words and the weight matrix/vectors of the output layer. So the obje | What is the relation of the negative sampling (NS) objective function to the original objective function in word2vec?
The vectors being multiplied are not embedding vectors of the words. They are The inner products are beteen of embedding vectors of words and the weight matrix/vectors of the output layer. So the objective is to minimise either the cross-entropy loss. Whether the innet products are negative or zero does not indicate anything about word similarity.
This is my opinion. | What is the relation of the negative sampling (NS) objective function to the original objective func
The vectors being multiplied are not embedding vectors of the words. They are The inner products are beteen of embedding vectors of words and the weight matrix/vectors of the output layer. So the obje |
29,775 | does serial correlation have something to do with endogeneity? | I am answering under the supervision of CV's peers. Be critical.
Assume one has the following model specification
$\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{u}$
where $\boldsymbol{y}$ is a $n \times 1$ vector, $\boldsymbol{X}$ an $n \times k$ matrix, $\boldsymbol{\beta}$ a $k \times 1$ hyperparameter and $\boldsymbol{u}$ a $n \times 1$ vector of homoscedastic but autocorrelated residuals. At this stage we still do not know how those are autocorrelated.
Assume that one omited to include another variable, say a $n \times 1$ vector $\boldsymbol{z}$, whose endogeneity consists of its autocorrelation such that
$\boldsymbol{z} = f(\boldsymbol{z})$
where $f$ is assumed to be a bijective/invertible vector function which specifies the correlation structure between the $n$ components $z_{i=1,...,n}$ of $\boldsymbol{z}$.
This means that $\boldsymbol{u}$ is hiddenly generated as follows (where $\gamma \neq 0$ is a scalar parameter and $\boldsymbol{v}$ is $n \times 1$ vector of errors assumed to be iid normal.)
$\boldsymbol{u} = \gamma\boldsymbol{z} + \boldsymbol{v} \iff \frac{1}{\gamma}(\boldsymbol{u}-\boldsymbol{v}) = \boldsymbol{z} \iff f(\frac{1}{\gamma}(\boldsymbol{u}-\boldsymbol{v})) = f(\boldsymbol{z})$
But since one has $\boldsymbol{z} = f(\boldsymbol{z})$, the above last equivalence can be turned into an equality. Which leads to
$\frac{\boldsymbol{u}-\boldsymbol{v}}{\gamma} = f(\frac{\boldsymbol{u}-\boldsymbol{v}}{\gamma}) \iff u = f(\frac{\boldsymbol{u}-\boldsymbol{v}}{\gamma})\gamma+\boldsymbol{v}$
Which shows that even if the correlation is not the same as the one there is between the components of $\boldsymbol{z}$, it does exist.
Thus yes serial correlation does have something to do with endogeneity when, e.g., this endogeneity consists of an omited autocorrelated variable whose autocorrelation structure is invertible.
But actually, it is very unlikely that $f$ be invertible. I mean that, if autocorrelation works through time, $f$ is the backshift operator, and it is not invertible. | does serial correlation have something to do with endogeneity? | I am answering under the supervision of CV's peers. Be critical.
Assume one has the following model specification
$\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{u}$
where $\boldsymbo | does serial correlation have something to do with endogeneity?
I am answering under the supervision of CV's peers. Be critical.
Assume one has the following model specification
$\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{u}$
where $\boldsymbol{y}$ is a $n \times 1$ vector, $\boldsymbol{X}$ an $n \times k$ matrix, $\boldsymbol{\beta}$ a $k \times 1$ hyperparameter and $\boldsymbol{u}$ a $n \times 1$ vector of homoscedastic but autocorrelated residuals. At this stage we still do not know how those are autocorrelated.
Assume that one omited to include another variable, say a $n \times 1$ vector $\boldsymbol{z}$, whose endogeneity consists of its autocorrelation such that
$\boldsymbol{z} = f(\boldsymbol{z})$
where $f$ is assumed to be a bijective/invertible vector function which specifies the correlation structure between the $n$ components $z_{i=1,...,n}$ of $\boldsymbol{z}$.
This means that $\boldsymbol{u}$ is hiddenly generated as follows (where $\gamma \neq 0$ is a scalar parameter and $\boldsymbol{v}$ is $n \times 1$ vector of errors assumed to be iid normal.)
$\boldsymbol{u} = \gamma\boldsymbol{z} + \boldsymbol{v} \iff \frac{1}{\gamma}(\boldsymbol{u}-\boldsymbol{v}) = \boldsymbol{z} \iff f(\frac{1}{\gamma}(\boldsymbol{u}-\boldsymbol{v})) = f(\boldsymbol{z})$
But since one has $\boldsymbol{z} = f(\boldsymbol{z})$, the above last equivalence can be turned into an equality. Which leads to
$\frac{\boldsymbol{u}-\boldsymbol{v}}{\gamma} = f(\frac{\boldsymbol{u}-\boldsymbol{v}}{\gamma}) \iff u = f(\frac{\boldsymbol{u}-\boldsymbol{v}}{\gamma})\gamma+\boldsymbol{v}$
Which shows that even if the correlation is not the same as the one there is between the components of $\boldsymbol{z}$, it does exist.
Thus yes serial correlation does have something to do with endogeneity when, e.g., this endogeneity consists of an omited autocorrelated variable whose autocorrelation structure is invertible.
But actually, it is very unlikely that $f$ be invertible. I mean that, if autocorrelation works through time, $f$ is the backshift operator, and it is not invertible. | does serial correlation have something to do with endogeneity?
I am answering under the supervision of CV's peers. Be critical.
Assume one has the following model specification
$\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{u}$
where $\boldsymbo |
29,776 | does serial correlation have something to do with endogeneity? | For OLS, we usually assume that observations are independent each other. If we write this in equation, $y_i = x'_i \beta + \epsilon_i$ and we assume $\epsilon_i$ and $\epsilon_j$ are independent if $i \not= j$.
Serial correlation violates this independence assumption; $\epsilon_i$ and $\epsilon_j$ are not independent. This can be caused by various reasons, and omitted variables are one possibility. An easy example where an omitted variable causes serial correlation is a case where $\epsilon_i = u_{i} + u_{i-1}$, where $u_i$ is an unknown random variable and shared across multiple observations. If $u$ and $x$ are correlated, the OLS estimates are biased due to the endogeneity. This may also reduce the efficiency due to the smaller variation across observations.
That said, the omitted variables do not always cause serial correlation. Suppose $\epsilon_i = u_{i}$. This can cause endogeneity if $u$ and $x$ are correlated. However, serial correlation may not occur if $u_i$ are independent from each other. | does serial correlation have something to do with endogeneity? | For OLS, we usually assume that observations are independent each other. If we write this in equation, $y_i = x'_i \beta + \epsilon_i$ and we assume $\epsilon_i$ and $\epsilon_j$ are independent if $i | does serial correlation have something to do with endogeneity?
For OLS, we usually assume that observations are independent each other. If we write this in equation, $y_i = x'_i \beta + \epsilon_i$ and we assume $\epsilon_i$ and $\epsilon_j$ are independent if $i \not= j$.
Serial correlation violates this independence assumption; $\epsilon_i$ and $\epsilon_j$ are not independent. This can be caused by various reasons, and omitted variables are one possibility. An easy example where an omitted variable causes serial correlation is a case where $\epsilon_i = u_{i} + u_{i-1}$, where $u_i$ is an unknown random variable and shared across multiple observations. If $u$ and $x$ are correlated, the OLS estimates are biased due to the endogeneity. This may also reduce the efficiency due to the smaller variation across observations.
That said, the omitted variables do not always cause serial correlation. Suppose $\epsilon_i = u_{i}$. This can cause endogeneity if $u$ and $x$ are correlated. However, serial correlation may not occur if $u_i$ are independent from each other. | does serial correlation have something to do with endogeneity?
For OLS, we usually assume that observations are independent each other. If we write this in equation, $y_i = x'_i \beta + \epsilon_i$ and we assume $\epsilon_i$ and $\epsilon_j$ are independent if $i |
29,777 | How do I test for independence with non-exclusive categorical variables? | I suggest do poisson regression separately on outcome1 and outcome2 (response variables) with class1, class2, class3 or class4 as explanatory variables.
You say that the classes are not exclusive, but this is not a problem if you take interaction between the classes into account. You can read more about interaction in the following post: Specification and interpretation of interaction terms using glm()
How to handle the dependency between the classes (in terms of doing a poisson regression), I see no way out of. You can measure the significance of the association with a chi-squared-test, and the strength of the association with Cramer's V. If this answers your question, I do not know. | How do I test for independence with non-exclusive categorical variables? | I suggest do poisson regression separately on outcome1 and outcome2 (response variables) with class1, class2, class3 or class4 as explanatory variables.
You say that the classes are not exclusive, but | How do I test for independence with non-exclusive categorical variables?
I suggest do poisson regression separately on outcome1 and outcome2 (response variables) with class1, class2, class3 or class4 as explanatory variables.
You say that the classes are not exclusive, but this is not a problem if you take interaction between the classes into account. You can read more about interaction in the following post: Specification and interpretation of interaction terms using glm()
How to handle the dependency between the classes (in terms of doing a poisson regression), I see no way out of. You can measure the significance of the association with a chi-squared-test, and the strength of the association with Cramer's V. If this answers your question, I do not know. | How do I test for independence with non-exclusive categorical variables?
I suggest do poisson regression separately on outcome1 and outcome2 (response variables) with class1, class2, class3 or class4 as explanatory variables.
You say that the classes are not exclusive, but |
29,778 | How to train a model when instead of a target we have a range where it is? | Based on comments, I think that you should write some code, which:
a) encode target values, as network-friendly variables
b) decode the output of network to parameters Gaussian-like function. | How to train a model when instead of a target we have a range where it is? | Based on comments, I think that you should write some code, which:
a) encode target values, as network-friendly variables
b) decode the output of network to parameters Gaussian-like function. | How to train a model when instead of a target we have a range where it is?
Based on comments, I think that you should write some code, which:
a) encode target values, as network-friendly variables
b) decode the output of network to parameters Gaussian-like function. | How to train a model when instead of a target we have a range where it is?
Based on comments, I think that you should write some code, which:
a) encode target values, as network-friendly variables
b) decode the output of network to parameters Gaussian-like function. |
29,779 | How to train a model when instead of a target we have a range where it is? | Have a look at survival analysis, which deals with events of the form you describe. In particular left, right, and interval censored data & regression (https://www.quantics.co.uk/blog/introduction-survival-analysis-clinical-trials/).
Code is available here
https://github.com/liupei101/TFDeepSurv
And
https://adamhaber.github.io/post/survival-analysis/ | How to train a model when instead of a target we have a range where it is? | Have a look at survival analysis, which deals with events of the form you describe. In particular left, right, and interval censored data & regression (https://www.quantics.co.uk/blog/introduction-su | How to train a model when instead of a target we have a range where it is?
Have a look at survival analysis, which deals with events of the form you describe. In particular left, right, and interval censored data & regression (https://www.quantics.co.uk/blog/introduction-survival-analysis-clinical-trials/).
Code is available here
https://github.com/liupei101/TFDeepSurv
And
https://adamhaber.github.io/post/survival-analysis/ | How to train a model when instead of a target we have a range where it is?
Have a look at survival analysis, which deals with events of the form you describe. In particular left, right, and interval censored data & regression (https://www.quantics.co.uk/blog/introduction-su |
29,780 | What is "baseline" in precision recall curve | The "baseline curve" in a PR curve plot is a horizontal line with height equal to the number of positive examples $P$ over the total number of
training data $N$, ie. the proportion of positive examples in our data ($\frac{P}{N}$).
OK, why is this the case though? Let's assume we have a "junk classifier" $C_J$. $C_J$ returns a random probability $p_i$ to the $i$-th sample instance $y_i$ to be in class $A$. For convenience, say $p_i \sim U[0,1]$.
The direct implication of this random class assignment is that $C_J$ will have (expected) precision equal to the proportion of positive examples in our data. It is only natural; any totally random sub-sample of our data will have $E\{\frac{P}{N}\}$ correctly classified examples. This will be true for any probability threshold $q$ we might use as a decision boundary for the probabilities of class membership returned by $C_J$. ($q$ denotes a value in $[0,1]$ where probability values greater or equal to $q$ are classified in class $A$.)
On the other hand the recall performance of $C_J$ is (in expectation) equal to $q$ if $p_i \sim U[0,1]$. At any given threshold $q$ we will pick (approximately) $(100(1-q))\%$ of our total data which subsequently will contain (approximately) $(100(1-q))\%$ of the total number of instances of class $A$ in the sample.
Hence the horizontal line we mentioned at the beginning! For every recall value ($x$ values in PR graph) the corresponding precision value ($y$ values in the PR graph) is equal to $\frac{P}{N}$.
A quick side-note: The threshold $q$ is not generally equal to 1 minus the expected recall. This happens in the case of a $C_J$ mentioned above only because of the random uniform distribution of $C_J$'s results; for a different distribution (eg. $ p_i \sim B(2,5)$) this approximate identity relation between $q$ and recall does not hold; $U[0,1]$ was used because it is the easiest to understand and mentally visualise. For a different random distribution in $[0,1]$ the PR profile of $C_J$ will not change though. Just the placement of P-R values for given $q$ values will change.
Now regarding a perfect classifier $C_P$, one would mean a classifier that returns probability $1$ to sample instance $y_i$ being of class $A$ if $y_i$ is indeed in class $A$ and additionally $C_P$ returns probability $0$ if $y_i$ is not a member of class $A$. This implies that for any threshold $q$ we will have $100\%$ precision (ie. in graph-terms we get a line starting at precision $100\%$). The only point we do not get $100\%$ precision is at $q = 0$. For $q=0$, the precision falls to the proportion of positive examples in our data ($\frac{P}{N}$) as (insanely?) we classify even points with $0$ probability of being of class $A$ as being in class $A$. The PR graph of $C_P$ has just two possible values for its precision, $1$ and $\frac{P}{N}$.
OK and some R code to see this first handed with an example where the positive values correspond to $40\%$ of our sample. Notice that we do a "soft-assignment" of class category in the sense that the probability value associated with each point quantifies to our confidence that this point is of class $A$.
rm(list= ls())
library(PRROC)
N = 40000
set.seed(444)
propOfPos = 0.40
trueLabels = rbinom(N,1,propOfPos)
randomProbsB = rbeta(n = N, 2, 5)
randomProbsU = runif(n = N)
# Junk classifier with beta distribution random results
pr1B <- pr.curve(scores.class0 = randomProbsB[trueLabels == 1],
scores.class1 = randomProbsB[trueLabels == 0], curve = TRUE)
# Junk classifier with uniformly distribution random results
pr1U <- pr.curve(scores.class0 = randomProbsU[trueLabels == 1],
scores.class1 = randomProbsU[trueLabels == 0], curve = TRUE)
# Perfect classifier with prob. 1 for positives and prob. 0 for negatives.
pr2 <- pr.curve(scores.class0 = rep(1, times= N*propOfPos),
scores.class1 = rep(0, times = N*(1-propOfPos)), curve = TRUE)
par(mfrow=c(1,3))
plot(pr1U, main ='"Junk" classifier (Unif(0,1))', auc.main= FALSE,
legend=FALSE, col='red', panel.first= grid(), cex.main = 1.5);
pcord = pr1U$curve[ which.min( abs(pr1U$curve[,3]- 0.50)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 1)
pcord = pr1U$curve[ which.min( abs(pr1U$curve[,3]- 0.20)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 17)
plot(pr1B, main ='"Junk" classifier (Beta(2,5))', auc.main= FALSE,
legend=FALSE, col='red', panel.first= grid(), cex.main = 1.5);
pcord = pr1B$curve[ which.min( abs(pr1B$curve[,3]- 0.50)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 1)
pcord = pr1B$curve[ which.min( abs(pr1B$curve[,3]- 0.20)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 17)
plot(pr2, main = '"Perfect" classifier', auc.main= FALSE,
legend=FALSE, col='red', panel.first= grid(), cex.main = 1.5);
where the black circles and triangles denote $q =0.50$ and $q=0.20$ respectively in the first two plots. We immediately see that the "junk" classifiers quickly go to precision equal to $\frac{P}{N}$; similarly the perfect classifier has precision $1$ across all recall variables. Unsurprisingly, the AUCPR for the "junk" classifier is equal to the proportion of positive example in our sample ($\approx 0.40$) and the AUCPR for the "perfect classifier" is approximately equal to $1$.
Realistically the PR graph of a perfect classifier is a bit useless because one cannot have $0$ recall ever (we never predict only the negative class); we just start plotting the line from the upper left corner as a matter of convention. Strictly speaking it should just show two points but this would make a horrible curve. :D
For the record, there are already have been some very good answer in CV regarding the utility of PR curves: here, here and here. Just reading through them carefully should offer a good general understand about PR curves. | What is "baseline" in precision recall curve | The "baseline curve" in a PR curve plot is a horizontal line with height equal to the number of positive examples $P$ over the total number of
training data $N$, ie. the proportion of positive exampl | What is "baseline" in precision recall curve
The "baseline curve" in a PR curve plot is a horizontal line with height equal to the number of positive examples $P$ over the total number of
training data $N$, ie. the proportion of positive examples in our data ($\frac{P}{N}$).
OK, why is this the case though? Let's assume we have a "junk classifier" $C_J$. $C_J$ returns a random probability $p_i$ to the $i$-th sample instance $y_i$ to be in class $A$. For convenience, say $p_i \sim U[0,1]$.
The direct implication of this random class assignment is that $C_J$ will have (expected) precision equal to the proportion of positive examples in our data. It is only natural; any totally random sub-sample of our data will have $E\{\frac{P}{N}\}$ correctly classified examples. This will be true for any probability threshold $q$ we might use as a decision boundary for the probabilities of class membership returned by $C_J$. ($q$ denotes a value in $[0,1]$ where probability values greater or equal to $q$ are classified in class $A$.)
On the other hand the recall performance of $C_J$ is (in expectation) equal to $q$ if $p_i \sim U[0,1]$. At any given threshold $q$ we will pick (approximately) $(100(1-q))\%$ of our total data which subsequently will contain (approximately) $(100(1-q))\%$ of the total number of instances of class $A$ in the sample.
Hence the horizontal line we mentioned at the beginning! For every recall value ($x$ values in PR graph) the corresponding precision value ($y$ values in the PR graph) is equal to $\frac{P}{N}$.
A quick side-note: The threshold $q$ is not generally equal to 1 minus the expected recall. This happens in the case of a $C_J$ mentioned above only because of the random uniform distribution of $C_J$'s results; for a different distribution (eg. $ p_i \sim B(2,5)$) this approximate identity relation between $q$ and recall does not hold; $U[0,1]$ was used because it is the easiest to understand and mentally visualise. For a different random distribution in $[0,1]$ the PR profile of $C_J$ will not change though. Just the placement of P-R values for given $q$ values will change.
Now regarding a perfect classifier $C_P$, one would mean a classifier that returns probability $1$ to sample instance $y_i$ being of class $A$ if $y_i$ is indeed in class $A$ and additionally $C_P$ returns probability $0$ if $y_i$ is not a member of class $A$. This implies that for any threshold $q$ we will have $100\%$ precision (ie. in graph-terms we get a line starting at precision $100\%$). The only point we do not get $100\%$ precision is at $q = 0$. For $q=0$, the precision falls to the proportion of positive examples in our data ($\frac{P}{N}$) as (insanely?) we classify even points with $0$ probability of being of class $A$ as being in class $A$. The PR graph of $C_P$ has just two possible values for its precision, $1$ and $\frac{P}{N}$.
OK and some R code to see this first handed with an example where the positive values correspond to $40\%$ of our sample. Notice that we do a "soft-assignment" of class category in the sense that the probability value associated with each point quantifies to our confidence that this point is of class $A$.
rm(list= ls())
library(PRROC)
N = 40000
set.seed(444)
propOfPos = 0.40
trueLabels = rbinom(N,1,propOfPos)
randomProbsB = rbeta(n = N, 2, 5)
randomProbsU = runif(n = N)
# Junk classifier with beta distribution random results
pr1B <- pr.curve(scores.class0 = randomProbsB[trueLabels == 1],
scores.class1 = randomProbsB[trueLabels == 0], curve = TRUE)
# Junk classifier with uniformly distribution random results
pr1U <- pr.curve(scores.class0 = randomProbsU[trueLabels == 1],
scores.class1 = randomProbsU[trueLabels == 0], curve = TRUE)
# Perfect classifier with prob. 1 for positives and prob. 0 for negatives.
pr2 <- pr.curve(scores.class0 = rep(1, times= N*propOfPos),
scores.class1 = rep(0, times = N*(1-propOfPos)), curve = TRUE)
par(mfrow=c(1,3))
plot(pr1U, main ='"Junk" classifier (Unif(0,1))', auc.main= FALSE,
legend=FALSE, col='red', panel.first= grid(), cex.main = 1.5);
pcord = pr1U$curve[ which.min( abs(pr1U$curve[,3]- 0.50)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 1)
pcord = pr1U$curve[ which.min( abs(pr1U$curve[,3]- 0.20)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 17)
plot(pr1B, main ='"Junk" classifier (Beta(2,5))', auc.main= FALSE,
legend=FALSE, col='red', panel.first= grid(), cex.main = 1.5);
pcord = pr1B$curve[ which.min( abs(pr1B$curve[,3]- 0.50)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 1)
pcord = pr1B$curve[ which.min( abs(pr1B$curve[,3]- 0.20)),c(1,2)];
points( pcord[1], pcord[2], col='black', cex= 2, pch = 17)
plot(pr2, main = '"Perfect" classifier', auc.main= FALSE,
legend=FALSE, col='red', panel.first= grid(), cex.main = 1.5);
where the black circles and triangles denote $q =0.50$ and $q=0.20$ respectively in the first two plots. We immediately see that the "junk" classifiers quickly go to precision equal to $\frac{P}{N}$; similarly the perfect classifier has precision $1$ across all recall variables. Unsurprisingly, the AUCPR for the "junk" classifier is equal to the proportion of positive example in our sample ($\approx 0.40$) and the AUCPR for the "perfect classifier" is approximately equal to $1$.
Realistically the PR graph of a perfect classifier is a bit useless because one cannot have $0$ recall ever (we never predict only the negative class); we just start plotting the line from the upper left corner as a matter of convention. Strictly speaking it should just show two points but this would make a horrible curve. :D
For the record, there are already have been some very good answer in CV regarding the utility of PR curves: here, here and here. Just reading through them carefully should offer a good general understand about PR curves. | What is "baseline" in precision recall curve
The "baseline curve" in a PR curve plot is a horizontal line with height equal to the number of positive examples $P$ over the total number of
training data $N$, ie. the proportion of positive exampl |
29,781 | What is "baseline" in precision recall curve | Great answer above. Here is my intuitive way of thinking about it. Imagine you have a bunch of balls red = positive and yellow = negative, and you throw them randomly into a bucket = positive fraction. Then if you have the same number of red and yellow balls, when you calculate PREC=tp/tp+fp=100/100+100 from your bucket red (positive) = yellow (negative), therefore, PREC=0.5. However, if I had 1000 red balls and 100 yellow balls, then in the bucket I would randomly expect PREC=tp/tp+fp=1000/1000+100=0.91 because that is the chance baseline in the positive fraction which is also RP/RP+RN, where RP = real positive and RN = real negative. | What is "baseline" in precision recall curve | Great answer above. Here is my intuitive way of thinking about it. Imagine you have a bunch of balls red = positive and yellow = negative, and you throw them randomly into a bucket = positive fraction | What is "baseline" in precision recall curve
Great answer above. Here is my intuitive way of thinking about it. Imagine you have a bunch of balls red = positive and yellow = negative, and you throw them randomly into a bucket = positive fraction. Then if you have the same number of red and yellow balls, when you calculate PREC=tp/tp+fp=100/100+100 from your bucket red (positive) = yellow (negative), therefore, PREC=0.5. However, if I had 1000 red balls and 100 yellow balls, then in the bucket I would randomly expect PREC=tp/tp+fp=1000/1000+100=0.91 because that is the chance baseline in the positive fraction which is also RP/RP+RN, where RP = real positive and RN = real negative. | What is "baseline" in precision recall curve
Great answer above. Here is my intuitive way of thinking about it. Imagine you have a bunch of balls red = positive and yellow = negative, and you throw them randomly into a bucket = positive fraction |
29,782 | Calculating standard deviation from log-normal distribution confidence intervals | I've solved this as follows:
$$SD = \frac{\left(\frac{\ln(\text{OR})-\ln(\text{Lower CI bound})}{1.96}\right)}{\sqrt n}$$
This represents the difference in the $\ln$ of the mean and lower confidence interval bound (which gives the error), divided by 1.96 (which gives the standard error), divided by $\sqrt{n}$ (which gives the standard deviation).
Since the meta-analysis didn't make use of patient-level and just combined studies using assumptions of random effects, $n$ was simply the number of studies (10 in this case). | Calculating standard deviation from log-normal distribution confidence intervals | I've solved this as follows:
$$SD = \frac{\left(\frac{\ln(\text{OR})-\ln(\text{Lower CI bound})}{1.96}\right)}{\sqrt n}$$
This represents the difference in the $\ln$ of the mean and lower confidence i | Calculating standard deviation from log-normal distribution confidence intervals
I've solved this as follows:
$$SD = \frac{\left(\frac{\ln(\text{OR})-\ln(\text{Lower CI bound})}{1.96}\right)}{\sqrt n}$$
This represents the difference in the $\ln$ of the mean and lower confidence interval bound (which gives the error), divided by 1.96 (which gives the standard error), divided by $\sqrt{n}$ (which gives the standard deviation).
Since the meta-analysis didn't make use of patient-level and just combined studies using assumptions of random effects, $n$ was simply the number of studies (10 in this case). | Calculating standard deviation from log-normal distribution confidence intervals
I've solved this as follows:
$$SD = \frac{\left(\frac{\ln(\text{OR})-\ln(\text{Lower CI bound})}{1.96}\right)}{\sqrt n}$$
This represents the difference in the $\ln$ of the mean and lower confidence i |
29,783 | Luce choice axiom, question about conditional probability [closed] | I see no reason that probability theory would have any difficulty framing this situation, or any variation on it. If the choice probabilities are conditioned on the choice set, then presumably the choice-set can be made an object in the analysis, and you can then specify conditional probabilities based on possible values of the choice-set. Also, the choice of car use is not fundamentally different from the others -- regardless of the choice made, there will be some causal consequences on the types of transport used now or in the future (e.g., if you don't take a bus then the bus company gets less money and it decides to reduce its services). The mere fact that actions have causal consequences, and there are counterfactual possibilities, does not seem to me to give rise to any problems in probability theory.
I always find descriptions of cases like this to be ill-posed. It is very easy to pose a complex situation, and then pose a simplistic probability framework that fails to capture the situation properly. That is not a deficiency of probability theory - it is just a case of not using it correctly. | Luce choice axiom, question about conditional probability [closed] | I see no reason that probability theory would have any difficulty framing this situation, or any variation on it. If the choice probabilities are conditioned on the choice set, then presumably the ch | Luce choice axiom, question about conditional probability [closed]
I see no reason that probability theory would have any difficulty framing this situation, or any variation on it. If the choice probabilities are conditioned on the choice set, then presumably the choice-set can be made an object in the analysis, and you can then specify conditional probabilities based on possible values of the choice-set. Also, the choice of car use is not fundamentally different from the others -- regardless of the choice made, there will be some causal consequences on the types of transport used now or in the future (e.g., if you don't take a bus then the bus company gets less money and it decides to reduce its services). The mere fact that actions have causal consequences, and there are counterfactual possibilities, does not seem to me to give rise to any problems in probability theory.
I always find descriptions of cases like this to be ill-posed. It is very easy to pose a complex situation, and then pose a simplistic probability framework that fails to capture the situation properly. That is not a deficiency of probability theory - it is just a case of not using it correctly. | Luce choice axiom, question about conditional probability [closed]
I see no reason that probability theory would have any difficulty framing this situation, or any variation on it. If the choice probabilities are conditioned on the choice set, then presumably the ch |
29,784 | Machine learning cookbook / reference card / cheatsheet? | Some of the best and freely available resources are:
Hastie, Friedman et al. The Elements of Statistical Learning: Data Mining, Inference, and Prediction
David Barber. Bayesian Reasoning and Machine Learning
David MacKay. Information Theory, Inference and Learning Algorithms (http://www.inference.phy.cam.ac.uk/mackay/itila/)
As to the author's question I haven't met "All in one page" solution | Machine learning cookbook / reference card / cheatsheet? | Some of the best and freely available resources are:
Hastie, Friedman et al. The Elements of Statistical Learning: Data Mining, Inference, and Prediction
David Barber. Bayesian Reasoning and Machine | Machine learning cookbook / reference card / cheatsheet?
Some of the best and freely available resources are:
Hastie, Friedman et al. The Elements of Statistical Learning: Data Mining, Inference, and Prediction
David Barber. Bayesian Reasoning and Machine Learning
David MacKay. Information Theory, Inference and Learning Algorithms (http://www.inference.phy.cam.ac.uk/mackay/itila/)
As to the author's question I haven't met "All in one page" solution | Machine learning cookbook / reference card / cheatsheet?
Some of the best and freely available resources are:
Hastie, Friedman et al. The Elements of Statistical Learning: Data Mining, Inference, and Prediction
David Barber. Bayesian Reasoning and Machine |
29,785 | Machine learning cookbook / reference card / cheatsheet? | If you want to learn Machine Learning I strongly advise you enroll in the free online ML course in the winter taught by Prof. Andrew Ng.
I did the previous one in the autumn and all learning material is of exceptional quality and geared toward practical applications, and a lot easier to grok that struggling alone with a book.
It's also made a pretty low hanging fruit with good intuitive explanations and the minimum amount of math. | Machine learning cookbook / reference card / cheatsheet? | If you want to learn Machine Learning I strongly advise you enroll in the free online ML course in the winter taught by Prof. Andrew Ng.
I did the previous one in the autumn and all learning material | Machine learning cookbook / reference card / cheatsheet?
If you want to learn Machine Learning I strongly advise you enroll in the free online ML course in the winter taught by Prof. Andrew Ng.
I did the previous one in the autumn and all learning material is of exceptional quality and geared toward practical applications, and a lot easier to grok that struggling alone with a book.
It's also made a pretty low hanging fruit with good intuitive explanations and the minimum amount of math. | Machine learning cookbook / reference card / cheatsheet?
If you want to learn Machine Learning I strongly advise you enroll in the free online ML course in the winter taught by Prof. Andrew Ng.
I did the previous one in the autumn and all learning material |
29,786 | Machine learning cookbook / reference card / cheatsheet? | Yes, you are fine; Christopher Bishop's "Pattern Recognition and Machine Learning" is an excellent book for general reference, you can't really go wrong with it.
A fairly recent book but also very well-written and equally broad is David Barber's "Bayesian Reasoning and Machine Learning"; a book I would feel is slightly more suitable for a new-comer in the field.
I have used "The Elements of Statistical Learning" from Hastie et al. (mentioned by Macro) and while a very strong book I would not recommended it as a first reference; maybe it would serve you better as a second reference for more specialized topics. In that aspect, David MacKay's book, Information Theory, Inference, and Learning Algorithms, can also do a splendid job. | Machine learning cookbook / reference card / cheatsheet? | Yes, you are fine; Christopher Bishop's "Pattern Recognition and Machine Learning" is an excellent book for general reference, you can't really go wrong with it.
A fairly recent book but also very wel | Machine learning cookbook / reference card / cheatsheet?
Yes, you are fine; Christopher Bishop's "Pattern Recognition and Machine Learning" is an excellent book for general reference, you can't really go wrong with it.
A fairly recent book but also very well-written and equally broad is David Barber's "Bayesian Reasoning and Machine Learning"; a book I would feel is slightly more suitable for a new-comer in the field.
I have used "The Elements of Statistical Learning" from Hastie et al. (mentioned by Macro) and while a very strong book I would not recommended it as a first reference; maybe it would serve you better as a second reference for more specialized topics. In that aspect, David MacKay's book, Information Theory, Inference, and Learning Algorithms, can also do a splendid job. | Machine learning cookbook / reference card / cheatsheet?
Yes, you are fine; Christopher Bishop's "Pattern Recognition and Machine Learning" is an excellent book for general reference, you can't really go wrong with it.
A fairly recent book but also very wel |
29,787 | Machine learning cookbook / reference card / cheatsheet? | Since the consensus seems to be that this question is not a duplicate, I'd like to share my favorite for machine learner beginners:
I found Programming Collective Intelligence the easiest book for beginners, since the author Toby Segaran is is focused on allowing the median software developer to get his/her hands dirty with data hacking as fast as possible.
Typical chapter: The data problem is clearly described, followed by a rough explanation how the algorithm works and finally shows how to create some insights with just a few lines of code.
The usage of python allows one to understand everything rather fast (you do not need to know python, seriously, I did not know it before, too). DONT think that this book is only focused on creating recommender system. It also deals with text mining / spam filtering / optimization / clustering / validation etc. and hence gives you a neat overview over the basic tools of every data miner. | Machine learning cookbook / reference card / cheatsheet? | Since the consensus seems to be that this question is not a duplicate, I'd like to share my favorite for machine learner beginners:
I found Programming Collective Intelligence the easiest book for beg | Machine learning cookbook / reference card / cheatsheet?
Since the consensus seems to be that this question is not a duplicate, I'd like to share my favorite for machine learner beginners:
I found Programming Collective Intelligence the easiest book for beginners, since the author Toby Segaran is is focused on allowing the median software developer to get his/her hands dirty with data hacking as fast as possible.
Typical chapter: The data problem is clearly described, followed by a rough explanation how the algorithm works and finally shows how to create some insights with just a few lines of code.
The usage of python allows one to understand everything rather fast (you do not need to know python, seriously, I did not know it before, too). DONT think that this book is only focused on creating recommender system. It also deals with text mining / spam filtering / optimization / clustering / validation etc. and hence gives you a neat overview over the basic tools of every data miner. | Machine learning cookbook / reference card / cheatsheet?
Since the consensus seems to be that this question is not a duplicate, I'd like to share my favorite for machine learner beginners:
I found Programming Collective Intelligence the easiest book for beg |
29,788 | Machine learning cookbook / reference card / cheatsheet? | Witten and Frank, "Data Mining", Elsevier 2005 is a good book for self-learning as there is a Java library of code (Weka) to go with the book and is very practically oriented. I suspect there is a more recent edition than the one I have. | Machine learning cookbook / reference card / cheatsheet? | Witten and Frank, "Data Mining", Elsevier 2005 is a good book for self-learning as there is a Java library of code (Weka) to go with the book and is very practically oriented. I suspect there is a mo | Machine learning cookbook / reference card / cheatsheet?
Witten and Frank, "Data Mining", Elsevier 2005 is a good book for self-learning as there is a Java library of code (Weka) to go with the book and is very practically oriented. I suspect there is a more recent edition than the one I have. | Machine learning cookbook / reference card / cheatsheet?
Witten and Frank, "Data Mining", Elsevier 2005 is a good book for self-learning as there is a Java library of code (Weka) to go with the book and is very practically oriented. I suspect there is a mo |
29,789 | Machine learning cookbook / reference card / cheatsheet? | I have Machine Learning: An Algorithmic Perspective by Stephen Marsland and find it very useful for self-learning. Python code is given throughout the book.
I agree with what is said in this favourable review:
http://blog.rtwilson.com/review-machine-learning-an-algorithmic-perspective-by-stephen-marsland/ | Machine learning cookbook / reference card / cheatsheet? | I have Machine Learning: An Algorithmic Perspective by Stephen Marsland and find it very useful for self-learning. Python code is given throughout the book.
I agree with what is said in this favourab | Machine learning cookbook / reference card / cheatsheet?
I have Machine Learning: An Algorithmic Perspective by Stephen Marsland and find it very useful for self-learning. Python code is given throughout the book.
I agree with what is said in this favourable review:
http://blog.rtwilson.com/review-machine-learning-an-algorithmic-perspective-by-stephen-marsland/ | Machine learning cookbook / reference card / cheatsheet?
I have Machine Learning: An Algorithmic Perspective by Stephen Marsland and find it very useful for self-learning. Python code is given throughout the book.
I agree with what is said in this favourab |
29,790 | Machine learning cookbook / reference card / cheatsheet? | http://scikit-learn.org/stable/tutorial/machine_learning_map/
Often the hardest part of solving a machine learning problem can be finding the right estimator for the job.
Different estimators are better suited for different types of data and different problems.
The flowchart below is designed to give users a bit of a rough guide on how to approach problems with regard to which estimators to try on your data.
Click on any estimator in the chart below to see it’s documentation. | Machine learning cookbook / reference card / cheatsheet? | http://scikit-learn.org/stable/tutorial/machine_learning_map/
Often the hardest part of solving a machine learning problem can be finding the right estimator for the job.
Different estimators are | Machine learning cookbook / reference card / cheatsheet?
http://scikit-learn.org/stable/tutorial/machine_learning_map/
Often the hardest part of solving a machine learning problem can be finding the right estimator for the job.
Different estimators are better suited for different types of data and different problems.
The flowchart below is designed to give users a bit of a rough guide on how to approach problems with regard to which estimators to try on your data.
Click on any estimator in the chart below to see it’s documentation. | Machine learning cookbook / reference card / cheatsheet?
http://scikit-learn.org/stable/tutorial/machine_learning_map/
Often the hardest part of solving a machine learning problem can be finding the right estimator for the job.
Different estimators are |
29,791 | Machine learning cookbook / reference card / cheatsheet? | "Elements of Statistical Learning" would be a great book for your purposes. The and 5th printing (2011) of the 2nd edition (2009) of the book is freely available at http://www.stanford.edu/~hastie/local.ftp/Springer/ESLII_print5.pdf | Machine learning cookbook / reference card / cheatsheet? | "Elements of Statistical Learning" would be a great book for your purposes. The and 5th printing (2011) of the 2nd edition (2009) of the book is freely available at http://www.stanford.edu/~hastie/lo | Machine learning cookbook / reference card / cheatsheet?
"Elements of Statistical Learning" would be a great book for your purposes. The and 5th printing (2011) of the 2nd edition (2009) of the book is freely available at http://www.stanford.edu/~hastie/local.ftp/Springer/ESLII_print5.pdf | Machine learning cookbook / reference card / cheatsheet?
"Elements of Statistical Learning" would be a great book for your purposes. The and 5th printing (2011) of the 2nd edition (2009) of the book is freely available at http://www.stanford.edu/~hastie/lo |
29,792 | Machine learning cookbook / reference card / cheatsheet? | The awesome-machine-learning repository seems to be a master list of resources, including code, tutorials and books. | Machine learning cookbook / reference card / cheatsheet? | The awesome-machine-learning repository seems to be a master list of resources, including code, tutorials and books. | Machine learning cookbook / reference card / cheatsheet?
The awesome-machine-learning repository seems to be a master list of resources, including code, tutorials and books. | Machine learning cookbook / reference card / cheatsheet?
The awesome-machine-learning repository seems to be a master list of resources, including code, tutorials and books. |
29,793 | Machine learning cookbook / reference card / cheatsheet? | Most books mentioned in other answers are very good and you can't really go wrong with any of them. Additionally, I find the following cheat sheet for Python's scikit-learn quite useful. | Machine learning cookbook / reference card / cheatsheet? | Most books mentioned in other answers are very good and you can't really go wrong with any of them. Additionally, I find the following cheat sheet for Python's scikit-learn quite useful. | Machine learning cookbook / reference card / cheatsheet?
Most books mentioned in other answers are very good and you can't really go wrong with any of them. Additionally, I find the following cheat sheet for Python's scikit-learn quite useful. | Machine learning cookbook / reference card / cheatsheet?
Most books mentioned in other answers are very good and you can't really go wrong with any of them. Additionally, I find the following cheat sheet for Python's scikit-learn quite useful. |
29,794 | Machine learning cookbook / reference card / cheatsheet? | Microsoft Azure also provides a similar cheat-sheet to the scikit-learn one posted by Anton Tarasenko.
(source: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-cheat-sheet)
They accompany it with a notice:
The suggestions offered in this algorithm cheat sheet are approximate
rules-of-thumb. Some can be bent, and some can be flagrantly violated.
This is intended to suggest a starting point. (...)
Microsoft additionally provides an introductory article providing further details.
Please notice that those materials are focused on the methods implemented in Microsoft Azure. | Machine learning cookbook / reference card / cheatsheet? | Microsoft Azure also provides a similar cheat-sheet to the scikit-learn one posted by Anton Tarasenko.
(source: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-chea | Machine learning cookbook / reference card / cheatsheet?
Microsoft Azure also provides a similar cheat-sheet to the scikit-learn one posted by Anton Tarasenko.
(source: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-cheat-sheet)
They accompany it with a notice:
The suggestions offered in this algorithm cheat sheet are approximate
rules-of-thumb. Some can be bent, and some can be flagrantly violated.
This is intended to suggest a starting point. (...)
Microsoft additionally provides an introductory article providing further details.
Please notice that those materials are focused on the methods implemented in Microsoft Azure. | Machine learning cookbook / reference card / cheatsheet?
Microsoft Azure also provides a similar cheat-sheet to the scikit-learn one posted by Anton Tarasenko.
(source: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-chea |
29,795 | Machine learning cookbook / reference card / cheatsheet? | I like Duda, Hart and Stork "Pattern Classification". This is a recent revision of a classic text that explains everything very well. Not sure that it is updated to have much coverage of neural networks and SVMs. The book by Hastie, Tibshirani and Friedman is about the best there is but may be a bit more technical than what you are looking for and is detailed rather than an overview of the subject. | Machine learning cookbook / reference card / cheatsheet? | I like Duda, Hart and Stork "Pattern Classification". This is a recent revision of a classic text that explains everything very well. Not sure that it is updated to have much coverage of neural netw | Machine learning cookbook / reference card / cheatsheet?
I like Duda, Hart and Stork "Pattern Classification". This is a recent revision of a classic text that explains everything very well. Not sure that it is updated to have much coverage of neural networks and SVMs. The book by Hastie, Tibshirani and Friedman is about the best there is but may be a bit more technical than what you are looking for and is detailed rather than an overview of the subject. | Machine learning cookbook / reference card / cheatsheet?
I like Duda, Hart and Stork "Pattern Classification". This is a recent revision of a classic text that explains everything very well. Not sure that it is updated to have much coverage of neural netw |
29,796 | Machine learning cookbook / reference card / cheatsheet? | Don't start with Elements of Statistical Learning. It is great, but it is a reference book, which doesn't sound like what you are looking for. I would start with Programming Collective Intelligence as it's an easy read. | Machine learning cookbook / reference card / cheatsheet? | Don't start with Elements of Statistical Learning. It is great, but it is a reference book, which doesn't sound like what you are looking for. I would start with Programming Collective Intelligence as | Machine learning cookbook / reference card / cheatsheet?
Don't start with Elements of Statistical Learning. It is great, but it is a reference book, which doesn't sound like what you are looking for. I would start with Programming Collective Intelligence as it's an easy read. | Machine learning cookbook / reference card / cheatsheet?
Don't start with Elements of Statistical Learning. It is great, but it is a reference book, which doesn't sound like what you are looking for. I would start with Programming Collective Intelligence as |
29,797 | Machine learning cookbook / reference card / cheatsheet? | For a first book on machine learning, which does a good job of explaining the principles, I would strongly recommend
Rogers and Girolami, A First Course in Machine Learning,
(Chapman & Hall/CRC Machine Learning & Pattern Recognition), 2011.
Chris Bishop's book, or David Barber's both make good choices for a book with greater breadth, once you have a good grasp of the principles. | Machine learning cookbook / reference card / cheatsheet? | For a first book on machine learning, which does a good job of explaining the principles, I would strongly recommend
Rogers and Girolami, A First Course in Machine Learning,
(Chapman & Hall/CRC Mac | Machine learning cookbook / reference card / cheatsheet?
For a first book on machine learning, which does a good job of explaining the principles, I would strongly recommend
Rogers and Girolami, A First Course in Machine Learning,
(Chapman & Hall/CRC Machine Learning & Pattern Recognition), 2011.
Chris Bishop's book, or David Barber's both make good choices for a book with greater breadth, once you have a good grasp of the principles. | Machine learning cookbook / reference card / cheatsheet?
For a first book on machine learning, which does a good job of explaining the principles, I would strongly recommend
Rogers and Girolami, A First Course in Machine Learning,
(Chapman & Hall/CRC Mac |
29,798 | Machine learning cookbook / reference card / cheatsheet? | I wrote a summary like that, but only on one machine learning task (Netflix Prize), and it has 195 pages:
http://arek-paterek.com/book | Machine learning cookbook / reference card / cheatsheet? | I wrote a summary like that, but only on one machine learning task (Netflix Prize), and it has 195 pages:
http://arek-paterek.com/book | Machine learning cookbook / reference card / cheatsheet?
I wrote a summary like that, but only on one machine learning task (Netflix Prize), and it has 195 pages:
http://arek-paterek.com/book | Machine learning cookbook / reference card / cheatsheet?
I wrote a summary like that, but only on one machine learning task (Netflix Prize), and it has 195 pages:
http://arek-paterek.com/book |
29,799 | Machine learning cookbook / reference card / cheatsheet? | Check this link featuring some free ebooks on machine learning : http://designimag.com/best-free-machine-learning-ebooks/. it might be useful for you. | Machine learning cookbook / reference card / cheatsheet? | Check this link featuring some free ebooks on machine learning : http://designimag.com/best-free-machine-learning-ebooks/. it might be useful for you. | Machine learning cookbook / reference card / cheatsheet?
Check this link featuring some free ebooks on machine learning : http://designimag.com/best-free-machine-learning-ebooks/. it might be useful for you. | Machine learning cookbook / reference card / cheatsheet?
Check this link featuring some free ebooks on machine learning : http://designimag.com/best-free-machine-learning-ebooks/. it might be useful for you. |
29,800 | Machine learning cookbook / reference card / cheatsheet? | A good cheatsheet is the one in Max Kuhn book Applied Predictive Modeling. In the book there is a good summary table of several ML learning models. The table is in appendix A page 549: | Machine learning cookbook / reference card / cheatsheet? | A good cheatsheet is the one in Max Kuhn book Applied Predictive Modeling. In the book there is a good summary table of several ML learning models. The table is in appendix A page 549: | Machine learning cookbook / reference card / cheatsheet?
A good cheatsheet is the one in Max Kuhn book Applied Predictive Modeling. In the book there is a good summary table of several ML learning models. The table is in appendix A page 549: | Machine learning cookbook / reference card / cheatsheet?
A good cheatsheet is the one in Max Kuhn book Applied Predictive Modeling. In the book there is a good summary table of several ML learning models. The table is in appendix A page 549: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.