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
11,201
Equations in the news: Translating a multi-level model to a general audience
"Your teaching score depends on how well your students did compared to a prediction made based on What they knew beforehand, as measured by a pretest, How well we think the students can learn based on what we know about them individually (their "characteristics"), And how well students do on average in your district, school, and classroom (if there are other teachers in your classroom). "In other words, we are evaluating you based on the amount of learning that was measured, after factoring in the preparation and characteristics of your students and the typical performances of all students in settings like yours with the resources that were available to you. "In this way your score reflects what you contributed to the student performances, insofar as we can determine that. Of course we cannot know everything: we know you had unique and special students and that the situation you faced could never be duplicated. Therefore we know this score is only an estimate that imperfectly reflects how well you taught, but it is a fairer and more accurate estimate than one based solely on post testing or on raw test gains made by your class."
Equations in the news: Translating a multi-level model to a general audience
"Your teaching score depends on how well your students did compared to a prediction made based on What they knew beforehand, as measured by a pretest, How well we think the students can learn based o
Equations in the news: Translating a multi-level model to a general audience "Your teaching score depends on how well your students did compared to a prediction made based on What they knew beforehand, as measured by a pretest, How well we think the students can learn based on what we know about them individually (their "characteristics"), And how well students do on average in your district, school, and classroom (if there are other teachers in your classroom). "In other words, we are evaluating you based on the amount of learning that was measured, after factoring in the preparation and characteristics of your students and the typical performances of all students in settings like yours with the resources that were available to you. "In this way your score reflects what you contributed to the student performances, insofar as we can determine that. Of course we cannot know everything: we know you had unique and special students and that the situation you faced could never be duplicated. Therefore we know this score is only an estimate that imperfectly reflects how well you taught, but it is a fairer and more accurate estimate than one based solely on post testing or on raw test gains made by your class."
Equations in the news: Translating a multi-level model to a general audience "Your teaching score depends on how well your students did compared to a prediction made based on What they knew beforehand, as measured by a pretest, How well we think the students can learn based o
11,202
Equations in the news: Translating a multi-level model to a general audience
There is just nothing to understand here. Well, ok, it is just a standard linear regression model. It assumes that the score of a student can be described as a linear function of several factors, including school and teacher efficiency coefficients -- thus it shares all the standard problems of linear models, mainly the fact that it is a great approximation of a nonlinear world and may as well work perfectly or embarrassingly bad depending on a situation and on how far one would try to extrapolate with it. (However one should expect the authors of the tech rep checked it and found out that it's ok ;-) ). But the real problem is that this is an analytical tool and such shouldn't be used to assess people achievements -- this way (totally regardless if the marks are fair or not) every evaluee trying to understand her/his mark (probably in hope of optimizing it) will only meet hopeless confusion, as in this case.
Equations in the news: Translating a multi-level model to a general audience
There is just nothing to understand here. Well, ok, it is just a standard linear regression model. It assumes that the score of a student can be described as a linear function of several factors, incl
Equations in the news: Translating a multi-level model to a general audience There is just nothing to understand here. Well, ok, it is just a standard linear regression model. It assumes that the score of a student can be described as a linear function of several factors, including school and teacher efficiency coefficients -- thus it shares all the standard problems of linear models, mainly the fact that it is a great approximation of a nonlinear world and may as well work perfectly or embarrassingly bad depending on a situation and on how far one would try to extrapolate with it. (However one should expect the authors of the tech rep checked it and found out that it's ok ;-) ). But the real problem is that this is an analytical tool and such shouldn't be used to assess people achievements -- this way (totally regardless if the marks are fair or not) every evaluee trying to understand her/his mark (probably in hope of optimizing it) will only meet hopeless confusion, as in this case.
Equations in the news: Translating a multi-level model to a general audience There is just nothing to understand here. Well, ok, it is just a standard linear regression model. It assumes that the score of a student can be described as a linear function of several factors, incl
11,203
How does one interpret histograms given by TensorFlow in TensorBoard?
Currently the name "histogram" is a misnomer. You can find evidence of that in the README. The meaning of the histogram interface might change some day as they said there. However, this is what it currently means. The graphs in your question mix different runs of TensorFlow. Instead, look at the following graphs that display only one run: First what I'd like to say is that the curves themselves represent percentiles. I will borrow the picture from here: which means that the curve labeled 93% is the 93rd percentile, meaning that 93% of the observations were below the value ~0.130 at the time step 1.00k. So the graph gives 3 things of information, the percentage of observations bellow a certain value according to some think curve at every time step of the computation of the Neural network training (at least in this case its what the steps mean). This gives you a feel of the distribution of values of your network. There are also the minimum and maximum values to get a sense of the range of values during training. So the y-axis tells you the value you are interested and the curve tells you the percentile and the x axis at the step. So if you have: $$ (x,f_i(x) = y)$$ it means that at the step x according to the percentile curve $i$ there are less than $i$% of the values bellow the value y.
How does one interpret histograms given by TensorFlow in TensorBoard?
Currently the name "histogram" is a misnomer. You can find evidence of that in the README. The meaning of the histogram interface might change some day as they said there. However, this is what it cur
How does one interpret histograms given by TensorFlow in TensorBoard? Currently the name "histogram" is a misnomer. You can find evidence of that in the README. The meaning of the histogram interface might change some day as they said there. However, this is what it currently means. The graphs in your question mix different runs of TensorFlow. Instead, look at the following graphs that display only one run: First what I'd like to say is that the curves themselves represent percentiles. I will borrow the picture from here: which means that the curve labeled 93% is the 93rd percentile, meaning that 93% of the observations were below the value ~0.130 at the time step 1.00k. So the graph gives 3 things of information, the percentage of observations bellow a certain value according to some think curve at every time step of the computation of the Neural network training (at least in this case its what the steps mean). This gives you a feel of the distribution of values of your network. There are also the minimum and maximum values to get a sense of the range of values during training. So the y-axis tells you the value you are interested and the curve tells you the percentile and the x axis at the step. So if you have: $$ (x,f_i(x) = y)$$ it means that at the step x according to the percentile curve $i$ there are less than $i$% of the values bellow the value y.
How does one interpret histograms given by TensorFlow in TensorBoard? Currently the name "histogram" is a misnomer. You can find evidence of that in the README. The meaning of the histogram interface might change some day as they said there. However, this is what it cur
11,204
Similarity measures between curves?
You are comparing trajectories, or curves. This is a studied topic. Procrustes analysis and dynamic time warping, as EMS says, are tools of the trade. Once you've aligned the curves you'll want to measure the distance, say the Fréchet distance. If you want to share some of your data we could take a crack at it ourselves. Relevant reading: Curve Matching, Time Warping, and Light Fields: New Algorithms for Computing Similarity between Curves Discovering Similar Multidimensional Trajectories (uses the LCSS for robustness) If you disregard the temporal dimension: You could fit the User and Teacher to multivariate Gaussian densities and find the volume of their product--that's pretty easy. If you want more accuracy, you could use a nonparametric density estimate instead.
Similarity measures between curves?
You are comparing trajectories, or curves. This is a studied topic. Procrustes analysis and dynamic time warping, as EMS says, are tools of the trade. Once you've aligned the curves you'll want to mea
Similarity measures between curves? You are comparing trajectories, or curves. This is a studied topic. Procrustes analysis and dynamic time warping, as EMS says, are tools of the trade. Once you've aligned the curves you'll want to measure the distance, say the Fréchet distance. If you want to share some of your data we could take a crack at it ourselves. Relevant reading: Curve Matching, Time Warping, and Light Fields: New Algorithms for Computing Similarity between Curves Discovering Similar Multidimensional Trajectories (uses the LCSS for robustness) If you disregard the temporal dimension: You could fit the User and Teacher to multivariate Gaussian densities and find the volume of their product--that's pretty easy. If you want more accuracy, you could use a nonparametric density estimate instead.
Similarity measures between curves? You are comparing trajectories, or curves. This is a studied topic. Procrustes analysis and dynamic time warping, as EMS says, are tools of the trade. Once you've aligned the curves you'll want to mea
11,205
Similarity measures between curves?
You might consider Procrustes distance, or some distance based on dynamic time warping (even if one of your dimensions is not "time" per se, you can still use this transformation idea). See this recent work on Tracklets for an illustrative use case of dynamic time warping for measuring similarity between 3D space curves carved out by point trajectories in videos. There are many libraries with built-in Procrustes distance calculations, such as Matlab, or the PyGeometry library for Python.
Similarity measures between curves?
You might consider Procrustes distance, or some distance based on dynamic time warping (even if one of your dimensions is not "time" per se, you can still use this transformation idea). See this recen
Similarity measures between curves? You might consider Procrustes distance, or some distance based on dynamic time warping (even if one of your dimensions is not "time" per se, you can still use this transformation idea). See this recent work on Tracklets for an illustrative use case of dynamic time warping for measuring similarity between 3D space curves carved out by point trajectories in videos. There are many libraries with built-in Procrustes distance calculations, such as Matlab, or the PyGeometry library for Python.
Similarity measures between curves? You might consider Procrustes distance, or some distance based on dynamic time warping (even if one of your dimensions is not "time" per se, you can still use this transformation idea). See this recen
11,206
Similarity measures between curves?
The original post asked for a metric between ORDERED points in 3D. The only such metric is the Frechet distance. There was no mention of time as one of the dimensions, so I would assume that all the dimensions have units of distance (i.e. the units are not mixed). This can be done by modifying a function recently uploaded to the MathWorks file exchange (Frechet distance calculation: http://www.mathworks.com/matlabcentral/fileexchange/38714). These routines were written for points in the plane, but the extension to 3D points is straightforward.
Similarity measures between curves?
The original post asked for a metric between ORDERED points in 3D. The only such metric is the Frechet distance. There was no mention of time as one of the dimensions, so I would assume that all the
Similarity measures between curves? The original post asked for a metric between ORDERED points in 3D. The only such metric is the Frechet distance. There was no mention of time as one of the dimensions, so I would assume that all the dimensions have units of distance (i.e. the units are not mixed). This can be done by modifying a function recently uploaded to the MathWorks file exchange (Frechet distance calculation: http://www.mathworks.com/matlabcentral/fileexchange/38714). These routines were written for points in the plane, but the extension to 3D points is straightforward.
Similarity measures between curves? The original post asked for a metric between ORDERED points in 3D. The only such metric is the Frechet distance. There was no mention of time as one of the dimensions, so I would assume that all the
11,207
Similarity measures between curves?
Hausdorff Distance might be what you are looking for. Hausdorff Distance between two point sets $X$ and $Y$ is defined as, $d_H(X, Y) = \max \{\sup_{x \in X} \inf_{y \in Y} ||x - y||, \sup_{y \in Y} \inf_{x \in X} ||x - y||\}$.
Similarity measures between curves?
Hausdorff Distance might be what you are looking for. Hausdorff Distance between two point sets $X$ and $Y$ is defined as, $d_H(X, Y) = \max \{\sup_{x \in X} \inf_{y \in Y} ||x - y||, \sup_{y \in Y} \
Similarity measures between curves? Hausdorff Distance might be what you are looking for. Hausdorff Distance between two point sets $X$ and $Y$ is defined as, $d_H(X, Y) = \max \{\sup_{x \in X} \inf_{y \in Y} ||x - y||, \sup_{y \in Y} \inf_{x \in X} ||x - y||\}$.
Similarity measures between curves? Hausdorff Distance might be what you are looking for. Hausdorff Distance between two point sets $X$ and $Y$ is defined as, $d_H(X, Y) = \max \{\sup_{x \in X} \inf_{y \in Y} ||x - y||, \sup_{y \in Y} \
11,208
Similarity measures between curves?
Similarity is quantity that reflects the strength of relationship between two objects or two features. This quantity is usually having range of either -1 to +1 or normalized into 0 to 1. Than you need to calculate the distance of two features by one of the methods below: Simple Matching distance Jaccard's distance Hamming distance Jaccard's coefficient simple matching coefficient For line... you can represent it by angle (a) and length (l) properties or L1= P1(x1,y1), P2(x2,y2) below is the similarity with a and l. now measure the angle for angles and lengths A_user =20 and Length_User =50 A_teacher30 and Length_Teacher =55 Now, normalize the values. Using euclidean distance similarity = SquareRoot((A_user - A_teacher30 )^2 +(Length_User - Length_Teacher )^2) gives the similarity measure. You can also use above mentioned methods based on the problem and the features.
Similarity measures between curves?
Similarity is quantity that reflects the strength of relationship between two objects or two features. This quantity is usually having range of either -1 to +1 or normalized into 0 to 1. Than you need
Similarity measures between curves? Similarity is quantity that reflects the strength of relationship between two objects or two features. This quantity is usually having range of either -1 to +1 or normalized into 0 to 1. Than you need to calculate the distance of two features by one of the methods below: Simple Matching distance Jaccard's distance Hamming distance Jaccard's coefficient simple matching coefficient For line... you can represent it by angle (a) and length (l) properties or L1= P1(x1,y1), P2(x2,y2) below is the similarity with a and l. now measure the angle for angles and lengths A_user =20 and Length_User =50 A_teacher30 and Length_Teacher =55 Now, normalize the values. Using euclidean distance similarity = SquareRoot((A_user - A_teacher30 )^2 +(Length_User - Length_Teacher )^2) gives the similarity measure. You can also use above mentioned methods based on the problem and the features.
Similarity measures between curves? Similarity is quantity that reflects the strength of relationship between two objects or two features. This quantity is usually having range of either -1 to +1 or normalized into 0 to 1. Than you need
11,209
Visualizing the calibration of predicted probability of a model
Your thinking is good. John Tukey recommended binning by halves: split the data into upper and lower halves, then split those halves, then split the extreme halves recursively. Compared to equal-width binning, this allows visual inspection of tail behavior without devoting too many graphical elements to the bulk of the data (in the middle). Here is an example (using R) of Tukey's approach. (It's not exactly the same: he implemented mletter a little differently.) First, let's create some predictions and some outcomes that conform to those predictions: set.seed(17) prediction <- rbeta(500, 3/2, 5/2) actual <- rbinom(length(prediction), 1, prediction) plot(prediction, actual, col="Gray", cex=0.8) The plot is not very informative, because all the actual values are, of course, either $0$ (did not occur) or $1$ (did occur). (It appears as the background of gray open circles in the first figure below.) This plot needs smoothing. To do so, we bin the data. Function mletter does the splitting-by-halves. Its first argument r is an array of ranks between 1 and n (the second argument). It returns unique (numeric) identifiers for each bin: mletter <- function(r,n) { lower <- 2 + floor(log(r/(n+1))/log(2)) upper <- -1 - floor(log((n+1-r)/(n+1))/log(2)) i <- 2*r > n lower[i] <- upper[i] lower } Using this, we bin both the predictions and the outcomes and average each within each bin. Along the way, we compute bin populations: classes <- mletter(rank(prediction), length(prediction)) pgroups <- split(prediction, classes) agroups <- split(actual, classes) bincounts <- unlist(lapply(pgroups, length)) # Bin populations x <- unlist(lapply(pgroups, mean)) # Mean predicted values by bin y <- unlist(lapply(agroups, mean)) # Mean outcome by bin To symbolize the plot effectively we should make the symbol areas proportional to bin counts. It can be helpful to vary the symbol colors a little, too, whence: binprop <- bincounts / max(bincounts) colors <- -log(binprop)/log(2) colors <- colors - min(colors) colors <- hsv(colors / (max(colors)+1)) With these in hand, we now enhance the preceding plot: abline(0,1, lty=1, col="Gray") # Reference curve points(x,y, pch=19, cex = 3 * sqrt(binprop), col=colors) # Solid colored circles points(x,y, pch=1, cex = 3 * sqrt(binprop)) # Circle outlines As an example of a poor prediction, let's change the data: set.seed(17) prediction <- rbeta(500, 5/2, 1) actual <- rbinom(length(prediction), 1, 1/2 + 4*(prediction-1/2)^3) Repeating the analysis produces this plot in which the deviations are clear: This model tends to be overoptimistic (average outcome for predictions in the 50% to 90% range are too low). In the few cases where the prediction is low (less than 30%), the model is too pessimistic.
Visualizing the calibration of predicted probability of a model
Your thinking is good. John Tukey recommended binning by halves: split the data into upper and lower halves, then split those halves, then split the extreme halves recursively. Compared to equal-widt
Visualizing the calibration of predicted probability of a model Your thinking is good. John Tukey recommended binning by halves: split the data into upper and lower halves, then split those halves, then split the extreme halves recursively. Compared to equal-width binning, this allows visual inspection of tail behavior without devoting too many graphical elements to the bulk of the data (in the middle). Here is an example (using R) of Tukey's approach. (It's not exactly the same: he implemented mletter a little differently.) First, let's create some predictions and some outcomes that conform to those predictions: set.seed(17) prediction <- rbeta(500, 3/2, 5/2) actual <- rbinom(length(prediction), 1, prediction) plot(prediction, actual, col="Gray", cex=0.8) The plot is not very informative, because all the actual values are, of course, either $0$ (did not occur) or $1$ (did occur). (It appears as the background of gray open circles in the first figure below.) This plot needs smoothing. To do so, we bin the data. Function mletter does the splitting-by-halves. Its first argument r is an array of ranks between 1 and n (the second argument). It returns unique (numeric) identifiers for each bin: mletter <- function(r,n) { lower <- 2 + floor(log(r/(n+1))/log(2)) upper <- -1 - floor(log((n+1-r)/(n+1))/log(2)) i <- 2*r > n lower[i] <- upper[i] lower } Using this, we bin both the predictions and the outcomes and average each within each bin. Along the way, we compute bin populations: classes <- mletter(rank(prediction), length(prediction)) pgroups <- split(prediction, classes) agroups <- split(actual, classes) bincounts <- unlist(lapply(pgroups, length)) # Bin populations x <- unlist(lapply(pgroups, mean)) # Mean predicted values by bin y <- unlist(lapply(agroups, mean)) # Mean outcome by bin To symbolize the plot effectively we should make the symbol areas proportional to bin counts. It can be helpful to vary the symbol colors a little, too, whence: binprop <- bincounts / max(bincounts) colors <- -log(binprop)/log(2) colors <- colors - min(colors) colors <- hsv(colors / (max(colors)+1)) With these in hand, we now enhance the preceding plot: abline(0,1, lty=1, col="Gray") # Reference curve points(x,y, pch=19, cex = 3 * sqrt(binprop), col=colors) # Solid colored circles points(x,y, pch=1, cex = 3 * sqrt(binprop)) # Circle outlines As an example of a poor prediction, let's change the data: set.seed(17) prediction <- rbeta(500, 5/2, 1) actual <- rbinom(length(prediction), 1, 1/2 + 4*(prediction-1/2)^3) Repeating the analysis produces this plot in which the deviations are clear: This model tends to be overoptimistic (average outcome for predictions in the 50% to 90% range are too low). In the few cases where the prediction is low (less than 30%), the model is too pessimistic.
Visualizing the calibration of predicted probability of a model Your thinking is good. John Tukey recommended binning by halves: split the data into upper and lower halves, then split those halves, then split the extreme halves recursively. Compared to equal-widt
11,210
Visualizing the calibration of predicted probability of a model
Another option is isotonic regression. It is similar to whuber's answer except the bins are generated dynamically instead of by splitting in halves, with a requirement that outputs are strictly increasing. This primary usage of isotonic regression is to recalibrate your probabilities if they are shown to be poorly calibrated, but it can also be used for visualization. Basically, if the isotonic regression line roughly follows the Y=X line, then your probabilities are properly calibrated. This is Isotonic Regression applied to the problem shown by Whuber. import numpy as np import matplotlib.pyplot as plt from sklearn.isotonic import IsotonicRegression prediction = np.random.beta(3.0/2.0, 5.0/2.0, size=500) actual = np.random.binomial(1,prediction, len(prediction)) plt.scatter(prediction, actual, facecolors='none', edgecolors=[0.3,0.3,0.3], label='Data') ir = IsotonicRegression() isotonic = ir.fit_transform(prediction, actual) plt.plot(prediction, isotonic,'ok', label='Isotonic Fit') plt.xlabel('Prediction') plt.ylabel('Actual') plt.plot([0,1],[0,1], '--k', label='y=x line') plt.legend(loc = 'center left') http://fa.bianp.net/blog/2013/isotonic-regression/ http://stat.wikia.com/wiki/Isotonic_regression
Visualizing the calibration of predicted probability of a model
Another option is isotonic regression. It is similar to whuber's answer except the bins are generated dynamically instead of by splitting in halves, with a requirement that outputs are strictly increa
Visualizing the calibration of predicted probability of a model Another option is isotonic regression. It is similar to whuber's answer except the bins are generated dynamically instead of by splitting in halves, with a requirement that outputs are strictly increasing. This primary usage of isotonic regression is to recalibrate your probabilities if they are shown to be poorly calibrated, but it can also be used for visualization. Basically, if the isotonic regression line roughly follows the Y=X line, then your probabilities are properly calibrated. This is Isotonic Regression applied to the problem shown by Whuber. import numpy as np import matplotlib.pyplot as plt from sklearn.isotonic import IsotonicRegression prediction = np.random.beta(3.0/2.0, 5.0/2.0, size=500) actual = np.random.binomial(1,prediction, len(prediction)) plt.scatter(prediction, actual, facecolors='none', edgecolors=[0.3,0.3,0.3], label='Data') ir = IsotonicRegression() isotonic = ir.fit_transform(prediction, actual) plt.plot(prediction, isotonic,'ok', label='Isotonic Fit') plt.xlabel('Prediction') plt.ylabel('Actual') plt.plot([0,1],[0,1], '--k', label='y=x line') plt.legend(loc = 'center left') http://fa.bianp.net/blog/2013/isotonic-regression/ http://stat.wikia.com/wiki/Isotonic_regression
Visualizing the calibration of predicted probability of a model Another option is isotonic regression. It is similar to whuber's answer except the bins are generated dynamically instead of by splitting in halves, with a requirement that outputs are strictly increa
11,211
Visualizing the calibration of predicted probability of a model
You might also want to look at package "verification": http://cran.r-project.org/web/packages/verification/index.html There are plots in the vignette that might be useful: http://cran.r-project.org/web/packages/verification/vignettes/verification.pdf
Visualizing the calibration of predicted probability of a model
You might also want to look at package "verification": http://cran.r-project.org/web/packages/verification/index.html There are plots in the vignette that might be useful: http://cran.r-project.org/we
Visualizing the calibration of predicted probability of a model You might also want to look at package "verification": http://cran.r-project.org/web/packages/verification/index.html There are plots in the vignette that might be useful: http://cran.r-project.org/web/packages/verification/vignettes/verification.pdf
Visualizing the calibration of predicted probability of a model You might also want to look at package "verification": http://cran.r-project.org/web/packages/verification/index.html There are plots in the vignette that might be useful: http://cran.r-project.org/we
11,212
Non-parametric test if two samples are drawn from the same distribution
The Kolmogorov-Smirnov test is the most common way to do this, but there are also some other options. The tests are based on the empirical cumulative distribution functions. The basic procedure is: Choose a way to measure the distance between the ECDFs. Since ECDFs are functions, the obvious candidates are the $L^p$ norms, which measure distance in function spaces. This distance is our test statistic. Figure out the distribution of the test statistic under the null hypothesis that the samples come from the same distribution (luckily people have done this already for the most common distances!) Choose a threshold, $\alpha$, for your hypothesis and reject the null if the computed test statistic is in the $\alpha \%$ tails of the distribution from point 2. For the Kolmogorov-Smirnov test, the test statistic is the maximum distance between the two empirical CDFs (or if you want to be more technical the $L^\infty$ norm). This is super easy to implement in R: ks.test(a,b) If the $p$-value is smaller than your chosen threshold, we reject the null hypothesis that the samples are drawn from the same distribution. Another option is the Cramer-von Mises test, which uses the squared $L^2$ norm as the test statistic and is implemented in the dgof package as cvm.test(). The CVM test is 'better' in the sense that the distance metric takes into account the whole of the two ECDFs, rather than just picking out the largest distance. EDIT: Suppose we have samples of size $n$ and $m$, which we want to apply our hypothesis test to. To turn this into a sampling-type procedure, we can do the following: Generate samples of size $n$ and $m$ from identical distributions. For the KS test (remarkably, IMO) it doesn't even matter if the distribution changes at each iteration as long as $n$ and $m$ stay the same. Calculate your distance metric for the samples. For the KS test, this is just the max. difference between the empirical CDFs. Store the result and go back to step 1. Eventually you will build up lots of samples from the distribution of the test statistic under the null hypothesis, whose quantiles you can use to conduct your hypothesis test at whichever level of significance you want. For the KS test statistic, this distribution is called the Kolmogorov distribution. Note that for the KS test, this is just a waste of computational effort because the quantiles are very simply characterised theoretically, but the procedure is generally applicable to any hypothesis test.
Non-parametric test if two samples are drawn from the same distribution
The Kolmogorov-Smirnov test is the most common way to do this, but there are also some other options. The tests are based on the empirical cumulative distribution functions. The basic procedure is: C
Non-parametric test if two samples are drawn from the same distribution The Kolmogorov-Smirnov test is the most common way to do this, but there are also some other options. The tests are based on the empirical cumulative distribution functions. The basic procedure is: Choose a way to measure the distance between the ECDFs. Since ECDFs are functions, the obvious candidates are the $L^p$ norms, which measure distance in function spaces. This distance is our test statistic. Figure out the distribution of the test statistic under the null hypothesis that the samples come from the same distribution (luckily people have done this already for the most common distances!) Choose a threshold, $\alpha$, for your hypothesis and reject the null if the computed test statistic is in the $\alpha \%$ tails of the distribution from point 2. For the Kolmogorov-Smirnov test, the test statistic is the maximum distance between the two empirical CDFs (or if you want to be more technical the $L^\infty$ norm). This is super easy to implement in R: ks.test(a,b) If the $p$-value is smaller than your chosen threshold, we reject the null hypothesis that the samples are drawn from the same distribution. Another option is the Cramer-von Mises test, which uses the squared $L^2$ norm as the test statistic and is implemented in the dgof package as cvm.test(). The CVM test is 'better' in the sense that the distance metric takes into account the whole of the two ECDFs, rather than just picking out the largest distance. EDIT: Suppose we have samples of size $n$ and $m$, which we want to apply our hypothesis test to. To turn this into a sampling-type procedure, we can do the following: Generate samples of size $n$ and $m$ from identical distributions. For the KS test (remarkably, IMO) it doesn't even matter if the distribution changes at each iteration as long as $n$ and $m$ stay the same. Calculate your distance metric for the samples. For the KS test, this is just the max. difference between the empirical CDFs. Store the result and go back to step 1. Eventually you will build up lots of samples from the distribution of the test statistic under the null hypothesis, whose quantiles you can use to conduct your hypothesis test at whichever level of significance you want. For the KS test statistic, this distribution is called the Kolmogorov distribution. Note that for the KS test, this is just a waste of computational effort because the quantiles are very simply characterised theoretically, but the procedure is generally applicable to any hypothesis test.
Non-parametric test if two samples are drawn from the same distribution The Kolmogorov-Smirnov test is the most common way to do this, but there are also some other options. The tests are based on the empirical cumulative distribution functions. The basic procedure is: C
11,213
Why is pruning not needed for random forest trees?
Roughly speaking, some of the potential over-fitting that might happen in a single tree (which is a reason you do pruning generally) is mitigated by two things in a Random Forest: The fact that the samples used to train the individual trees are "bootstrapped". The fact that you have a multitude of random trees using random features and thus the individual trees are strong but not so correlated with each other. Edit: based on OP's comment below: There's definitely still potential for over-fitting. As far as articles, you can read about the motivation for "bagging" by Breiman and "bootstrapping" in general by Efron and Tibshirani. As far as 2., Breiman derived a loose bound on generalization error that is related to tree strength and anti-correlation of the individual classifiers. Nobody uses the bound (most likely) but it's meant to give intuition about what helps low generalization error in ensemble methods. This is in the Random Forests paper itself. My post was to push you in the right direction based on these readings and my experience/deductions. Breiman, L., Bagging Predictors, Machine Learning, 24(2), pp.123-140, 1996. Efron, B.; Tibshirani, R. (1993). An Introduction to the Bootstrap. Boca Raton, FL Breiman, Leo (2001). "Random Forests". Machine Learning 45 (1): 5–32.
Why is pruning not needed for random forest trees?
Roughly speaking, some of the potential over-fitting that might happen in a single tree (which is a reason you do pruning generally) is mitigated by two things in a Random Forest: The fact that the s
Why is pruning not needed for random forest trees? Roughly speaking, some of the potential over-fitting that might happen in a single tree (which is a reason you do pruning generally) is mitigated by two things in a Random Forest: The fact that the samples used to train the individual trees are "bootstrapped". The fact that you have a multitude of random trees using random features and thus the individual trees are strong but not so correlated with each other. Edit: based on OP's comment below: There's definitely still potential for over-fitting. As far as articles, you can read about the motivation for "bagging" by Breiman and "bootstrapping" in general by Efron and Tibshirani. As far as 2., Breiman derived a loose bound on generalization error that is related to tree strength and anti-correlation of the individual classifiers. Nobody uses the bound (most likely) but it's meant to give intuition about what helps low generalization error in ensemble methods. This is in the Random Forests paper itself. My post was to push you in the right direction based on these readings and my experience/deductions. Breiman, L., Bagging Predictors, Machine Learning, 24(2), pp.123-140, 1996. Efron, B.; Tibshirani, R. (1993). An Introduction to the Bootstrap. Boca Raton, FL Breiman, Leo (2001). "Random Forests". Machine Learning 45 (1): 5–32.
Why is pruning not needed for random forest trees? Roughly speaking, some of the potential over-fitting that might happen in a single tree (which is a reason you do pruning generally) is mitigated by two things in a Random Forest: The fact that the s
11,214
Why is pruning not needed for random forest trees?
A decision tree that is very deep or of full depth tends to learn the noise in the data. They overfit the data leading to low bias but high variance. Pruning is a suitable approach used in decision trees to reduce overfitting. However, generally random forests would give good performance with full depth. As random forests training use bootstrap aggregation (or sampling with replacement) along with a random selection of features for a split, the correlation between the trees (or weak learners) would be low. That means although individual trees would have high variance, the ensemble output will be appropriate (lower variance and lower bias) because the trees are not correlated. If you still want to control the training in a random forest, go for controlling the tree depth instead of pruning.
Why is pruning not needed for random forest trees?
A decision tree that is very deep or of full depth tends to learn the noise in the data. They overfit the data leading to low bias but high variance. Pruning is a suitable approach used in decision tr
Why is pruning not needed for random forest trees? A decision tree that is very deep or of full depth tends to learn the noise in the data. They overfit the data leading to low bias but high variance. Pruning is a suitable approach used in decision trees to reduce overfitting. However, generally random forests would give good performance with full depth. As random forests training use bootstrap aggregation (or sampling with replacement) along with a random selection of features for a split, the correlation between the trees (or weak learners) would be low. That means although individual trees would have high variance, the ensemble output will be appropriate (lower variance and lower bias) because the trees are not correlated. If you still want to control the training in a random forest, go for controlling the tree depth instead of pruning.
Why is pruning not needed for random forest trees? A decision tree that is very deep or of full depth tends to learn the noise in the data. They overfit the data leading to low bias but high variance. Pruning is a suitable approach used in decision tr
11,215
Standard errors for multiple regression coefficients?
When doing least squares estimation (assuming a normal random component) the regression parameter estimates are normally distributed with mean equal to the true regression parameter and covariance matrix $\Sigma = s^2\cdot(X^TX)^{-1}$ where $s^2$ is the residual variance and $X^TX$ is the design matrix. $X^T$ is the transpose of $X$ and $X$ is defined by the model equation $Y=X\beta+\epsilon$ with $\beta$ the regression parameters and $\epsilon$ is the error term. The estimated standard deviation of a beta parameter is gotten by taking the corresponding term in $(X^TX)^{-1}$ multiplying it by the sample estimate of the residual variance and then taking the square root. This is not a very simple calculation but any software package will compute it for you and provide it in the output. Example On page 134 of Draper and Smith (referenced in my comment), they provide the following data for fitting by least squares a model $Y = \beta_0 + \beta_1 X + \varepsilon$ where $\varepsilon \sim N(0, \mathbb{I}\sigma^2)$. X Y XY 0 -2 0 2 0 0 2 2 4 5 1 5 5 3 15 9 1 9 9 0 0 9 0 0 9 1 9 10 -1 -10 --- -- --- Sum 60 5 32 Sum of Squares 482 21 528 Looks like an example where the slope should be close to 0. $$X^t = \pmatrix{ 1 &1 &1 &1 &1 &1 &1 &1 &1 &1 \\ 0 &2 &2 &5 &5 &9 &9 &9 &9 &10 }.$$ So $$X^t X = \pmatrix{n &\sum X_i \\ \sum X_i &\sum X_i^2} = \pmatrix{10 &60 \\60 &482}$$ and $$\eqalign{ (X^t X)^{-1} &= \pmatrix{ \frac{\sum X_i^2}{n \sum (X_i - \bar{X})^2} &\frac{-\bar{X}}{\sum (X_i-\bar{X})^2} \\ \frac{-\bar{X}}{\sum (X_i-\bar{X})^2} &\frac{1}{\sum (X_i-\bar{X})^2} } \\ &= \pmatrix{\frac{482}{10(122)} &-\frac{6}{122} \\ -\frac{6}{122} &\frac{1}{122}} \\ &= \pmatrix{0.395 &-0.049 \\ -0.049 &0.008} }$$ where $\bar{X} = \sum X_i/n = 60/10 = 6$. Estimate for $β = (X^TX)^{-1} X^TY$ = ( b0 ) =(Yb-b1 Xb) b1 Sxy/Sxx b1 = 1/61 = 0.0163 and b0 = 0.5- 0.0163(6) = 0.402 From $(X^TX)^{-1}$ above Sb1 =Se (0.008) and Sb0=Se(0.395) where Se is the estimated standard deviation for the error term. Se =√2.3085. Sorry that the equations didn't carry subscripting and superscripting when I cut and pasted them. The table didn't reproduce well either because the spaces got ignored. The first string of 3 numbers correspond to the first values of X Y and XY and the same for the followinf strings of three. After Sum comes the sums for X Y and XY respectively and then the sum of squares for X Y and XY respectively. The 2x2 matrices got messed up too. The values after the brackets should be in brackets underneath the numbers to the left.
Standard errors for multiple regression coefficients?
When doing least squares estimation (assuming a normal random component) the regression parameter estimates are normally distributed with mean equal to the true regression parameter and covariance mat
Standard errors for multiple regression coefficients? When doing least squares estimation (assuming a normal random component) the regression parameter estimates are normally distributed with mean equal to the true regression parameter and covariance matrix $\Sigma = s^2\cdot(X^TX)^{-1}$ where $s^2$ is the residual variance and $X^TX$ is the design matrix. $X^T$ is the transpose of $X$ and $X$ is defined by the model equation $Y=X\beta+\epsilon$ with $\beta$ the regression parameters and $\epsilon$ is the error term. The estimated standard deviation of a beta parameter is gotten by taking the corresponding term in $(X^TX)^{-1}$ multiplying it by the sample estimate of the residual variance and then taking the square root. This is not a very simple calculation but any software package will compute it for you and provide it in the output. Example On page 134 of Draper and Smith (referenced in my comment), they provide the following data for fitting by least squares a model $Y = \beta_0 + \beta_1 X + \varepsilon$ where $\varepsilon \sim N(0, \mathbb{I}\sigma^2)$. X Y XY 0 -2 0 2 0 0 2 2 4 5 1 5 5 3 15 9 1 9 9 0 0 9 0 0 9 1 9 10 -1 -10 --- -- --- Sum 60 5 32 Sum of Squares 482 21 528 Looks like an example where the slope should be close to 0. $$X^t = \pmatrix{ 1 &1 &1 &1 &1 &1 &1 &1 &1 &1 \\ 0 &2 &2 &5 &5 &9 &9 &9 &9 &10 }.$$ So $$X^t X = \pmatrix{n &\sum X_i \\ \sum X_i &\sum X_i^2} = \pmatrix{10 &60 \\60 &482}$$ and $$\eqalign{ (X^t X)^{-1} &= \pmatrix{ \frac{\sum X_i^2}{n \sum (X_i - \bar{X})^2} &\frac{-\bar{X}}{\sum (X_i-\bar{X})^2} \\ \frac{-\bar{X}}{\sum (X_i-\bar{X})^2} &\frac{1}{\sum (X_i-\bar{X})^2} } \\ &= \pmatrix{\frac{482}{10(122)} &-\frac{6}{122} \\ -\frac{6}{122} &\frac{1}{122}} \\ &= \pmatrix{0.395 &-0.049 \\ -0.049 &0.008} }$$ where $\bar{X} = \sum X_i/n = 60/10 = 6$. Estimate for $β = (X^TX)^{-1} X^TY$ = ( b0 ) =(Yb-b1 Xb) b1 Sxy/Sxx b1 = 1/61 = 0.0163 and b0 = 0.5- 0.0163(6) = 0.402 From $(X^TX)^{-1}$ above Sb1 =Se (0.008) and Sb0=Se(0.395) where Se is the estimated standard deviation for the error term. Se =√2.3085. Sorry that the equations didn't carry subscripting and superscripting when I cut and pasted them. The table didn't reproduce well either because the spaces got ignored. The first string of 3 numbers correspond to the first values of X Y and XY and the same for the followinf strings of three. After Sum comes the sums for X Y and XY respectively and then the sum of squares for X Y and XY respectively. The 2x2 matrices got messed up too. The values after the brackets should be in brackets underneath the numbers to the left.
Standard errors for multiple regression coefficients? When doing least squares estimation (assuming a normal random component) the regression parameter estimates are normally distributed with mean equal to the true regression parameter and covariance mat
11,216
How to use delta method for standard errors of marginal effects?
The delta method simply says that if you can represent an auxiliary variable you can represent as a function of normally distributed random variables, that auxiliary variable is approximately normally distributed with variance corresponding to how much the auxiliary varies with respect to the normal variables. (EDIT: as pointed out by Alecos Papadopoulos the delta method can be stated more generally such that it does not require asymptotic normality.) The easiest way to think of this is as a Taylor expansion, where the first term of a function is the mean, and the variance comes from the second order terms. Specifically, if $g$ is a function of parameter $\beta$ and $b$ is a consistent, normally distributed estimator for that parameter: $$ g(b) \approx g(\beta) + \nabla g(\beta)^\prime (b - \beta) $$ Since $\beta$ is a constant, and $b$ is a consistent estimator for $\beta$, we can then say: $$ \sqrt{n}\left(g(b)-g(\beta)\right)\,\xrightarrow{D}\,N\left(0, \nabla g(\beta)^\prime \cdot \Sigma_b \cdot \nabla g(\beta)\right) $$ In this case, $b$ is your OLS estimate, and $g$ is the AME. You can write this specific AME as: $$ g(b_1,b_2)=b_1+b_2 \text{ mean}(x_2) $$ if you took the gradient of this function (remember, a function of the coefficients not of $x_2$), it would be: $$ [1,\,\, \text{mean}(x_2)]^\prime $$ and the variance-covariance matrix for $b$ might be: $$ \left[ \begin{matrix} s_{11} & s_{12} \\ s_{12} & s_{22} \end{matrix}\right] $$ Plugging this into the variance formula and doing some matrix algebra gives you the same expression you wanted. In general if you want to do this, you can explicitly code whatever $g$ you want into R as a function of all your coefficients and then use numDeriv to take the numerical gradient (otherwise you'd have to use computer algebra) of the function with respect to your parameters, at the parameters you estimated. Then you simply take the variance-covariance matrix and this numerical gradient and plug it into the formula and voila! Delta method. ADDENDUM: In this specific case the R code would be: v <- vcov(m) # Define function of coefficients. Note all coefficients are included so it # will match dimensions of regression coefficients, this could be done more # elegantly in principle g <- function(b){ return(b[2] + b[4] * mean(x2)) } require(numDeriv) # Load numerical derivative package grad_g <- jacobian(g, m$coef) # Jacobian gives dimensions, otherwise same as # gradient sqrt(grad_g%*% v %*% t(grad_g)) # Should be exactly the same Note that it will always be preferable to get the exact gradient instead of the numerical gradient for this problem, as the exact gradient will have less computational error. The fact that $g$ is linear eliminates this problem, and for more complicated functions the exact gradient may not always be available.
How to use delta method for standard errors of marginal effects?
The delta method simply says that if you can represent an auxiliary variable you can represent as a function of normally distributed random variables, that auxiliary variable is approximately normally
How to use delta method for standard errors of marginal effects? The delta method simply says that if you can represent an auxiliary variable you can represent as a function of normally distributed random variables, that auxiliary variable is approximately normally distributed with variance corresponding to how much the auxiliary varies with respect to the normal variables. (EDIT: as pointed out by Alecos Papadopoulos the delta method can be stated more generally such that it does not require asymptotic normality.) The easiest way to think of this is as a Taylor expansion, where the first term of a function is the mean, and the variance comes from the second order terms. Specifically, if $g$ is a function of parameter $\beta$ and $b$ is a consistent, normally distributed estimator for that parameter: $$ g(b) \approx g(\beta) + \nabla g(\beta)^\prime (b - \beta) $$ Since $\beta$ is a constant, and $b$ is a consistent estimator for $\beta$, we can then say: $$ \sqrt{n}\left(g(b)-g(\beta)\right)\,\xrightarrow{D}\,N\left(0, \nabla g(\beta)^\prime \cdot \Sigma_b \cdot \nabla g(\beta)\right) $$ In this case, $b$ is your OLS estimate, and $g$ is the AME. You can write this specific AME as: $$ g(b_1,b_2)=b_1+b_2 \text{ mean}(x_2) $$ if you took the gradient of this function (remember, a function of the coefficients not of $x_2$), it would be: $$ [1,\,\, \text{mean}(x_2)]^\prime $$ and the variance-covariance matrix for $b$ might be: $$ \left[ \begin{matrix} s_{11} & s_{12} \\ s_{12} & s_{22} \end{matrix}\right] $$ Plugging this into the variance formula and doing some matrix algebra gives you the same expression you wanted. In general if you want to do this, you can explicitly code whatever $g$ you want into R as a function of all your coefficients and then use numDeriv to take the numerical gradient (otherwise you'd have to use computer algebra) of the function with respect to your parameters, at the parameters you estimated. Then you simply take the variance-covariance matrix and this numerical gradient and plug it into the formula and voila! Delta method. ADDENDUM: In this specific case the R code would be: v <- vcov(m) # Define function of coefficients. Note all coefficients are included so it # will match dimensions of regression coefficients, this could be done more # elegantly in principle g <- function(b){ return(b[2] + b[4] * mean(x2)) } require(numDeriv) # Load numerical derivative package grad_g <- jacobian(g, m$coef) # Jacobian gives dimensions, otherwise same as # gradient sqrt(grad_g%*% v %*% t(grad_g)) # Should be exactly the same Note that it will always be preferable to get the exact gradient instead of the numerical gradient for this problem, as the exact gradient will have less computational error. The fact that $g$ is linear eliminates this problem, and for more complicated functions the exact gradient may not always be available.
How to use delta method for standard errors of marginal effects? The delta method simply says that if you can represent an auxiliary variable you can represent as a function of normally distributed random variables, that auxiliary variable is approximately normally
11,217
What sense does it make to compare p-values to each other?
Many people would argue that a $p$-value can either be significant ($p< \alpha$) or not, and so it does not (ever) make sense to compare two $p$-values between each other. This is wrong; in some cases it does. In your particular case there is absolutely no doubt that you can directly compare the $p$-values. If the sample size is fixed ($n=1000$), then $p$-values are monotonically related to $t$-values, which are in turn monotonically related to the effect size as measured by Cohen's $d$. Specifically, $d=2t/\sqrt{n}$. This means that your $p$-values are in one-to-one correspondence with the effect size, and so you can be sure that if the $p$-value for property A is larger than for property B, then the effect size for A is smaller than for property B. I believe this answers your question. Several additional points: This is only true given that the sample size $n$ is fixed. If you get $p=0.008$ for property A in one experiment with one sample size, and $p=0.002$ for property B in another experiment with another sample size, it is more difficult to compare them. If the question is specifically whether A or B are better "discriminated" in the population (i.e.: how well can you predict gender by looking at the A or B values?), then you should be looking at effect size. In the simple cases, knowing $p$ and $n$ is enough to compute the effect size. If the question is more vague: what experiment provides more "evidence" against the null? (this can be meaningful if e.g. A=B) -- then the issue becomes complicated and contentious, but I would say that the $p$-value by definition is a scalar summary of the evidence against the null, so the lower the $p$-value, the stronger the evidence, even if the sample sizes are different. Saying that the effect size for B is larger than for A, does not mean that it is significantly larger. You need some direct comparison between A and B to make such a claim. It's always a good idea to report (and interpret) effect sizes and confidence intervals in addition to $p$-values.
What sense does it make to compare p-values to each other?
Many people would argue that a $p$-value can either be significant ($p< \alpha$) or not, and so it does not (ever) make sense to compare two $p$-values between each other. This is wrong; in some cases
What sense does it make to compare p-values to each other? Many people would argue that a $p$-value can either be significant ($p< \alpha$) or not, and so it does not (ever) make sense to compare two $p$-values between each other. This is wrong; in some cases it does. In your particular case there is absolutely no doubt that you can directly compare the $p$-values. If the sample size is fixed ($n=1000$), then $p$-values are monotonically related to $t$-values, which are in turn monotonically related to the effect size as measured by Cohen's $d$. Specifically, $d=2t/\sqrt{n}$. This means that your $p$-values are in one-to-one correspondence with the effect size, and so you can be sure that if the $p$-value for property A is larger than for property B, then the effect size for A is smaller than for property B. I believe this answers your question. Several additional points: This is only true given that the sample size $n$ is fixed. If you get $p=0.008$ for property A in one experiment with one sample size, and $p=0.002$ for property B in another experiment with another sample size, it is more difficult to compare them. If the question is specifically whether A or B are better "discriminated" in the population (i.e.: how well can you predict gender by looking at the A or B values?), then you should be looking at effect size. In the simple cases, knowing $p$ and $n$ is enough to compute the effect size. If the question is more vague: what experiment provides more "evidence" against the null? (this can be meaningful if e.g. A=B) -- then the issue becomes complicated and contentious, but I would say that the $p$-value by definition is a scalar summary of the evidence against the null, so the lower the $p$-value, the stronger the evidence, even if the sample sizes are different. Saying that the effect size for B is larger than for A, does not mean that it is significantly larger. You need some direct comparison between A and B to make such a claim. It's always a good idea to report (and interpret) effect sizes and confidence intervals in addition to $p$-values.
What sense does it make to compare p-values to each other? Many people would argue that a $p$-value can either be significant ($p< \alpha$) or not, and so it does not (ever) make sense to compare two $p$-values between each other. This is wrong; in some cases
11,218
What sense does it make to compare p-values to each other?
Thanks to whoever just downvoted me, as I now have a completely different answer to this question.I have accordingly deleted my original answer as it is incorrect from this perspective. In the context of this question, which is only dealing with the question "was A or B a better discriminator in my study", we are dealing with a census and not a sample. Thus, the use of inferential statistics such as those used to produce p-values are irrelevant. Inferential statistics are used to infer population estimates from those we obtain from our sample. If we do not wish to generalise to a population, then those methods are unnecessary. (There are some specific issues around missing values in a census, but those are irrelevant in this situation.) There is no probability of obtaining a result in a population. We obtained the result we got. Therefore, the probability of our results is 100%. There is no need to construct a confidence interval - the point estimate for the sample is exact. We're simply not having to estimate anything at all. In the specific case of "which variable worked better with the data I have", all one needs to do is look at the results in simple summary form. A table may be sufficient, maybe a graph like a box plot.
What sense does it make to compare p-values to each other?
Thanks to whoever just downvoted me, as I now have a completely different answer to this question.I have accordingly deleted my original answer as it is incorrect from this perspective. In the context
What sense does it make to compare p-values to each other? Thanks to whoever just downvoted me, as I now have a completely different answer to this question.I have accordingly deleted my original answer as it is incorrect from this perspective. In the context of this question, which is only dealing with the question "was A or B a better discriminator in my study", we are dealing with a census and not a sample. Thus, the use of inferential statistics such as those used to produce p-values are irrelevant. Inferential statistics are used to infer population estimates from those we obtain from our sample. If we do not wish to generalise to a population, then those methods are unnecessary. (There are some specific issues around missing values in a census, but those are irrelevant in this situation.) There is no probability of obtaining a result in a population. We obtained the result we got. Therefore, the probability of our results is 100%. There is no need to construct a confidence interval - the point estimate for the sample is exact. We're simply not having to estimate anything at all. In the specific case of "which variable worked better with the data I have", all one needs to do is look at the results in simple summary form. A table may be sufficient, maybe a graph like a box plot.
What sense does it make to compare p-values to each other? Thanks to whoever just downvoted me, as I now have a completely different answer to this question.I have accordingly deleted my original answer as it is incorrect from this perspective. In the context
11,219
What sense does it make to compare p-values to each other?
You get a difference in p, but it is unclear what that difference means (is it large, small, significant?) Maybe use bootstrapping: select (with replacement) from your data, redo your tests, compute difference of p's (p_a - p_b) , repeat 100-200 times check what fraction of your delta p's is < 0 (meaning p of A is below p of B) Note: I have seen this done, but am not an expert.
What sense does it make to compare p-values to each other?
You get a difference in p, but it is unclear what that difference means (is it large, small, significant?) Maybe use bootstrapping: select (with replacement) from your data, redo your tests, compute d
What sense does it make to compare p-values to each other? You get a difference in p, but it is unclear what that difference means (is it large, small, significant?) Maybe use bootstrapping: select (with replacement) from your data, redo your tests, compute difference of p's (p_a - p_b) , repeat 100-200 times check what fraction of your delta p's is < 0 (meaning p of A is below p of B) Note: I have seen this done, but am not an expert.
What sense does it make to compare p-values to each other? You get a difference in p, but it is unclear what that difference means (is it large, small, significant?) Maybe use bootstrapping: select (with replacement) from your data, redo your tests, compute d
11,220
What sense does it make to compare p-values to each other?
Added an answer as it was too long for a comment! Michelle has a good response, but the many comments show some common discussions that come up about p-values. The basic ideas are the following: 1) A smaller p-value doesn't mean a result is more or less significant. It just means that the chances of getting a result at least as extreme are less likely. Significance is a binary outcome based on your chosen significance level (which you choose before you run the test). 2) Effect size (often standardized to #'s of standard deviations) is a good way to quantify "how different" two numbers are. So if Quantity A has an effect size of .8 standard deviations and Quantity B has an effect size of .5 standard deviations, you'd say that there's a larger difference between the two groups in Quantity A than in Quantity B. Standard measurements are: .2 standard deviations = "small" effect .5 standard deviations = "medium" effect .8 standard deviations = "large" effect
What sense does it make to compare p-values to each other?
Added an answer as it was too long for a comment! Michelle has a good response, but the many comments show some common discussions that come up about p-values. The basic ideas are the following: 1) A
What sense does it make to compare p-values to each other? Added an answer as it was too long for a comment! Michelle has a good response, but the many comments show some common discussions that come up about p-values. The basic ideas are the following: 1) A smaller p-value doesn't mean a result is more or less significant. It just means that the chances of getting a result at least as extreme are less likely. Significance is a binary outcome based on your chosen significance level (which you choose before you run the test). 2) Effect size (often standardized to #'s of standard deviations) is a good way to quantify "how different" two numbers are. So if Quantity A has an effect size of .8 standard deviations and Quantity B has an effect size of .5 standard deviations, you'd say that there's a larger difference between the two groups in Quantity A than in Quantity B. Standard measurements are: .2 standard deviations = "small" effect .5 standard deviations = "medium" effect .8 standard deviations = "large" effect
What sense does it make to compare p-values to each other? Added an answer as it was too long for a comment! Michelle has a good response, but the many comments show some common discussions that come up about p-values. The basic ideas are the following: 1) A
11,221
Compute approximate quantiles for a stream of integers using moments?
You don't state this explicitly, but from your description of the problem it seems likely that you're after a high-biased set of quantiles (e.g., 50th, 90th, 95th and 99th percentiles). If that's the case, I've had a lot of success with the method described in "Effective Computation of Biased Quantiles over Data Streams" by Cormode et al. It's a fast algorithm that requires little memory and that's easy to implement. The method is based on an earlier algorithm by Greenwald and Khanna that maintains a small sample of the input stream along with upper and lower bounds on the rank of the values in the sample. It requires more space than a collection of few moments, but will be much better at describing the interesting tail region of the distribution accurately.
Compute approximate quantiles for a stream of integers using moments?
You don't state this explicitly, but from your description of the problem it seems likely that you're after a high-biased set of quantiles (e.g., 50th, 90th, 95th and 99th percentiles). If that's the
Compute approximate quantiles for a stream of integers using moments? You don't state this explicitly, but from your description of the problem it seems likely that you're after a high-biased set of quantiles (e.g., 50th, 90th, 95th and 99th percentiles). If that's the case, I've had a lot of success with the method described in "Effective Computation of Biased Quantiles over Data Streams" by Cormode et al. It's a fast algorithm that requires little memory and that's easy to implement. The method is based on an earlier algorithm by Greenwald and Khanna that maintains a small sample of the input stream along with upper and lower bounds on the rank of the values in the sample. It requires more space than a collection of few moments, but will be much better at describing the interesting tail region of the distribution accurately.
Compute approximate quantiles for a stream of integers using moments? You don't state this explicitly, but from your description of the problem it seems likely that you're after a high-biased set of quantiles (e.g., 50th, 90th, 95th and 99th percentiles). If that's the
11,222
Compute approximate quantiles for a stream of integers using moments?
There is a more recent and much simpler algorithm for this that provides very good estimates of the extreme quantiles. The basic idea is that smaller bins are used at the extremes in a way that both bounds the size of the data structure and guarantees higher accuracy for small or large $q$. The algorithm is available in several languages and many packages. The MergingDigest version requires no dynamic allocation ... once the MergingDigest is instantiated, no further heap allocation is required. See https://github.com/tdunning/t-digest
Compute approximate quantiles for a stream of integers using moments?
There is a more recent and much simpler algorithm for this that provides very good estimates of the extreme quantiles. The basic idea is that smaller bins are used at the extremes in a way that both b
Compute approximate quantiles for a stream of integers using moments? There is a more recent and much simpler algorithm for this that provides very good estimates of the extreme quantiles. The basic idea is that smaller bins are used at the extremes in a way that both bounds the size of the data structure and guarantees higher accuracy for small or large $q$. The algorithm is available in several languages and many packages. The MergingDigest version requires no dynamic allocation ... once the MergingDigest is instantiated, no further heap allocation is required. See https://github.com/tdunning/t-digest
Compute approximate quantiles for a stream of integers using moments? There is a more recent and much simpler algorithm for this that provides very good estimates of the extreme quantiles. The basic idea is that smaller bins are used at the extremes in a way that both b
11,223
Why is the null hypothesis always a point value rather than a range in hypothesis testing?
First, it is not always the case. There might be a composite null. Most standard tests have a simple null because in the framework of Neyman and Pearson the aim is to provide a decision rule that permits you to control the error of rejecting the null when it is true. To control this error you need to specify one distribution for the null. When you have a composite hypothesis there are many possibilities. In this case, there are two natural types of strategies, either a Bayesian one (i.e. put weights on the different null distribution) or a minimax one (where you want to construct a test that has a controlled error in the worst case. In the Bayesian setting, using the posterior, you are rapidly back to the case of a simple null. In the minimax setting, if the null is something like corre $\leq$ 0.5 it might be that the problem is equivalent to using the simple null corre = 0.5. Hence to avoid talking about minimax people directly take the simple null that is the 'extreme point' of the composite setting. In the general case it is often possible to transform the composite minimax null into a simple null... hence treating rigorously the case of a composite null is to my knowledge mostly done by going back somehow to a simple null.
Why is the null hypothesis always a point value rather than a range in hypothesis testing?
First, it is not always the case. There might be a composite null. Most standard tests have a simple null because in the framework of Neyman and Pearson the aim is to provide a decision rule that per
Why is the null hypothesis always a point value rather than a range in hypothesis testing? First, it is not always the case. There might be a composite null. Most standard tests have a simple null because in the framework of Neyman and Pearson the aim is to provide a decision rule that permits you to control the error of rejecting the null when it is true. To control this error you need to specify one distribution for the null. When you have a composite hypothesis there are many possibilities. In this case, there are two natural types of strategies, either a Bayesian one (i.e. put weights on the different null distribution) or a minimax one (where you want to construct a test that has a controlled error in the worst case. In the Bayesian setting, using the posterior, you are rapidly back to the case of a simple null. In the minimax setting, if the null is something like corre $\leq$ 0.5 it might be that the problem is equivalent to using the simple null corre = 0.5. Hence to avoid talking about minimax people directly take the simple null that is the 'extreme point' of the composite setting. In the general case it is often possible to transform the composite minimax null into a simple null... hence treating rigorously the case of a composite null is to my knowledge mostly done by going back somehow to a simple null.
Why is the null hypothesis always a point value rather than a range in hypothesis testing? First, it is not always the case. There might be a composite null. Most standard tests have a simple null because in the framework of Neyman and Pearson the aim is to provide a decision rule that per
11,224
Why is the null hypothesis always a point value rather than a range in hypothesis testing?
I don't think that the null hypothesis should always be something like correlation=0.5. At least in the problems which I have come across that wasn't the case. For example in information theoretic statistics the following problem is considered. Suppose that $X_1, X_2, \cdots, X_n$ are coming from an unknown distribution $Q$. In the simplest case we want to test between two distributions $P_1$ and $P_2$. So the hypotheses are $H_1:Q=P_1$ and $H_2:Q=P_2$.
Why is the null hypothesis always a point value rather than a range in hypothesis testing?
I don't think that the null hypothesis should always be something like correlation=0.5. At least in the problems which I have come across that wasn't the case. For example in information theoretic sta
Why is the null hypothesis always a point value rather than a range in hypothesis testing? I don't think that the null hypothesis should always be something like correlation=0.5. At least in the problems which I have come across that wasn't the case. For example in information theoretic statistics the following problem is considered. Suppose that $X_1, X_2, \cdots, X_n$ are coming from an unknown distribution $Q$. In the simplest case we want to test between two distributions $P_1$ and $P_2$. So the hypotheses are $H_1:Q=P_1$ and $H_2:Q=P_2$.
Why is the null hypothesis always a point value rather than a range in hypothesis testing? I don't think that the null hypothesis should always be something like correlation=0.5. At least in the problems which I have come across that wasn't the case. For example in information theoretic sta
11,225
Why can't a single ReLU learn a ReLU?
There's a hint in your plots of the loss as a function of $w$. These plots have a "kink" near $w=0$: that's because on the left of 0, the gradient of the loss is vanishing to 0 (however, $w=0$ is a suboptimal solution because the loss is higher there than it is for $w=1$). Moreover, this plot shows that the loss function is non-convex (you can draw a line that crosses the loss curve in 3 or more locations), so that signals that we should be cautious when using local optimizers such as SGD. Indeed, the following analysis shows that when $w$ is initialized to be negative, it is possible to converge to a suboptimal solution. The optimization problem is $$ \begin{align} \min_{w,b} &\|f(x)-y\|_2^2 \\ f(x) &= \max(0, wx+b) \end{align} $$ and you're using first-order optimization to do so. A problem with this approach is that $f$ has gradient $$ f^\prime(x)= \begin{cases} w, & \text{if $x>0$} \\ 0, & \text{if $x<0$} \end{cases} $$ When you start with $w<0$, you'll have to move to the other side of $0$ to come closer to the correct answer, which is $w=1$. This is hard to do, because when you have $|w|$ very, very small, the gradient will likewise become vanishingly small. Moreover, the closer you get to 0 from the left, the slower your progress will be! This is why in your plots for initializations that are negative $w^{(0)} <0 $, your trajectories all stall out near $w^{(i)}=0$. This is also what your second animation is showing. This is related to the dying relu phenomenon; for some discussion, see My ReLU network fails to launch An approach which might be more successful would be to use a different nonlinearity such as the leaky relu, which does not have the so-called "vanishing gradient" issue. The leaky relu function is $$ g(x)= \begin{cases} x, & \text{if $x>0$} \\ cx, & \text{otherwise} \end{cases} $$ where $c$ is a constant so that $|c|$ is small and positive. The reason that this works is the derivative isn't 0 "on the left." $$ g^\prime(x)= \begin{cases} 1, & \text{if $x>0$} \\ c, & \text{if $x < 0$} \end{cases} $$ Setting $c=0$ is the ordinary relu. Most people choose $c$ to be something like $0.1$ or $0.3$. I haven't seen $c<0$ used, though I'd be interested to see a study of what effect, if any, it has on such networks. (Note that for $c=1,$ this reduces to the identity function; for $|c|>1$, compositions of many such layers may cause exploding gradients because the gradients become larger in successive layers.) Slightly modifying OP's code provides a demonstration that the issue lies with the choice of activation function. This code initializes $w$ to be negative and uses the LeakyReLU in place of the ordinary ReLU. The loss quickly decreases to a small value, and the weight correctly moves to $w=1$, which is optimal. from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, ReLU from tensorflow import keras import numpy as np import matplotlib.pyplot as plt batch = 1000 def tests(): while True: test = np.random.randn(batch) # Generate ReLU test case X = test Y = test.copy() Y[Y < 0] = 0 yield X, Y model = Sequential( [Dense(1, input_dim=1, activation=None, use_bias=False) ]) model.add(keras.layers.LeakyReLU(alpha=0.3)) model.set_weights([[[-10]]]) model.compile(loss='mean_squared_error', optimizer='sgd') class LossHistory(keras.callbacks.Callback): def on_train_begin(self, logs={}): self.losses = [] self.weights = [] self.n = 0 self.n += 1 def on_epoch_end(self, batch, logs={}): self.losses.append(logs.get('loss')) w = model.get_weights() self.weights.append([x.flatten()[0] for x in w]) self.n += 1 history = LossHistory() model.fit_generator(tests(), steps_per_epoch=100, epochs=20, callbacks=[history]) fig, (ax1, ax2) = plt.subplots(2, 1, True, num='Learning') ax1.set_title('LeakyReLU learning ReLU') ax1.semilogy(history.losses) ax1.set_ylabel('Loss') ax1.grid(True, which="both") ax1.margins(0, 0.05) ax2.plot(history.weights) ax2.set_ylabel('Weight') ax2.set_xlabel('Epoch') ax2.grid(True, which="both") ax2.margins(0, 0.05) plt.tight_layout() plt.show() Another layer of complexity arises from the fact that we're not moving infinitesimally, but instead in finitely many "jumps," and these jumps take us from one iteration to the next. This means that there are some circumstances where negative initial vales of $w$ won't get stuck; these cases arise for particular combinations of $w^{(0)}$ and gradient descent step sizes large enough to "jump" over the vanishing gradient. I've played around with this code some and I've found that leaving the initialization at $w^{(0)}=-10$ and changing the optimizer from SGD to Adam, Adam + AMSGrad or SGD + momentum does nothing to help. Moreover, changing from SGD to Adam actually slows the progress in addition to not helping to overcome the vanishing gradient on this problem. On the other hand, if you change the initialization to $w^{(0)}=-1$ and change the optimizer to Adam (step size 0.01), then you can actually overcome the vanishing gradient. It also works if you use $w^{(0)}=-1$ and SGD with momentum (step size 0.01). It even works if you use vanilla SGD (step size 0.01) and $w^{(0)}=-1$. The relevant code is below; use opt_sgd or opt_adam. opt_sgd = keras.optimizers.SGD(lr=1e-2, momentum=0.9) opt_adam = keras.optimizers.Adam(lr=1e-2, amsgrad=True) model.compile(loss='mean_squared_error', optimizer=opt_sgd)
Why can't a single ReLU learn a ReLU?
There's a hint in your plots of the loss as a function of $w$. These plots have a "kink" near $w=0$: that's because on the left of 0, the gradient of the loss is vanishing to 0 (however, $w=0$ is a su
Why can't a single ReLU learn a ReLU? There's a hint in your plots of the loss as a function of $w$. These plots have a "kink" near $w=0$: that's because on the left of 0, the gradient of the loss is vanishing to 0 (however, $w=0$ is a suboptimal solution because the loss is higher there than it is for $w=1$). Moreover, this plot shows that the loss function is non-convex (you can draw a line that crosses the loss curve in 3 or more locations), so that signals that we should be cautious when using local optimizers such as SGD. Indeed, the following analysis shows that when $w$ is initialized to be negative, it is possible to converge to a suboptimal solution. The optimization problem is $$ \begin{align} \min_{w,b} &\|f(x)-y\|_2^2 \\ f(x) &= \max(0, wx+b) \end{align} $$ and you're using first-order optimization to do so. A problem with this approach is that $f$ has gradient $$ f^\prime(x)= \begin{cases} w, & \text{if $x>0$} \\ 0, & \text{if $x<0$} \end{cases} $$ When you start with $w<0$, you'll have to move to the other side of $0$ to come closer to the correct answer, which is $w=1$. This is hard to do, because when you have $|w|$ very, very small, the gradient will likewise become vanishingly small. Moreover, the closer you get to 0 from the left, the slower your progress will be! This is why in your plots for initializations that are negative $w^{(0)} <0 $, your trajectories all stall out near $w^{(i)}=0$. This is also what your second animation is showing. This is related to the dying relu phenomenon; for some discussion, see My ReLU network fails to launch An approach which might be more successful would be to use a different nonlinearity such as the leaky relu, which does not have the so-called "vanishing gradient" issue. The leaky relu function is $$ g(x)= \begin{cases} x, & \text{if $x>0$} \\ cx, & \text{otherwise} \end{cases} $$ where $c$ is a constant so that $|c|$ is small and positive. The reason that this works is the derivative isn't 0 "on the left." $$ g^\prime(x)= \begin{cases} 1, & \text{if $x>0$} \\ c, & \text{if $x < 0$} \end{cases} $$ Setting $c=0$ is the ordinary relu. Most people choose $c$ to be something like $0.1$ or $0.3$. I haven't seen $c<0$ used, though I'd be interested to see a study of what effect, if any, it has on such networks. (Note that for $c=1,$ this reduces to the identity function; for $|c|>1$, compositions of many such layers may cause exploding gradients because the gradients become larger in successive layers.) Slightly modifying OP's code provides a demonstration that the issue lies with the choice of activation function. This code initializes $w$ to be negative and uses the LeakyReLU in place of the ordinary ReLU. The loss quickly decreases to a small value, and the weight correctly moves to $w=1$, which is optimal. from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, ReLU from tensorflow import keras import numpy as np import matplotlib.pyplot as plt batch = 1000 def tests(): while True: test = np.random.randn(batch) # Generate ReLU test case X = test Y = test.copy() Y[Y < 0] = 0 yield X, Y model = Sequential( [Dense(1, input_dim=1, activation=None, use_bias=False) ]) model.add(keras.layers.LeakyReLU(alpha=0.3)) model.set_weights([[[-10]]]) model.compile(loss='mean_squared_error', optimizer='sgd') class LossHistory(keras.callbacks.Callback): def on_train_begin(self, logs={}): self.losses = [] self.weights = [] self.n = 0 self.n += 1 def on_epoch_end(self, batch, logs={}): self.losses.append(logs.get('loss')) w = model.get_weights() self.weights.append([x.flatten()[0] for x in w]) self.n += 1 history = LossHistory() model.fit_generator(tests(), steps_per_epoch=100, epochs=20, callbacks=[history]) fig, (ax1, ax2) = plt.subplots(2, 1, True, num='Learning') ax1.set_title('LeakyReLU learning ReLU') ax1.semilogy(history.losses) ax1.set_ylabel('Loss') ax1.grid(True, which="both") ax1.margins(0, 0.05) ax2.plot(history.weights) ax2.set_ylabel('Weight') ax2.set_xlabel('Epoch') ax2.grid(True, which="both") ax2.margins(0, 0.05) plt.tight_layout() plt.show() Another layer of complexity arises from the fact that we're not moving infinitesimally, but instead in finitely many "jumps," and these jumps take us from one iteration to the next. This means that there are some circumstances where negative initial vales of $w$ won't get stuck; these cases arise for particular combinations of $w^{(0)}$ and gradient descent step sizes large enough to "jump" over the vanishing gradient. I've played around with this code some and I've found that leaving the initialization at $w^{(0)}=-10$ and changing the optimizer from SGD to Adam, Adam + AMSGrad or SGD + momentum does nothing to help. Moreover, changing from SGD to Adam actually slows the progress in addition to not helping to overcome the vanishing gradient on this problem. On the other hand, if you change the initialization to $w^{(0)}=-1$ and change the optimizer to Adam (step size 0.01), then you can actually overcome the vanishing gradient. It also works if you use $w^{(0)}=-1$ and SGD with momentum (step size 0.01). It even works if you use vanilla SGD (step size 0.01) and $w^{(0)}=-1$. The relevant code is below; use opt_sgd or opt_adam. opt_sgd = keras.optimizers.SGD(lr=1e-2, momentum=0.9) opt_adam = keras.optimizers.Adam(lr=1e-2, amsgrad=True) model.compile(loss='mean_squared_error', optimizer=opt_sgd)
Why can't a single ReLU learn a ReLU? There's a hint in your plots of the loss as a function of $w$. These plots have a "kink" near $w=0$: that's because on the left of 0, the gradient of the loss is vanishing to 0 (however, $w=0$ is a su
11,226
Weighted Variance, one more time
Yes, you should expect both examples (unweighted vs weighted) to give you the same results. I have implemented the two algorithms from the Wikipedia article. This one works: If all of the $x_i$ are drawn from the same distribution and the integer weights $w_i$ indicate frequency of occurrence in the sample, then the unbiased estimator of the weighted population variance is given by: $s^2\ = \frac {1} {V_1 - 1} \sum_{i=1}^N w_i \left(x_i - \mu^*\right)^2,$ However this one (using fractional weights) does not work for me: If each $x_i$ is drawn from a Gaussian distribution with variance $1/w_i$, the unbiased estimator of a weighted population variance is given by: $s^2\ = \frac {V_1} {V_1^2-V_2} \sum_{i=1}^N w_i \left(x_i - \mu^*\right)^2$ I am still investigating the reasons why the second equation does not work as intended. /EDIT: Found the reason why the second equation did not work as I thought: you can use the second equation only if you have normalized weights or variance ("probability/reliability") weights, and it is NOT unbiased, because if you don't use "occurrences/repeat" weights (counting the number of times an observation was observed and thus should be repeated in your math operations), you lose the ability to count the total number of observations, and thus you can't use a correction factor. So this explains the difference in your results using weighted and non-weighted variance: your computation is biased. Thus, if you want to have an unbiased weighted variance, use only "occurrences/repeat" weights and use the first equation I have posted above. If that's not possible, well, you can't help it. For more theoretical details, here is another post about unbiased weighted covariance with a reference about why we cannot unbias with probability/reliability type weights and a python implementation. /EDIT a few years later: there is still some confusion as to why we cannot unbias probability/reliability weights. First, to clarify, the difference between probability/reliability weights and repeat/occurrences weights is that probability/reliability weights are normalized, whereas repeat/occurrences weights are not, so you can get the total number of occurrences by just summing the latter but not the former. This is necessary to unbias because otherwise you lose the ability to know what I would call the statistical magnitude, what other calls polarization. Indeed, it's like anything else in statistics: if I say that 10% of my subpopulation have X disease, what does it mean for the broader population? Well it depends on what is my subpopulation: if it's only 100 people, then my 10% figure doesn't mean much. But if it's 1 million people, then it may faithfully represent the whole population. Here it's the same, if we don't know the total N, we can't know how representative of the whole population our metric is, and hence we cannot unbias. Unbiasing is exactly the process of generalizing to the broader population.
Weighted Variance, one more time
Yes, you should expect both examples (unweighted vs weighted) to give you the same results. I have implemented the two algorithms from the Wikipedia article. This one works: If all of the $x_i$ are d
Weighted Variance, one more time Yes, you should expect both examples (unweighted vs weighted) to give you the same results. I have implemented the two algorithms from the Wikipedia article. This one works: If all of the $x_i$ are drawn from the same distribution and the integer weights $w_i$ indicate frequency of occurrence in the sample, then the unbiased estimator of the weighted population variance is given by: $s^2\ = \frac {1} {V_1 - 1} \sum_{i=1}^N w_i \left(x_i - \mu^*\right)^2,$ However this one (using fractional weights) does not work for me: If each $x_i$ is drawn from a Gaussian distribution with variance $1/w_i$, the unbiased estimator of a weighted population variance is given by: $s^2\ = \frac {V_1} {V_1^2-V_2} \sum_{i=1}^N w_i \left(x_i - \mu^*\right)^2$ I am still investigating the reasons why the second equation does not work as intended. /EDIT: Found the reason why the second equation did not work as I thought: you can use the second equation only if you have normalized weights or variance ("probability/reliability") weights, and it is NOT unbiased, because if you don't use "occurrences/repeat" weights (counting the number of times an observation was observed and thus should be repeated in your math operations), you lose the ability to count the total number of observations, and thus you can't use a correction factor. So this explains the difference in your results using weighted and non-weighted variance: your computation is biased. Thus, if you want to have an unbiased weighted variance, use only "occurrences/repeat" weights and use the first equation I have posted above. If that's not possible, well, you can't help it. For more theoretical details, here is another post about unbiased weighted covariance with a reference about why we cannot unbias with probability/reliability type weights and a python implementation. /EDIT a few years later: there is still some confusion as to why we cannot unbias probability/reliability weights. First, to clarify, the difference between probability/reliability weights and repeat/occurrences weights is that probability/reliability weights are normalized, whereas repeat/occurrences weights are not, so you can get the total number of occurrences by just summing the latter but not the former. This is necessary to unbias because otherwise you lose the ability to know what I would call the statistical magnitude, what other calls polarization. Indeed, it's like anything else in statistics: if I say that 10% of my subpopulation have X disease, what does it mean for the broader population? Well it depends on what is my subpopulation: if it's only 100 people, then my 10% figure doesn't mean much. But if it's 1 million people, then it may faithfully represent the whole population. Here it's the same, if we don't know the total N, we can't know how representative of the whole population our metric is, and hence we cannot unbias. Unbiasing is exactly the process of generalizing to the broader population.
Weighted Variance, one more time Yes, you should expect both examples (unweighted vs weighted) to give you the same results. I have implemented the two algorithms from the Wikipedia article. This one works: If all of the $x_i$ are d
11,227
What is the practical difference between association rules and decision trees in data mining?
Basically, Decision Trees are a pure classification techniques. These techniques aim at labelling records of unknown class making use of their features. They basically map the set of record features $\mathcal{F} = {F_1 , \dots, F_m }$ (attributes, variables) into the class attribute $C$ (target variable), the object of the classification. The relationship between $\mathcal{F}$ and $C$ is learned using a set of labelled records, defined as the training set. The ultimate purpose of classification models is to minimise the mis-classification error on unlabelled records, where the class predicted by the model differs from the real one. The features $F$ can be categorical or continuous. Association analysis first applications were about market basket analysis, in these application you are interested in finding out association between items with no particular focus on a target one. Datasets commonly used are the transactional ones: a collection of transaction were each of those contains a set of items. For example: $$ t_1 = \{i_1,i_2 \} \\ t_2 = \{i_1, i_3, i_4, i_5 \} \\ t_3 = \{i_2, i_3, i_4, i_5 \} \\ \vdots \\ t_n = \{ i_2, i_3, i_4, i_5 \} $$ You are interested in finding out rules such as $$ \{ i_3, i_5 \} \rightarrow \{ i_4 \} $$ It turns out that you can use association analysis for some specific classification tasks, for example when all your features are categorical. You have just to see items as features, but this is not what association analysis was born for.
What is the practical difference between association rules and decision trees in data mining?
Basically, Decision Trees are a pure classification techniques. These techniques aim at labelling records of unknown class making use of their features. They basically map the set of record features $
What is the practical difference between association rules and decision trees in data mining? Basically, Decision Trees are a pure classification techniques. These techniques aim at labelling records of unknown class making use of their features. They basically map the set of record features $\mathcal{F} = {F_1 , \dots, F_m }$ (attributes, variables) into the class attribute $C$ (target variable), the object of the classification. The relationship between $\mathcal{F}$ and $C$ is learned using a set of labelled records, defined as the training set. The ultimate purpose of classification models is to minimise the mis-classification error on unlabelled records, where the class predicted by the model differs from the real one. The features $F$ can be categorical or continuous. Association analysis first applications were about market basket analysis, in these application you are interested in finding out association between items with no particular focus on a target one. Datasets commonly used are the transactional ones: a collection of transaction were each of those contains a set of items. For example: $$ t_1 = \{i_1,i_2 \} \\ t_2 = \{i_1, i_3, i_4, i_5 \} \\ t_3 = \{i_2, i_3, i_4, i_5 \} \\ \vdots \\ t_n = \{ i_2, i_3, i_4, i_5 \} $$ You are interested in finding out rules such as $$ \{ i_3, i_5 \} \rightarrow \{ i_4 \} $$ It turns out that you can use association analysis for some specific classification tasks, for example when all your features are categorical. You have just to see items as features, but this is not what association analysis was born for.
What is the practical difference between association rules and decision trees in data mining? Basically, Decision Trees are a pure classification techniques. These techniques aim at labelling records of unknown class making use of their features. They basically map the set of record features $
11,228
What is the practical difference between association rules and decision trees in data mining?
"Association rules aim to find all rules above the given thresholds involving overlapping subsets of records, whereas decision trees find regions in space where most records belong to the same class. On the other hand, decision trees can miss many predictive rules found by association rules because they successively partition into smaller subsets. When a rule found by a decision tree is not found by association rules it is either because a constraint pruned the search space or because support or confidence were too high." "Association rules algorithms can be slow, despite many optimizations proposed in the literature because they work on a combinatorial space, whereas decision trees can be comparatively much faster because each split obtains successively smaller subsets of records." "When a decision tree is built an unbounded depth in the induction process can lead to small groups of records, decreasing rule generality and reliability . In a decision tree, internal nodes do not produce any rules (although tentative rules can be derived), which leads to increasingly longer and more complex rules until an acceptable node purity is reached. On the other hand, association rules can indeed produce rules corresponding to internal nodes corresponding to multiple trees, but they require careful interpretation since any two rules may refer to overlapping data subsets. Decision trees tend to be overfit for a particular data set, which may affect their applicability. Post-processing pruning techniques can reduce overfit, but unfortunately they also reduce rule confidence. Another issue is that decision trees can repeat the same attribute multiple times for the same rule because such attribute is a good discriminator. This is not a big issue since rules are conjunctions and therefore the rule can be simplified to one interval for the attribute, but such interval will be generally small and the rule too specific." Excerpts from: Ordonez, C., & Zhao, K. (2011). Evaluating association rules and decision trees to predict multiple target attributes. Intelligent Data Analysis, 15(2), 173–192. A nice article covering this topic, definitely worth reading.
What is the practical difference between association rules and decision trees in data mining?
"Association rules aim to find all rules above the given thresholds involving overlapping subsets of records, whereas decision trees find regions in space where most records belong to the same class.
What is the practical difference between association rules and decision trees in data mining? "Association rules aim to find all rules above the given thresholds involving overlapping subsets of records, whereas decision trees find regions in space where most records belong to the same class. On the other hand, decision trees can miss many predictive rules found by association rules because they successively partition into smaller subsets. When a rule found by a decision tree is not found by association rules it is either because a constraint pruned the search space or because support or confidence were too high." "Association rules algorithms can be slow, despite many optimizations proposed in the literature because they work on a combinatorial space, whereas decision trees can be comparatively much faster because each split obtains successively smaller subsets of records." "When a decision tree is built an unbounded depth in the induction process can lead to small groups of records, decreasing rule generality and reliability . In a decision tree, internal nodes do not produce any rules (although tentative rules can be derived), which leads to increasingly longer and more complex rules until an acceptable node purity is reached. On the other hand, association rules can indeed produce rules corresponding to internal nodes corresponding to multiple trees, but they require careful interpretation since any two rules may refer to overlapping data subsets. Decision trees tend to be overfit for a particular data set, which may affect their applicability. Post-processing pruning techniques can reduce overfit, but unfortunately they also reduce rule confidence. Another issue is that decision trees can repeat the same attribute multiple times for the same rule because such attribute is a good discriminator. This is not a big issue since rules are conjunctions and therefore the rule can be simplified to one interval for the attribute, but such interval will be generally small and the rule too specific." Excerpts from: Ordonez, C., & Zhao, K. (2011). Evaluating association rules and decision trees to predict multiple target attributes. Intelligent Data Analysis, 15(2), 173–192. A nice article covering this topic, definitely worth reading.
What is the practical difference between association rules and decision trees in data mining? "Association rules aim to find all rules above the given thresholds involving overlapping subsets of records, whereas decision trees find regions in space where most records belong to the same class.
11,229
What is the practical difference between association rules and decision trees in data mining?
We may argue that both association rules and decision trees suggest a set of rules to the user and hence both are similar, but we must understand the theoretical difference between decision trees and association rules, and further how rules suggested by both are different in meaning or in use. Firstly, decision tree is a supervised approach where the algorithm tries to predict an "outcome". A typical example of an "outcome" in real-life situations could be, e.g. churn, fraud, response to a campaign, etc. So, decision tree rules are used to predict an outcome. Association rule learning is an unsupervised approach where the algorithm tries to find associations among items, often within large commercial databases. A typical example of a large commercial database is one containing transactions of retailers, such as customer purchase history on an e-commerce website. Items could be products purchased from stores, or movies watched on an online streaming platform. Association rule learning is all about how the purchase of one product is inducing the purchase of another product. Secondly, decision trees are constructed based on some impurity/uncertainty metrics, e.g. information gain, Gini coefficient, or entropy, whereas association rules are derived based on support, confidence, and lift. Thirdly, as decision tree is a "supervised" approach, its accuracy is measurable, whereas association rule learning is an "unsupervised" approach, and so its accuracy is subjective.
What is the practical difference between association rules and decision trees in data mining?
We may argue that both association rules and decision trees suggest a set of rules to the user and hence both are similar, but we must understand the theoretical difference between decision trees and
What is the practical difference between association rules and decision trees in data mining? We may argue that both association rules and decision trees suggest a set of rules to the user and hence both are similar, but we must understand the theoretical difference between decision trees and association rules, and further how rules suggested by both are different in meaning or in use. Firstly, decision tree is a supervised approach where the algorithm tries to predict an "outcome". A typical example of an "outcome" in real-life situations could be, e.g. churn, fraud, response to a campaign, etc. So, decision tree rules are used to predict an outcome. Association rule learning is an unsupervised approach where the algorithm tries to find associations among items, often within large commercial databases. A typical example of a large commercial database is one containing transactions of retailers, such as customer purchase history on an e-commerce website. Items could be products purchased from stores, or movies watched on an online streaming platform. Association rule learning is all about how the purchase of one product is inducing the purchase of another product. Secondly, decision trees are constructed based on some impurity/uncertainty metrics, e.g. information gain, Gini coefficient, or entropy, whereas association rules are derived based on support, confidence, and lift. Thirdly, as decision tree is a "supervised" approach, its accuracy is measurable, whereas association rule learning is an "unsupervised" approach, and so its accuracy is subjective.
What is the practical difference between association rules and decision trees in data mining? We may argue that both association rules and decision trees suggest a set of rules to the user and hence both are similar, but we must understand the theoretical difference between decision trees and
11,230
Why is maximum likelihood estimation considered to be a frequentist technique
You apply a relatively narrow definition of frequentism and MLE - if we are a bit more generous and define Frequentism: goal of consistency, (asymptotic) optimality, unbiasedness, and controlled error rates under repeated sampling, independent of the true parameters MLE = point estimate + confidence intervals (CIs) then it seems pretty clear that MLE satisfies all frequentist ideals. In particular, CIs in MLE, as p-values, control the error rate under repeated sampling, and do not give the 95% probability region for the true parameter value, as many people think - hence they are through and through frequentist. Not all of these ideas were already present in Fisher's foundational 1922 paper "On the mathematical foundations of theoretical statistics", but the idea of optimality and unbiasedness is, and Neyman latter added the idea of constructing CIs with fixed error rates. Efron, 2013, "A 250-year argument: Belief, behavior, and the bootstrap", summarizes in his very readable history of the Bayesian/Frequentist debate: The frequentist bandwagon really got rolling in the early 1900s. Ronald Fisher developed the maximum likelihood theory of optimal estimation, showing the best possible behavior for an estimate, and Jerzy Neyman did the same for confidence intervals and tests. Fisher’s and Neyman’s procedures were an almost perfect fit to the scientific needs and the computational limits of twentieth century science, casting Bayesianism into a shadow existence. Regarding your more narrow definition - I mildly disagree with your premise that minimization of frequentist risk (FR) is the main criterion to decide if a method follows frequentist philosophy. I would say the fact that minimizing FR is a desirable property follows from frequentist philosophy, rather than preceding it. Hence, a decision rule / estimator does not have to minimize FR to be frequentist, and minimizing FR is also does not necessarily say that a method is frequentist, but a frequentist would in doubt prefer minimization of FR. If we look at MLE specifically: Fisher showed that MLE is asymptotically optimal (broadly equivalent to minimizing FR), and that was certainly one reason for promoting MLE. However, he was aware that optimality did not hold for finite sample size. Still, he was happy with this estimator due to other desirable properties such as consistency, asymptotic normality, invariance under parameter transformations, and let's not forget: ease to calculate. Invariance in particular is stressed abundantly in the 1922 paper - from my reading, I would say maintaining invariance under parameter transformation, and the ability to get rid of the priors in general, were one of his main motivations in choosing MLE. If you want to understand his reasoning better, I really recommend the 1922 paper, it's beautifully written and he explains his reasoning very well.
Why is maximum likelihood estimation considered to be a frequentist technique
You apply a relatively narrow definition of frequentism and MLE - if we are a bit more generous and define Frequentism: goal of consistency, (asymptotic) optimality, unbiasedness, and controlled erro
Why is maximum likelihood estimation considered to be a frequentist technique You apply a relatively narrow definition of frequentism and MLE - if we are a bit more generous and define Frequentism: goal of consistency, (asymptotic) optimality, unbiasedness, and controlled error rates under repeated sampling, independent of the true parameters MLE = point estimate + confidence intervals (CIs) then it seems pretty clear that MLE satisfies all frequentist ideals. In particular, CIs in MLE, as p-values, control the error rate under repeated sampling, and do not give the 95% probability region for the true parameter value, as many people think - hence they are through and through frequentist. Not all of these ideas were already present in Fisher's foundational 1922 paper "On the mathematical foundations of theoretical statistics", but the idea of optimality and unbiasedness is, and Neyman latter added the idea of constructing CIs with fixed error rates. Efron, 2013, "A 250-year argument: Belief, behavior, and the bootstrap", summarizes in his very readable history of the Bayesian/Frequentist debate: The frequentist bandwagon really got rolling in the early 1900s. Ronald Fisher developed the maximum likelihood theory of optimal estimation, showing the best possible behavior for an estimate, and Jerzy Neyman did the same for confidence intervals and tests. Fisher’s and Neyman’s procedures were an almost perfect fit to the scientific needs and the computational limits of twentieth century science, casting Bayesianism into a shadow existence. Regarding your more narrow definition - I mildly disagree with your premise that minimization of frequentist risk (FR) is the main criterion to decide if a method follows frequentist philosophy. I would say the fact that minimizing FR is a desirable property follows from frequentist philosophy, rather than preceding it. Hence, a decision rule / estimator does not have to minimize FR to be frequentist, and minimizing FR is also does not necessarily say that a method is frequentist, but a frequentist would in doubt prefer minimization of FR. If we look at MLE specifically: Fisher showed that MLE is asymptotically optimal (broadly equivalent to minimizing FR), and that was certainly one reason for promoting MLE. However, he was aware that optimality did not hold for finite sample size. Still, he was happy with this estimator due to other desirable properties such as consistency, asymptotic normality, invariance under parameter transformations, and let's not forget: ease to calculate. Invariance in particular is stressed abundantly in the 1922 paper - from my reading, I would say maintaining invariance under parameter transformation, and the ability to get rid of the priors in general, were one of his main motivations in choosing MLE. If you want to understand his reasoning better, I really recommend the 1922 paper, it's beautifully written and he explains his reasoning very well.
Why is maximum likelihood estimation considered to be a frequentist technique You apply a relatively narrow definition of frequentism and MLE - if we are a bit more generous and define Frequentism: goal of consistency, (asymptotic) optimality, unbiasedness, and controlled erro
11,231
Why is maximum likelihood estimation considered to be a frequentist technique
Basically, for two reasons: Maximum likelihood is a point-wise estimate of the model parameters. We Bayesians like posterior distributions. Maximum likelihood assumes no prior distribution, We Bayesians need our priors, it could be informative or uninformative, but it need to exists
Why is maximum likelihood estimation considered to be a frequentist technique
Basically, for two reasons: Maximum likelihood is a point-wise estimate of the model parameters. We Bayesians like posterior distributions. Maximum likelihood assumes no prior distribution, We Bayesi
Why is maximum likelihood estimation considered to be a frequentist technique Basically, for two reasons: Maximum likelihood is a point-wise estimate of the model parameters. We Bayesians like posterior distributions. Maximum likelihood assumes no prior distribution, We Bayesians need our priors, it could be informative or uninformative, but it need to exists
Why is maximum likelihood estimation considered to be a frequentist technique Basically, for two reasons: Maximum likelihood is a point-wise estimate of the model parameters. We Bayesians like posterior distributions. Maximum likelihood assumes no prior distribution, We Bayesi
11,232
Why is Pearson parametric and Spearman non-parametric
The problem is that "nonparametric" really has two distinct meanings these days. The definition in Wikipedia applies to things like nonparametric curve fitting, eg via splines or local regression. The other meaning, which is older, is more along the lines of "distribution-free" -- that is, techniques that can be applied regardless of the assumed distribution of the data. The latter is the one that applies to Spearman's rho, since the rank-transformation implies it will give the same result no matter what your original distribution was.
Why is Pearson parametric and Spearman non-parametric
The problem is that "nonparametric" really has two distinct meanings these days. The definition in Wikipedia applies to things like nonparametric curve fitting, eg via splines or local regression. The
Why is Pearson parametric and Spearman non-parametric The problem is that "nonparametric" really has two distinct meanings these days. The definition in Wikipedia applies to things like nonparametric curve fitting, eg via splines or local regression. The other meaning, which is older, is more along the lines of "distribution-free" -- that is, techniques that can be applied regardless of the assumed distribution of the data. The latter is the one that applies to Spearman's rho, since the rank-transformation implies it will give the same result no matter what your original distribution was.
Why is Pearson parametric and Spearman non-parametric The problem is that "nonparametric" really has two distinct meanings these days. The definition in Wikipedia applies to things like nonparametric curve fitting, eg via splines or local regression. The
11,233
Why is Pearson parametric and Spearman non-parametric
I think the only reason why Pearson's correlation coefficient would be called parametric is because you can use it to estimate the parameters of the multivariate normal distribution. for instance, bivariate normal distribution has 5 parameters: two means, two variances and the correlation coefficient. The latter can be estimated with Pearson correlation coefficient. Otherwise, you're absolutely right, in order to compute Pearson $\rho$ you don't need to make any distributional assumptions. It's just when you assume normal distribution, the Pearson correlation has additional meanings as opposed to Spearman or Kendall.
Why is Pearson parametric and Spearman non-parametric
I think the only reason why Pearson's correlation coefficient would be called parametric is because you can use it to estimate the parameters of the multivariate normal distribution. for instance, biv
Why is Pearson parametric and Spearman non-parametric I think the only reason why Pearson's correlation coefficient would be called parametric is because you can use it to estimate the parameters of the multivariate normal distribution. for instance, bivariate normal distribution has 5 parameters: two means, two variances and the correlation coefficient. The latter can be estimated with Pearson correlation coefficient. Otherwise, you're absolutely right, in order to compute Pearson $\rho$ you don't need to make any distributional assumptions. It's just when you assume normal distribution, the Pearson correlation has additional meanings as opposed to Spearman or Kendall.
Why is Pearson parametric and Spearman non-parametric I think the only reason why Pearson's correlation coefficient would be called parametric is because you can use it to estimate the parameters of the multivariate normal distribution. for instance, biv
11,234
Why is Pearson parametric and Spearman non-parametric
Simplest answer I think is that Spearmen's rho test uses ordinal data (numbers that can be ranked but don't tell you anything about the interval between the numbers e.g. 3 flavours of ice cream are ranked 1, 2 and 3 but this only tells you which flavour was preferred not how much by). Ordinal data cannot be used in parametric tests. Pearson's r test uses interval or ratio data (numbers that have fixed intervals e.g. seconds, kg, mm). 1mm is not only smaller than 5mm but you know exactly how much by. this type of data can be used in a parametric test.
Why is Pearson parametric and Spearman non-parametric
Simplest answer I think is that Spearmen's rho test uses ordinal data (numbers that can be ranked but don't tell you anything about the interval between the numbers e.g. 3 flavours of ice cream are ra
Why is Pearson parametric and Spearman non-parametric Simplest answer I think is that Spearmen's rho test uses ordinal data (numbers that can be ranked but don't tell you anything about the interval between the numbers e.g. 3 flavours of ice cream are ranked 1, 2 and 3 but this only tells you which flavour was preferred not how much by). Ordinal data cannot be used in parametric tests. Pearson's r test uses interval or ratio data (numbers that have fixed intervals e.g. seconds, kg, mm). 1mm is not only smaller than 5mm but you know exactly how much by. this type of data can be used in a parametric test.
Why is Pearson parametric and Spearman non-parametric Simplest answer I think is that Spearmen's rho test uses ordinal data (numbers that can be ranked but don't tell you anything about the interval between the numbers e.g. 3 flavours of ice cream are ra
11,235
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
Let us recall some things. Let $(\Omega,A,P)$ be a probability space, $\Omega$ is our sample set, $A$ is our $\sigma$-algebra, and $P$ is a probability function defined on $A$. A random variable is a measurable function $X:\Omega \to \mathbb{R}$ i.e. $X^{-1}(S) \in A$ for any Lebesgue measurable subset in $\mathbb{R}$. If you are not familiar with this concept then everything I say afterwards will not make any sense. Anytime we have a random variable, $X:\Omega \to \mathbb{R}$, it induces a probability measure $X'$ on $\mathbb{R}$ by the categorical pushforward. In other words, $X'(S) = P(X^{-1}(S))$. It is trivial to check that $X'$ is probability measure on $\mathbb{R}$. We call $X'$ the distribution of $X$. Now related to this concept is something called the distribution function of a function variable. Given a random variable $X:\Omega \to \mathbb{R}$ we define $F(x) = P(X\leq x)$. Distribution functions $F:\mathbb{R} \to [0,1]$ have the following properties: $F$ is right-continuous. $F$ is non-decreasing $F(\infty) = 1$ and $F(-\infty)=0$. Clearly random variables which are equal have the same distribution and distribution function. To reverse the process and obtain a measure with the given distribution function is pretty technical. Let us say you are given a distribution function $F(x)$. Define $\mu(a,b] = F(b) - F(a)$. You have to show that $\mu$ is a measure on the semi-algebra of intervals of the $(a,b]$. Afterwards you can apply the Carathéodory extension theorem to extend $\mu$ to a probability measure on $\mathbb{R}$.
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
Let us recall some things. Let $(\Omega,A,P)$ be a probability space, $\Omega$ is our sample set, $A$ is our $\sigma$-algebra, and $P$ is a probability function defined on $A$. A random variable is a
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution? Let us recall some things. Let $(\Omega,A,P)$ be a probability space, $\Omega$ is our sample set, $A$ is our $\sigma$-algebra, and $P$ is a probability function defined on $A$. A random variable is a measurable function $X:\Omega \to \mathbb{R}$ i.e. $X^{-1}(S) \in A$ for any Lebesgue measurable subset in $\mathbb{R}$. If you are not familiar with this concept then everything I say afterwards will not make any sense. Anytime we have a random variable, $X:\Omega \to \mathbb{R}$, it induces a probability measure $X'$ on $\mathbb{R}$ by the categorical pushforward. In other words, $X'(S) = P(X^{-1}(S))$. It is trivial to check that $X'$ is probability measure on $\mathbb{R}$. We call $X'$ the distribution of $X$. Now related to this concept is something called the distribution function of a function variable. Given a random variable $X:\Omega \to \mathbb{R}$ we define $F(x) = P(X\leq x)$. Distribution functions $F:\mathbb{R} \to [0,1]$ have the following properties: $F$ is right-continuous. $F$ is non-decreasing $F(\infty) = 1$ and $F(-\infty)=0$. Clearly random variables which are equal have the same distribution and distribution function. To reverse the process and obtain a measure with the given distribution function is pretty technical. Let us say you are given a distribution function $F(x)$. Define $\mu(a,b] = F(b) - F(a)$. You have to show that $\mu$ is a measure on the semi-algebra of intervals of the $(a,b]$. Afterwards you can apply the Carathéodory extension theorem to extend $\mu$ to a probability measure on $\mathbb{R}$.
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution? Let us recall some things. Let $(\Omega,A,P)$ be a probability space, $\Omega$ is our sample set, $A$ is our $\sigma$-algebra, and $P$ is a probability function defined on $A$. A random variable is a
11,236
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
To answer the request for an example of two densities with the same integral (i.e. have the same distribution function) consider these functions defined on the real numbers: f(x) = 1 ; when x is odd integer f(x) = exp(-x^2) ; elsewhere and then; f2(x) = 1 ; when x is even integer f2(x) = exp(-x^2) ; elsewhere They are not equal at all x, but are both densities for the same distribution, hence densities are not uniquely determined by the (cumulative) distribution. When densities with a real domain are different only on a countable set of x values, then the integrals will be the same. Mathematical analysis is not really for the faint of heart or the determinately concrete mind.
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
To answer the request for an example of two densities with the same integral (i.e. have the same distribution function) consider these functions defined on the real numbers: f(x) = 1 ; when x is odd
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution? To answer the request for an example of two densities with the same integral (i.e. have the same distribution function) consider these functions defined on the real numbers: f(x) = 1 ; when x is odd integer f(x) = exp(-x^2) ; elsewhere and then; f2(x) = 1 ; when x is even integer f2(x) = exp(-x^2) ; elsewhere They are not equal at all x, but are both densities for the same distribution, hence densities are not uniquely determined by the (cumulative) distribution. When densities with a real domain are different only on a countable set of x values, then the integrals will be the same. Mathematical analysis is not really for the faint of heart or the determinately concrete mind.
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution? To answer the request for an example of two densities with the same integral (i.e. have the same distribution function) consider these functions defined on the real numbers: f(x) = 1 ; when x is odd
11,237
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
I disagree with the statement, "the probability distribution function does not uniquely determine a probability measure", that you say in your opening question. It does uniquely determine it. Let $f_1,f_2:\mathbb{R}\to [0,\infty)$ be two probability mass functions. If, $$ \int_E f_1 = \int_E f_2 $$ For any measurable set $E$ then $f_1=f_2$ almost everywhere. This uniquely determines the pdf (because in analysis we do not care if they disagree on a set of measure zero). We can rewrite the above integral into, $$ \int_E g = 0 $$ Where $g=f_1-f_2$ is an integrable function. Define $E = \{ x \in \mathbb{R} ~ | ~ g \geq 0 \}$, so $\int_E g = 0$. We use the well-known theorem that if an integral of a non-negative function is zero then the function is zero almost everywhere. In particular, $g=0$ a.e. on $E$. So $f_1 = f_2$ a.e. on $E$. Now repeat the argument in the other direction with $F = \{ x\in \mathbb{R} ~ | ~ g \leq 0 \}$. We will get that $f_1 = f_2$ a.e on $F$. Thus, $f_1 = f_2$ a.e. on $E\cup F = \mathbb{R}$.
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
I disagree with the statement, "the probability distribution function does not uniquely determine a probability measure", that you say in your opening question. It does uniquely determine it. Let $f_
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution? I disagree with the statement, "the probability distribution function does not uniquely determine a probability measure", that you say in your opening question. It does uniquely determine it. Let $f_1,f_2:\mathbb{R}\to [0,\infty)$ be two probability mass functions. If, $$ \int_E f_1 = \int_E f_2 $$ For any measurable set $E$ then $f_1=f_2$ almost everywhere. This uniquely determines the pdf (because in analysis we do not care if they disagree on a set of measure zero). We can rewrite the above integral into, $$ \int_E g = 0 $$ Where $g=f_1-f_2$ is an integrable function. Define $E = \{ x \in \mathbb{R} ~ | ~ g \geq 0 \}$, so $\int_E g = 0$. We use the well-known theorem that if an integral of a non-negative function is zero then the function is zero almost everywhere. In particular, $g=0$ a.e. on $E$. So $f_1 = f_2$ a.e. on $E$. Now repeat the argument in the other direction with $F = \{ x\in \mathbb{R} ~ | ~ g \leq 0 \}$. We will get that $f_1 = f_2$ a.e on $F$. Thus, $f_1 = f_2$ a.e. on $E\cup F = \mathbb{R}$.
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution? I disagree with the statement, "the probability distribution function does not uniquely determine a probability measure", that you say in your opening question. It does uniquely determine it. Let $f_
11,238
Why aren't power or log transformations taught much in machine learning?
The book Applied Predictive Modeling by Kuhn and Johnson is a highly-regarded practical machine learning book with a large section on variable transformation including Box-Cox. The authors claim that many machine learning algorithms work better if the features have symmetric and unimodal distributions. Transforming the features like this is an important part of "feature engineering".
Why aren't power or log transformations taught much in machine learning?
The book Applied Predictive Modeling by Kuhn and Johnson is a highly-regarded practical machine learning book with a large section on variable transformation including Box-Cox. The authors claim that
Why aren't power or log transformations taught much in machine learning? The book Applied Predictive Modeling by Kuhn and Johnson is a highly-regarded practical machine learning book with a large section on variable transformation including Box-Cox. The authors claim that many machine learning algorithms work better if the features have symmetric and unimodal distributions. Transforming the features like this is an important part of "feature engineering".
Why aren't power or log transformations taught much in machine learning? The book Applied Predictive Modeling by Kuhn and Johnson is a highly-regarded practical machine learning book with a large section on variable transformation including Box-Cox. The authors claim that
11,239
Why aren't power or log transformations taught much in machine learning?
Well from my own perspective, quite often I am interested in the predictive distribution of the response variable, rather than just the conditional mean, and in that case it is better to use a likelihood that more correctly represents the target distribution. For instance, I like to use kernelised linear models rather than (say) support vector regression, because I can use a Poisson likelihood if I want to. As a lot of machine learning people are Bayesians, I suspect that using a different likelihood will seem more elegant than transformations (choosing an appropriate likelihood is generally the first step).
Why aren't power or log transformations taught much in machine learning?
Well from my own perspective, quite often I am interested in the predictive distribution of the response variable, rather than just the conditional mean, and in that case it is better to use a likelih
Why aren't power or log transformations taught much in machine learning? Well from my own perspective, quite often I am interested in the predictive distribution of the response variable, rather than just the conditional mean, and in that case it is better to use a likelihood that more correctly represents the target distribution. For instance, I like to use kernelised linear models rather than (say) support vector regression, because I can use a Poisson likelihood if I want to. As a lot of machine learning people are Bayesians, I suspect that using a different likelihood will seem more elegant than transformations (choosing an appropriate likelihood is generally the first step).
Why aren't power or log transformations taught much in machine learning? Well from my own perspective, quite often I am interested in the predictive distribution of the response variable, rather than just the conditional mean, and in that case it is better to use a likelih
11,240
Why aren't power or log transformations taught much in machine learning?
Here is my afterward thoughts. I think it's because ML is largely deal with classification, and classification is no need for transforming y (y is categorical). ML usually deal with large independent variables (e.g. thousands in NLP ) and logistic regression doesn't require normality; I think that's why they don't use Box-Cox power transformation due to speed consideration. (note: I'm not familiar to power transformation.)
Why aren't power or log transformations taught much in machine learning?
Here is my afterward thoughts. I think it's because ML is largely deal with classification, and classification is no need for transforming y (y is categorical). ML usually deal with large independen
Why aren't power or log transformations taught much in machine learning? Here is my afterward thoughts. I think it's because ML is largely deal with classification, and classification is no need for transforming y (y is categorical). ML usually deal with large independent variables (e.g. thousands in NLP ) and logistic regression doesn't require normality; I think that's why they don't use Box-Cox power transformation due to speed consideration. (note: I'm not familiar to power transformation.)
Why aren't power or log transformations taught much in machine learning? Here is my afterward thoughts. I think it's because ML is largely deal with classification, and classification is no need for transforming y (y is categorical). ML usually deal with large independen
11,241
How to choose an optimal number of latent factors in non-negative matrix factorization?
To choose an optimal number of latent factors in non-negative matrix factorization, use cross-validation. As you wrote, the aim of NMF is to find low-dimensional $\mathbf W$ and $\mathbf H$ with all non-negative elements minimizing reconstruction error $\|\mathbf V-\mathbf W\mathbf H\|^2$. Imagine that we leave out one element of $\mathbf V$, e.g. $V_{ab}$, and perform NMF of the resulting matrix with one missing cell. This means finding $\mathbf W$ and $\mathbf H$ minimizing reconstruction error over all non-missing cells: $$\sum_ {ij\ne ab} (V_{ij}-[\mathbf W\mathbf H]_{ij})^2.$$ Once this is done, we can predict the left out element $V_{ab}$ by computing $[\mathbf W\mathbf H]_{ab}$ and calculate the prediction error $$e_{ab}=(V_{ab}-[\mathbf W\mathbf H]_{ab})^2.$$ One can repeat this procedure leaving out all elements $V_{ab}$ one at a time, and sum up the prediction errors over all $a$ and $b$. This will result in an overall PRESS value (predicted residual sum of squares) $E(k)=\sum_{ab}e_{ab}$ that will depend on $k$. Hopefully function $E(k)$ will have a minimum that can be used as an 'optimal' $k$. Note that this can be computationally costly, because the NMF has to be repeated for each left out value, and might also be tricky to program (depending on how easy it is to perform NMF with missing values). In PCA one can get around this by leaving out full rows of $\mathbf V$ (which accelerates the computations a lot), see my reply in How to perform cross-validation for PCA to determine the number of principal components?, but this is not possible here. Of course all the usual principles of cross-validation apply here, so one can leave out many cells at a time (instead of only a single one), and/or repeat the procedure for only some random cells instead of looping over all cells. Both approaches can help accelerating the process. Edit (Mar 2019): See this very nice illustrated write-up by @AlexWilliams: http://alexhwilliams.info/itsneuronalblog/2018/02/26/crossval. Alex uses https://github.com/kimjingu/nonnegfac-python for NMF with missing values.
How to choose an optimal number of latent factors in non-negative matrix factorization?
To choose an optimal number of latent factors in non-negative matrix factorization, use cross-validation. As you wrote, the aim of NMF is to find low-dimensional $\mathbf W$ and $\mathbf H$ with all n
How to choose an optimal number of latent factors in non-negative matrix factorization? To choose an optimal number of latent factors in non-negative matrix factorization, use cross-validation. As you wrote, the aim of NMF is to find low-dimensional $\mathbf W$ and $\mathbf H$ with all non-negative elements minimizing reconstruction error $\|\mathbf V-\mathbf W\mathbf H\|^2$. Imagine that we leave out one element of $\mathbf V$, e.g. $V_{ab}$, and perform NMF of the resulting matrix with one missing cell. This means finding $\mathbf W$ and $\mathbf H$ minimizing reconstruction error over all non-missing cells: $$\sum_ {ij\ne ab} (V_{ij}-[\mathbf W\mathbf H]_{ij})^2.$$ Once this is done, we can predict the left out element $V_{ab}$ by computing $[\mathbf W\mathbf H]_{ab}$ and calculate the prediction error $$e_{ab}=(V_{ab}-[\mathbf W\mathbf H]_{ab})^2.$$ One can repeat this procedure leaving out all elements $V_{ab}$ one at a time, and sum up the prediction errors over all $a$ and $b$. This will result in an overall PRESS value (predicted residual sum of squares) $E(k)=\sum_{ab}e_{ab}$ that will depend on $k$. Hopefully function $E(k)$ will have a minimum that can be used as an 'optimal' $k$. Note that this can be computationally costly, because the NMF has to be repeated for each left out value, and might also be tricky to program (depending on how easy it is to perform NMF with missing values). In PCA one can get around this by leaving out full rows of $\mathbf V$ (which accelerates the computations a lot), see my reply in How to perform cross-validation for PCA to determine the number of principal components?, but this is not possible here. Of course all the usual principles of cross-validation apply here, so one can leave out many cells at a time (instead of only a single one), and/or repeat the procedure for only some random cells instead of looping over all cells. Both approaches can help accelerating the process. Edit (Mar 2019): See this very nice illustrated write-up by @AlexWilliams: http://alexhwilliams.info/itsneuronalblog/2018/02/26/crossval. Alex uses https://github.com/kimjingu/nonnegfac-python for NMF with missing values.
How to choose an optimal number of latent factors in non-negative matrix factorization? To choose an optimal number of latent factors in non-negative matrix factorization, use cross-validation. As you wrote, the aim of NMF is to find low-dimensional $\mathbf W$ and $\mathbf H$ with all n
11,242
How to choose an optimal number of latent factors in non-negative matrix factorization?
To my knowledge, there are two good criteria: 1) the cophenetic correlation coefficient and 2) comparing the residual sum of squares against randomized data for a set of ranks (maybe there is a name for that, but I dont remember) Cophenetic correlation coefficient: You repeat NMF several time per rank and you calculate how similar are the results. In other words, how stable are the identified clusters, given that the initial seed is random. Choose the highest K before the cophenetic coefficient drops. RSS against randomized data For any dimensionality reduction approach, there is always a loss of information compared to your original data (estimated by RSS). Now perform NMF for increasing K and calculate RSS with both your original dataset and a randomized dataset. When comparing RSS in function of K, the RSS decreases with increasing K in the original dataset, but this is less the case for the randomized dataset. By comparing both slopes, there should be an K where they cross. In other words, how much information could you afford to lose (=highest K) before being within the noise. Hope I was clear enough. Edit: I have found those articles. 1.Jean-P. Brunet, Pablo Tamayo, Todd R. Golub and Jill P. Mesirov. Metagenes and molecular pattern discovery using matrix factorization. In Proceedings of the National Academy of Sciences of the USA, 101(12): 4164-4169, 2004. 2.Attila Frigyesi and Mattias Hoglund. Non-negative matrix factorization for the analysis of complex gene expression data: identification of clinically relevant tumor subtypes. Cancer Informatics, 6: 275-292, 2008.
How to choose an optimal number of latent factors in non-negative matrix factorization?
To my knowledge, there are two good criteria: 1) the cophenetic correlation coefficient and 2) comparing the residual sum of squares against randomized data for a set of ranks (maybe there is a name f
How to choose an optimal number of latent factors in non-negative matrix factorization? To my knowledge, there are two good criteria: 1) the cophenetic correlation coefficient and 2) comparing the residual sum of squares against randomized data for a set of ranks (maybe there is a name for that, but I dont remember) Cophenetic correlation coefficient: You repeat NMF several time per rank and you calculate how similar are the results. In other words, how stable are the identified clusters, given that the initial seed is random. Choose the highest K before the cophenetic coefficient drops. RSS against randomized data For any dimensionality reduction approach, there is always a loss of information compared to your original data (estimated by RSS). Now perform NMF for increasing K and calculate RSS with both your original dataset and a randomized dataset. When comparing RSS in function of K, the RSS decreases with increasing K in the original dataset, but this is less the case for the randomized dataset. By comparing both slopes, there should be an K where they cross. In other words, how much information could you afford to lose (=highest K) before being within the noise. Hope I was clear enough. Edit: I have found those articles. 1.Jean-P. Brunet, Pablo Tamayo, Todd R. Golub and Jill P. Mesirov. Metagenes and molecular pattern discovery using matrix factorization. In Proceedings of the National Academy of Sciences of the USA, 101(12): 4164-4169, 2004. 2.Attila Frigyesi and Mattias Hoglund. Non-negative matrix factorization for the analysis of complex gene expression data: identification of clinically relevant tumor subtypes. Cancer Informatics, 6: 275-292, 2008.
How to choose an optimal number of latent factors in non-negative matrix factorization? To my knowledge, there are two good criteria: 1) the cophenetic correlation coefficient and 2) comparing the residual sum of squares against randomized data for a set of ranks (maybe there is a name f
11,243
How to choose an optimal number of latent factors in non-negative matrix factorization?
In the NMF factorization, the parameter $k$ (noted $r$ in most literature) is the rank of the approximation of $V$ and is chosen such that $k < \text{min}(m, n)$. The choice of the parameter determines the representation of your data $V$ in an over-complete basis composed of the columns of $W$; the $w_i \text{ , } i = 1, 2, \cdots, k$ . The results is that the ranks of matrices $W$ and $H$ have an upper bound of $k$ and the product $WH$ is a low rank approximation of $V$; also $k$ at most. Hence the choice of $k < \text{min}(m, n)$ should constitute a dimensionality reduction where $V$ can be generated/spanned from the aforementioned basis vectors. Further details can be found in chapter 6 of this book by S. Theodoridis and K. Koutroumbas. After minimization of your chosen cost function with respect to $W$ and $H$, the optimal choice of $k$, (chosen empirically by working with different feature sub-spaces) should give $V^*$, an approximation of $V$, with features representative of your initial data matrix $V$. Working with different feature sub-spaces in the sense that, $k$ the number of columns in $W$, is the number of basis vectors in the NMF sub-space. And empirically working with different values of $k$ is tantamount to working with different dimensionality-reduced feature spaces.
How to choose an optimal number of latent factors in non-negative matrix factorization?
In the NMF factorization, the parameter $k$ (noted $r$ in most literature) is the rank of the approximation of $V$ and is chosen such that $k < \text{min}(m, n)$. The choice of the parameter determine
How to choose an optimal number of latent factors in non-negative matrix factorization? In the NMF factorization, the parameter $k$ (noted $r$ in most literature) is the rank of the approximation of $V$ and is chosen such that $k < \text{min}(m, n)$. The choice of the parameter determines the representation of your data $V$ in an over-complete basis composed of the columns of $W$; the $w_i \text{ , } i = 1, 2, \cdots, k$ . The results is that the ranks of matrices $W$ and $H$ have an upper bound of $k$ and the product $WH$ is a low rank approximation of $V$; also $k$ at most. Hence the choice of $k < \text{min}(m, n)$ should constitute a dimensionality reduction where $V$ can be generated/spanned from the aforementioned basis vectors. Further details can be found in chapter 6 of this book by S. Theodoridis and K. Koutroumbas. After minimization of your chosen cost function with respect to $W$ and $H$, the optimal choice of $k$, (chosen empirically by working with different feature sub-spaces) should give $V^*$, an approximation of $V$, with features representative of your initial data matrix $V$. Working with different feature sub-spaces in the sense that, $k$ the number of columns in $W$, is the number of basis vectors in the NMF sub-space. And empirically working with different values of $k$ is tantamount to working with different dimensionality-reduced feature spaces.
How to choose an optimal number of latent factors in non-negative matrix factorization? In the NMF factorization, the parameter $k$ (noted $r$ in most literature) is the rank of the approximation of $V$ and is chosen such that $k < \text{min}(m, n)$. The choice of the parameter determine
11,244
Boosting AND Bagging Trees (XGBoost, LightGBM)
Bagging: Take N random samples of x% of the samples and y% of the Features Instances are repeatedly sub-sampled in Bagging, but not Features. (RandomForests, XGBoost and CatBoost do both): Given dataset D of size N. For m in n_models: Create new dataset D_i of size N by sampling with replacement from D. Train model on D_i (and then predict) Combine predictions with equal weight Include an initialization step in your Boosting pseudo code to get rid of redundancy: Init data with equal weights (1/N). For m in n_model: Train model on weighted data (and then predict) Update weights according to misclassification rate. Renormalize weights Combine confidence weighted predictions Bagged Boosted Trees (as you call it) is certainly a reasonable Approach, but different from XGBoost or CatBoost: Given dataset D of size N. For m in n_models: Create new dataset D_i of size N by sampling with replacement from D. (Insert Boosting pseudo code here (on D_i)) Combine predictions with equal weight XGBoost and CatBoost are both based on Boosting and use the entire training data. They also implement bagging by subsampling once in every boosting Iteration: Init data with equal weights (1/N). For m in n_model: Train model on weighted bootstrap sample (and then predict) Update weights according to misclassification rate. Renormalize weights Combine confidence weighted predictions If you want to stick to "fit model to residuals", then this would be equivalent to "fit model to residuals of data in bootstrap sample". Further Remarks: There is no "best way to do it" as you suggest (no free lunch theorem). "Bagged Boosted Trees" might outperform XGBoost on certain data sets. Take a single random sample of x% of the samples This line is confusing. Where did you get this from? if i mod bag_frequency == 0 (i.e., bag every 5 rounds): This should not be mentioned in your pseudo code. Especially when there are other more important parameters left out (like learning rate in boosting).
Boosting AND Bagging Trees (XGBoost, LightGBM)
Bagging: Take N random samples of x% of the samples and y% of the Features Instances are repeatedly sub-sampled in Bagging, but not Features. (RandomForests, XGBoost and CatBoost do both): Given d
Boosting AND Bagging Trees (XGBoost, LightGBM) Bagging: Take N random samples of x% of the samples and y% of the Features Instances are repeatedly sub-sampled in Bagging, but not Features. (RandomForests, XGBoost and CatBoost do both): Given dataset D of size N. For m in n_models: Create new dataset D_i of size N by sampling with replacement from D. Train model on D_i (and then predict) Combine predictions with equal weight Include an initialization step in your Boosting pseudo code to get rid of redundancy: Init data with equal weights (1/N). For m in n_model: Train model on weighted data (and then predict) Update weights according to misclassification rate. Renormalize weights Combine confidence weighted predictions Bagged Boosted Trees (as you call it) is certainly a reasonable Approach, but different from XGBoost or CatBoost: Given dataset D of size N. For m in n_models: Create new dataset D_i of size N by sampling with replacement from D. (Insert Boosting pseudo code here (on D_i)) Combine predictions with equal weight XGBoost and CatBoost are both based on Boosting and use the entire training data. They also implement bagging by subsampling once in every boosting Iteration: Init data with equal weights (1/N). For m in n_model: Train model on weighted bootstrap sample (and then predict) Update weights according to misclassification rate. Renormalize weights Combine confidence weighted predictions If you want to stick to "fit model to residuals", then this would be equivalent to "fit model to residuals of data in bootstrap sample". Further Remarks: There is no "best way to do it" as you suggest (no free lunch theorem). "Bagged Boosted Trees" might outperform XGBoost on certain data sets. Take a single random sample of x% of the samples This line is confusing. Where did you get this from? if i mod bag_frequency == 0 (i.e., bag every 5 rounds): This should not be mentioned in your pseudo code. Especially when there are other more important parameters left out (like learning rate in boosting).
Boosting AND Bagging Trees (XGBoost, LightGBM) Bagging: Take N random samples of x% of the samples and y% of the Features Instances are repeatedly sub-sampled in Bagging, but not Features. (RandomForests, XGBoost and CatBoost do both): Given d
11,245
How to train LSTM model on multiple time series data?
Make the identity of the agent one of the features, and train on all data. Probably train on a mini-batch of eg 128 agents at a time: run through the time-series from start to finish for those 128 agents, then select a new mini-batch of agents. For each mini-batch, run a slice of say 50 timesteps, then backprop. Keep the end states from that slice, and run the next 50 timesteps, starting from those end states. Rinse and repeat till you get to the end of the timesteps, for that mini-batch of ~128 agents. By putting the identity of each agent as one of the features, you make it possible for the network to: learn from all of your data, thereby maximizing the utilization of your data, and learn the unique characteristics of each agent, so that it won't just average all of the agents together when you predict the future for a specific agent, make sure to use their corresponding agent id features, and the network will adjust the predictions accordingly. Edit: Alpo Jose wrote: ok, do I need to use one-hot encoding to make identity of agent? Ooo, that's true. There are 20,000 of them. That's kind of a lot. I think that what you might want to do is 'embed' them. Have a lookup layer, that takes in an agent id (expressed as an integer, an index), and outputs a high-dimensional vector, like something like a 50-300 length vector, probably a vector whose length approximately matches the hidden size of your LSTM. Mathematically, a lookup table, also called an 'embedding layer', is equivalent to making the agent ids into one-hot vectors, then passing through a linear (fully-connected) layer. However, the requirements in memory are much reduced for the embedding layer. In terms of what the embedding layer will learn, as you train it, the embedding layer will form some kind of latent representation of each agent. The latent representation won't likely be readable/interpretable in any way, but will allow the model to learn things like 'ok this agent, 1524, is relatively effective, but not on weekends; whereas 1526 is great every day; etc ....'. The latent dimensions of the embedding vector might actually mean stuff, but no-one ever tries to figure out what they mean (I think that would be hard/impossible). However, the high-dimensional per-agent embeddings allow the model to learn something about the behavior of each agent, and model this in the time-series predictions.
How to train LSTM model on multiple time series data?
Make the identity of the agent one of the features, and train on all data. Probably train on a mini-batch of eg 128 agents at a time: run through the time-series from start to finish for those 128 age
How to train LSTM model on multiple time series data? Make the identity of the agent one of the features, and train on all data. Probably train on a mini-batch of eg 128 agents at a time: run through the time-series from start to finish for those 128 agents, then select a new mini-batch of agents. For each mini-batch, run a slice of say 50 timesteps, then backprop. Keep the end states from that slice, and run the next 50 timesteps, starting from those end states. Rinse and repeat till you get to the end of the timesteps, for that mini-batch of ~128 agents. By putting the identity of each agent as one of the features, you make it possible for the network to: learn from all of your data, thereby maximizing the utilization of your data, and learn the unique characteristics of each agent, so that it won't just average all of the agents together when you predict the future for a specific agent, make sure to use their corresponding agent id features, and the network will adjust the predictions accordingly. Edit: Alpo Jose wrote: ok, do I need to use one-hot encoding to make identity of agent? Ooo, that's true. There are 20,000 of them. That's kind of a lot. I think that what you might want to do is 'embed' them. Have a lookup layer, that takes in an agent id (expressed as an integer, an index), and outputs a high-dimensional vector, like something like a 50-300 length vector, probably a vector whose length approximately matches the hidden size of your LSTM. Mathematically, a lookup table, also called an 'embedding layer', is equivalent to making the agent ids into one-hot vectors, then passing through a linear (fully-connected) layer. However, the requirements in memory are much reduced for the embedding layer. In terms of what the embedding layer will learn, as you train it, the embedding layer will form some kind of latent representation of each agent. The latent representation won't likely be readable/interpretable in any way, but will allow the model to learn things like 'ok this agent, 1524, is relatively effective, but not on weekends; whereas 1526 is great every day; etc ....'. The latent dimensions of the embedding vector might actually mean stuff, but no-one ever tries to figure out what they mean (I think that would be hard/impossible). However, the high-dimensional per-agent embeddings allow the model to learn something about the behavior of each agent, and model this in the time-series predictions.
How to train LSTM model on multiple time series data? Make the identity of the agent one of the features, and train on all data. Probably train on a mini-batch of eg 128 agents at a time: run through the time-series from start to finish for those 128 age
11,246
Notation of estimators (tilde vs. hat)
Hats and tildes The convention in (my end of) applied statistics is that $\hat{\beta}$ is an estimate of the true parameter value $\beta$ and that $\tilde{\beta}$ is another, possibly competing estimate. Following the Wolfram example, these can both be distinguished from a statistic (function of the data) that also happens to be an estimate, e.g. the sample mean $\bar{x}$ could be an estimate of the population mean $\mu$ so it it could also be called $\hat{\mu}$. Contra Wolfram, I'd call $\bar{X}$ the estimator (upper case roman letters denote random variables) and $\bar{x}$ the estimate (lower case roman letters denote observations of random variables), but only if I was feeling pedantic or it mattered to the argument. Similarly, in the 'Reference for Stats Symbols' the thing that suggests to me that $\tilde{u}$ is a random variable rather than a parameter is the fact that it's a roman letter not a greek one. Again, this is why in the example above the sample mean involved the letter $x$ when it was a function of the data but $\mu$ when it was considered as an estimator. (And frankly, it's unclear to me what the tilde denotes on $u$. The mean? the mode? the actual but unobserved value? The surrounding text would have to say.) Expectations Re the expectation operator: I've never seen curly brackets used. Maybe that's a mathematical statistics thing, in which case someone around here should recognize it. The empirical approach to notation One simple situation where estimators, random variables, and expectations collide in the notation is in the discussion of EM algorithms. You might want to look at a few careful expositions to get a sense of the normal range of notational variation. This is the empirical approach to notation, which always beats theory provided you are looking at variation from the right population, i.e. your discipline or expected audience. The bottom line Stay within the normal range described above, and anyway say what you mean by the symbols once in the text before using them. It doesn't take much space and your readers will thank you.
Notation of estimators (tilde vs. hat)
Hats and tildes The convention in (my end of) applied statistics is that $\hat{\beta}$ is an estimate of the true parameter value $\beta$ and that $\tilde{\beta}$ is another, possibly competing estima
Notation of estimators (tilde vs. hat) Hats and tildes The convention in (my end of) applied statistics is that $\hat{\beta}$ is an estimate of the true parameter value $\beta$ and that $\tilde{\beta}$ is another, possibly competing estimate. Following the Wolfram example, these can both be distinguished from a statistic (function of the data) that also happens to be an estimate, e.g. the sample mean $\bar{x}$ could be an estimate of the population mean $\mu$ so it it could also be called $\hat{\mu}$. Contra Wolfram, I'd call $\bar{X}$ the estimator (upper case roman letters denote random variables) and $\bar{x}$ the estimate (lower case roman letters denote observations of random variables), but only if I was feeling pedantic or it mattered to the argument. Similarly, in the 'Reference for Stats Symbols' the thing that suggests to me that $\tilde{u}$ is a random variable rather than a parameter is the fact that it's a roman letter not a greek one. Again, this is why in the example above the sample mean involved the letter $x$ when it was a function of the data but $\mu$ when it was considered as an estimator. (And frankly, it's unclear to me what the tilde denotes on $u$. The mean? the mode? the actual but unobserved value? The surrounding text would have to say.) Expectations Re the expectation operator: I've never seen curly brackets used. Maybe that's a mathematical statistics thing, in which case someone around here should recognize it. The empirical approach to notation One simple situation where estimators, random variables, and expectations collide in the notation is in the discussion of EM algorithms. You might want to look at a few careful expositions to get a sense of the normal range of notational variation. This is the empirical approach to notation, which always beats theory provided you are looking at variation from the right population, i.e. your discipline or expected audience. The bottom line Stay within the normal range described above, and anyway say what you mean by the symbols once in the text before using them. It doesn't take much space and your readers will thank you.
Notation of estimators (tilde vs. hat) Hats and tildes The convention in (my end of) applied statistics is that $\hat{\beta}$ is an estimate of the true parameter value $\beta$ and that $\tilde{\beta}$ is another, possibly competing estima
11,247
Data augmentation techniques for general datasets?
I understand this question as involving both feature construction and dealing with the wealth of features you already have + will construct, relative to your observations (N << P). Feature Construction Expanding upon @yasin.yazici's comment, some possible ways to augment the data would be: PCA Auto-encoding Transform's such as log, powers, etc. Binning continuous variables into discrete categories (i.e., continuous variable is 1 SD above mean, 1 below mean, etc.) Composite variables (for example, see here) I'm sure there are many more I'm missing. Feature Selection / Dimensionality reduction You may reduce dimensionality with techniques such as PCA (although perhaps not after augmenting your data with PCA variables). Alternatively, you may use algorithms that perform feature selection for you, such as lasso, random forest, etc.
Data augmentation techniques for general datasets?
I understand this question as involving both feature construction and dealing with the wealth of features you already have + will construct, relative to your observations (N << P). Feature Constructio
Data augmentation techniques for general datasets? I understand this question as involving both feature construction and dealing with the wealth of features you already have + will construct, relative to your observations (N << P). Feature Construction Expanding upon @yasin.yazici's comment, some possible ways to augment the data would be: PCA Auto-encoding Transform's such as log, powers, etc. Binning continuous variables into discrete categories (i.e., continuous variable is 1 SD above mean, 1 below mean, etc.) Composite variables (for example, see here) I'm sure there are many more I'm missing. Feature Selection / Dimensionality reduction You may reduce dimensionality with techniques such as PCA (although perhaps not after augmenting your data with PCA variables). Alternatively, you may use algorithms that perform feature selection for you, such as lasso, random forest, etc.
Data augmentation techniques for general datasets? I understand this question as involving both feature construction and dealing with the wealth of features you already have + will construct, relative to your observations (N << P). Feature Constructio
11,248
Data augmentation techniques for general datasets?
I faced a similar problem where in I wanted to augment unlabelled numeric data. I augmented data in the following way: (Say I have a data set of size 100*10.) Create a list by randomly sampling values from {0,1}, such that the number of zeros are less than the number of 1s,say the proportion of 0s is 20% in this case. So one will have a list of 0s and 1s of length 100. Use this list as a dependent variable and passed it into smote to generate more data points. (Here smote would generate points on the edges connecting the data points which correspond to 0s in the list generated). Repeat this process until data set of required size is obtained.
Data augmentation techniques for general datasets?
I faced a similar problem where in I wanted to augment unlabelled numeric data. I augmented data in the following way: (Say I have a data set of size 100*10.) Create a list by randomly sampling value
Data augmentation techniques for general datasets? I faced a similar problem where in I wanted to augment unlabelled numeric data. I augmented data in the following way: (Say I have a data set of size 100*10.) Create a list by randomly sampling values from {0,1}, such that the number of zeros are less than the number of 1s,say the proportion of 0s is 20% in this case. So one will have a list of 0s and 1s of length 100. Use this list as a dependent variable and passed it into smote to generate more data points. (Here smote would generate points on the edges connecting the data points which correspond to 0s in the list generated). Repeat this process until data set of required size is obtained.
Data augmentation techniques for general datasets? I faced a similar problem where in I wanted to augment unlabelled numeric data. I augmented data in the following way: (Say I have a data set of size 100*10.) Create a list by randomly sampling value
11,249
Testing significance of peaks in spectral density
You should be aware that estimating power spectra using a periodogram is not recommended, and in fact has been bad practice since ~ 1896. It is an inconsistent estimator for anything less than millions of data samples (and even then ...), and generally biased. The exact same thing applies to using standard estimates of autocorrelations (i.e. Bartlett), as they are Fourier transform pairs. Provided you are using a consistent estimator, there are some options available to you. The best of these is a multiple window (or taper) estimate of the power spectra. In this case, by using the coefficients of each window at a frequency of interest, you can compute a Harmonic F Statistic against a null hypothesis of white noise. This is an excellent tool for detection of line components in noise, and is highly recommended. It is the default choice in the signal-processing community for detection of periodicities in noise under assumption of stationarity. You can access both the multitaper method of spectrum estimation and the associated F-test via the multitaper package in R (available via CRAN). The documentation that comes with the package should be enough to get you going; the F-test is a simple option in the function call for spec.mtm. The original reference that defines both of these techniques and gives the algorithms for them is Spectrum Estimation and Harmonic Analysis, D.J. Thomson, Proceedings of the IEEE, vol. 70, pg. 1055-1096, 1982. Here is an example using the included data set with the multitaper package. require(multitaper); data(willamette); resSpec <- spec.mtm(willamette, k=10, nw=5.0, nFFT = "default", centreWithSlepians = TRUE, Ftest = TRUE, jackknife = FALSE, maxAdaptiveIterations = 100, plot = TRUE, na.action = na.fail) The parameters you should be aware of are k and nw: these are the number of windows (set to 10 above) and the time-bandwidth product (5.0 above). You can easily leave these at these quasi-default values for most applications. The centreWithSlepians command removes a robust estimate of the mean of the time series using a projection onto Slepian windows -- this is also recommended, as leaving the mean in produces a lot of power at the low frequencies. I would also recommend plotting the spectrum output from 'spec.mtm' on a log scale, as it cleans things up significantly. If you need more information, just post and I'm happy to provide it.
Testing significance of peaks in spectral density
You should be aware that estimating power spectra using a periodogram is not recommended, and in fact has been bad practice since ~ 1896. It is an inconsistent estimator for anything less than million
Testing significance of peaks in spectral density You should be aware that estimating power spectra using a periodogram is not recommended, and in fact has been bad practice since ~ 1896. It is an inconsistent estimator for anything less than millions of data samples (and even then ...), and generally biased. The exact same thing applies to using standard estimates of autocorrelations (i.e. Bartlett), as they are Fourier transform pairs. Provided you are using a consistent estimator, there are some options available to you. The best of these is a multiple window (or taper) estimate of the power spectra. In this case, by using the coefficients of each window at a frequency of interest, you can compute a Harmonic F Statistic against a null hypothesis of white noise. This is an excellent tool for detection of line components in noise, and is highly recommended. It is the default choice in the signal-processing community for detection of periodicities in noise under assumption of stationarity. You can access both the multitaper method of spectrum estimation and the associated F-test via the multitaper package in R (available via CRAN). The documentation that comes with the package should be enough to get you going; the F-test is a simple option in the function call for spec.mtm. The original reference that defines both of these techniques and gives the algorithms for them is Spectrum Estimation and Harmonic Analysis, D.J. Thomson, Proceedings of the IEEE, vol. 70, pg. 1055-1096, 1982. Here is an example using the included data set with the multitaper package. require(multitaper); data(willamette); resSpec <- spec.mtm(willamette, k=10, nw=5.0, nFFT = "default", centreWithSlepians = TRUE, Ftest = TRUE, jackknife = FALSE, maxAdaptiveIterations = 100, plot = TRUE, na.action = na.fail) The parameters you should be aware of are k and nw: these are the number of windows (set to 10 above) and the time-bandwidth product (5.0 above). You can easily leave these at these quasi-default values for most applications. The centreWithSlepians command removes a robust estimate of the mean of the time series using a projection onto Slepian windows -- this is also recommended, as leaving the mean in produces a lot of power at the low frequencies. I would also recommend plotting the spectrum output from 'spec.mtm' on a log scale, as it cleans things up significantly. If you need more information, just post and I'm happy to provide it.
Testing significance of peaks in spectral density You should be aware that estimating power spectra using a periodogram is not recommended, and in fact has been bad practice since ~ 1896. It is an inconsistent estimator for anything less than million
11,250
Testing significance of peaks in spectral density
Ronald Fisher proposed an exact test of the maximum periodogram coordinate in R.A. Fisher, Proc. R. Soc A (1929) 125:54. The test is based on the g-statistic. Specifically, the null hypothesis of Gaussian white noise is rejected if g is significantly large, that is, if one of the values ​​of $f(\omega_k)$ is significantly higher than the average of all signals. You can get more details about the test in MB Priestley, Spectral Analysis and Time Series, Academic Press, London, 1981, page 406. In R, the package GeneCycle contains the function fisher.g.test(): library(GeneCycle) ?fisher.g.test Hope this helps.
Testing significance of peaks in spectral density
Ronald Fisher proposed an exact test of the maximum periodogram coordinate in R.A. Fisher, Proc. R. Soc A (1929) 125:54. The test is based on the g-statistic. Specifically, the null hypothesis of Gaus
Testing significance of peaks in spectral density Ronald Fisher proposed an exact test of the maximum periodogram coordinate in R.A. Fisher, Proc. R. Soc A (1929) 125:54. The test is based on the g-statistic. Specifically, the null hypothesis of Gaussian white noise is rejected if g is significantly large, that is, if one of the values ​​of $f(\omega_k)$ is significantly higher than the average of all signals. You can get more details about the test in MB Priestley, Spectral Analysis and Time Series, Academic Press, London, 1981, page 406. In R, the package GeneCycle contains the function fisher.g.test(): library(GeneCycle) ?fisher.g.test Hope this helps.
Testing significance of peaks in spectral density Ronald Fisher proposed an exact test of the maximum periodogram coordinate in R.A. Fisher, Proc. R. Soc A (1929) 125:54. The test is based on the g-statistic. Specifically, the null hypothesis of Gaus
11,251
Testing significance of peaks in spectral density
We have tried an attempt to address this issue by a wavelet transform of a spectral-based test recently in this paper. Essentially, you need to consider the periodogram ordinates distribution, similarly to the article of Fisher, mentioned in the earlier answers. Another paper from Koen is this. We have recently published an R package hwwntest.
Testing significance of peaks in spectral density
We have tried an attempt to address this issue by a wavelet transform of a spectral-based test recently in this paper. Essentially, you need to consider the periodogram ordinates distribution, similar
Testing significance of peaks in spectral density We have tried an attempt to address this issue by a wavelet transform of a spectral-based test recently in this paper. Essentially, you need to consider the periodogram ordinates distribution, similarly to the article of Fisher, mentioned in the earlier answers. Another paper from Koen is this. We have recently published an R package hwwntest.
Testing significance of peaks in spectral density We have tried an attempt to address this issue by a wavelet transform of a spectral-based test recently in this paper. Essentially, you need to consider the periodogram ordinates distribution, similar
11,252
Testing significance of peaks in spectral density
Use the spectrum.test function in the ts.extend package You can conduct a "permutation spectrum test" on your data using the ts.extend package. This is a permutation-based variant of the classic Fisher test that looks at the maximum spectral intensity of the data and compares it to its null distribution under the null hypothesis of exchangeability. (The advantage of this test over the Fisher test is that it does not assume normal error terms in the data; i.e., it works for any underlying distribuiton.) Here is an example where we generate data with a periodic signal and then test for the presence of the signal. The test output and resulting plot easily detects the signal. #Load the package library(ts.extend) #Generate mock data set.seed(1) m <- 100 SIGNAL <- 0.8*sin(0.3*(1:m)) NOISE <- rnorm(m) SERIES <- SIGNAL + NOISE #Conduct permutation-spectrum test TEST <- spectrum.test(SERIES) TEST Permutation-Spectrum Test data: real time-series vector SERIES with 100 values maximum scaled intensity = 3.6428, p-value = 0.000208 alternative hypothesis: distribution of time-series vector is not exchangeable (at least one periodic signal is present) #Plot the test results plot(TEST)
Testing significance of peaks in spectral density
Use the spectrum.test function in the ts.extend package You can conduct a "permutation spectrum test" on your data using the ts.extend package. This is a permutation-based variant of the classic Fish
Testing significance of peaks in spectral density Use the spectrum.test function in the ts.extend package You can conduct a "permutation spectrum test" on your data using the ts.extend package. This is a permutation-based variant of the classic Fisher test that looks at the maximum spectral intensity of the data and compares it to its null distribution under the null hypothesis of exchangeability. (The advantage of this test over the Fisher test is that it does not assume normal error terms in the data; i.e., it works for any underlying distribuiton.) Here is an example where we generate data with a periodic signal and then test for the presence of the signal. The test output and resulting plot easily detects the signal. #Load the package library(ts.extend) #Generate mock data set.seed(1) m <- 100 SIGNAL <- 0.8*sin(0.3*(1:m)) NOISE <- rnorm(m) SERIES <- SIGNAL + NOISE #Conduct permutation-spectrum test TEST <- spectrum.test(SERIES) TEST Permutation-Spectrum Test data: real time-series vector SERIES with 100 values maximum scaled intensity = 3.6428, p-value = 0.000208 alternative hypothesis: distribution of time-series vector is not exchangeable (at least one periodic signal is present) #Plot the test results plot(TEST)
Testing significance of peaks in spectral density Use the spectrum.test function in the ts.extend package You can conduct a "permutation spectrum test" on your data using the ts.extend package. This is a permutation-based variant of the classic Fish
11,253
Autoencoders can't learn meaningful features
Debugging neural networks usually involves tweaking hyperparameters, visualizing the learned filters, and plotting important metrics. Could you share what hyperparameters you've been using? What's your batch size? What's your learning rate? What type of autoencoder are you're using? Have you tried using a Denoising Autoencoder? (What corruption values have you tried?) How many hidden layers and of what size? What are the dimensions of your input images? Analyzing the training logs is also useful. Plot a graph of your reconstruction loss (Y-axis) as a function of epoch (X-axis). Is your reconstruction loss converging or diverging? Here's an example of an autoencoder for human gender classification that was diverging, was stopped after 1500 epochs, had hyperparameters tuned (in this case a reduction in the learning rate), and restarted with the same weights that were diverging and eventually converged. Here's one that's converging: (we want this) Vanilla "unconstrained"can run into a problem where they simply learn the identity mapping. That's one of the reasons why the community has created the Denoising, Sparse, and Contractive flavors. Could you post a small subset of your data here? I'd be more than willing to show you the results from one of my autoencoders. On a side note: you may want to ask yourself why you're using images of graphs in the first place when those graphs could easily be represented as a vector of data. I.e., [0, 13, 15, 11, 2, 9, 6, 5] If you're able to reformulate the problem like above, you're essentially making the life of your auto-encoder easier. It doesn't first need to learn how to see images before it can try to learn the generating distribution. Follow up answer (given the data.) Here are the filters from a 1000 hidden unit, single layer Denoising Autoencoder. Note that some of the filters are seemingly random. That's because I stopped training so early and the network didn't have time to learn those filters. Here are the hyperparameters that I trained it with: batch_size = 4 epochs = 100 pretrain_learning_rate = 0.01 finetune_learning_rate = 0.01 corruption_level = 0.2 I stopped pre-training after the 58th epoch because the filters were sufficiently good to post here. If I were you, I would train a full 3-layer Stacked Denoising Autoencoder with a 1000x1000x1000 architecture to start off. Here are the results from the fine-tuning step: validation error 24.15 percent test error 24.15 percent So at first look, it seems better than chance, however, when we look at the data breakdown between the two labels we see that it has the exact same percent (75.85% profitable and 24.15% unprofitable). So that means the network has learned to simply respond "profitable", regardless of the signal. I would probably train this for a longer time with a larger net to see what happens. Also, it looks like this data is generated from some kind of underlying financial dataset. I would recommend that you look into Recurrent Neural Networks after reformulating your problem into the vectors as described above. RNNs can help capture some of the temporal dependencies that is found in timeseries data like this. Hope this helps.
Autoencoders can't learn meaningful features
Debugging neural networks usually involves tweaking hyperparameters, visualizing the learned filters, and plotting important metrics. Could you share what hyperparameters you've been using? What's yo
Autoencoders can't learn meaningful features Debugging neural networks usually involves tweaking hyperparameters, visualizing the learned filters, and plotting important metrics. Could you share what hyperparameters you've been using? What's your batch size? What's your learning rate? What type of autoencoder are you're using? Have you tried using a Denoising Autoencoder? (What corruption values have you tried?) How many hidden layers and of what size? What are the dimensions of your input images? Analyzing the training logs is also useful. Plot a graph of your reconstruction loss (Y-axis) as a function of epoch (X-axis). Is your reconstruction loss converging or diverging? Here's an example of an autoencoder for human gender classification that was diverging, was stopped after 1500 epochs, had hyperparameters tuned (in this case a reduction in the learning rate), and restarted with the same weights that were diverging and eventually converged. Here's one that's converging: (we want this) Vanilla "unconstrained"can run into a problem where they simply learn the identity mapping. That's one of the reasons why the community has created the Denoising, Sparse, and Contractive flavors. Could you post a small subset of your data here? I'd be more than willing to show you the results from one of my autoencoders. On a side note: you may want to ask yourself why you're using images of graphs in the first place when those graphs could easily be represented as a vector of data. I.e., [0, 13, 15, 11, 2, 9, 6, 5] If you're able to reformulate the problem like above, you're essentially making the life of your auto-encoder easier. It doesn't first need to learn how to see images before it can try to learn the generating distribution. Follow up answer (given the data.) Here are the filters from a 1000 hidden unit, single layer Denoising Autoencoder. Note that some of the filters are seemingly random. That's because I stopped training so early and the network didn't have time to learn those filters. Here are the hyperparameters that I trained it with: batch_size = 4 epochs = 100 pretrain_learning_rate = 0.01 finetune_learning_rate = 0.01 corruption_level = 0.2 I stopped pre-training after the 58th epoch because the filters were sufficiently good to post here. If I were you, I would train a full 3-layer Stacked Denoising Autoencoder with a 1000x1000x1000 architecture to start off. Here are the results from the fine-tuning step: validation error 24.15 percent test error 24.15 percent So at first look, it seems better than chance, however, when we look at the data breakdown between the two labels we see that it has the exact same percent (75.85% profitable and 24.15% unprofitable). So that means the network has learned to simply respond "profitable", regardless of the signal. I would probably train this for a longer time with a larger net to see what happens. Also, it looks like this data is generated from some kind of underlying financial dataset. I would recommend that you look into Recurrent Neural Networks after reformulating your problem into the vectors as described above. RNNs can help capture some of the temporal dependencies that is found in timeseries data like this. Hope this helps.
Autoencoders can't learn meaningful features Debugging neural networks usually involves tweaking hyperparameters, visualizing the learned filters, and plotting important metrics. Could you share what hyperparameters you've been using? What's yo
11,254
Autoencoders can't learn meaningful features
I don't have enough rep to comment, so I will put this into in answer. I don't know exact reason, however: The pattern in bottom left region looks similar to your second example, and pattern in right bottom corner seems very like to your first example, when inspected closely. The question is, how much variety is in your source data? If all 50 000 images are variations of same pattern, these 3 meaningful feature maps we see can be quite enough for autoencoder to explain and reconstruct all your data. Second, you might want to look at reconstruction error and actual reconstructed images. How good results are? If reconstruction error is low, you have might have an overfit, perhaps due to resons described below (or maybe combination of these 3 patterns is just enough to describe all data in interested in). Otherwise, autoencoder just can't learn how to reconstruct your data and you need larger autoencoder or better training algorithm.
Autoencoders can't learn meaningful features
I don't have enough rep to comment, so I will put this into in answer. I don't know exact reason, however: The pattern in bottom left region looks similar to your second example, and pattern in right
Autoencoders can't learn meaningful features I don't have enough rep to comment, so I will put this into in answer. I don't know exact reason, however: The pattern in bottom left region looks similar to your second example, and pattern in right bottom corner seems very like to your first example, when inspected closely. The question is, how much variety is in your source data? If all 50 000 images are variations of same pattern, these 3 meaningful feature maps we see can be quite enough for autoencoder to explain and reconstruct all your data. Second, you might want to look at reconstruction error and actual reconstructed images. How good results are? If reconstruction error is low, you have might have an overfit, perhaps due to resons described below (or maybe combination of these 3 patterns is just enough to describe all data in interested in). Otherwise, autoencoder just can't learn how to reconstruct your data and you need larger autoencoder or better training algorithm.
Autoencoders can't learn meaningful features I don't have enough rep to comment, so I will put this into in answer. I don't know exact reason, however: The pattern in bottom left region looks similar to your second example, and pattern in right
11,255
Rules for selecting convolutional neural network hyperparameters
To some degree yes, a recent paper came out by Google researchers on how to choose good Inception architectures. Inception nets achieve very high performance on a constrained parameter budget, so this is as good of a place to start as any, and it's recent. Here's the link: Rethinking the Inception Architecture for Computer Vision. They do not offer any hard quantitative rules but rather guidelines that they used and believe have helped them achieve good performance in the recent ImageNet competitions. For example, some of the principles they discuss are: Use stacks of smaller receptive field convolutional layers instead of using a single large receptive field convolutional layers, i.e. 2 stacks of 3x3 conv layers vs a single 7x7 conv layer. This idea isn't new, it was also discussed in Return of the Devil in the Details: Delving Deep into Convolutional Networks by the Oxford VGG team. This is motivated by the need to be parameter efficient. It also has the dual effect of more representational capacity as we introduce more nonlinearity with more layers. Something that I haven't seen in the literature that this article mentioned is factorizing convolutional layers into deep layers. So instead of having a single 7x7 conv layer, we would have a 1x7 conv layer and then a 7x1 conv layer. Adds more depth, I believe it also parameter efficient as well. Balance the depth and width of your net. Use high dimensional representations. This is one of the principles behind their Inception modules, which concatenate multiple convolutinal layers together. So even if you have a small spatial size in your conv net, using Inception modules we can use a high dimensional representation via multi-scale convolutional concatenation: 1x1, 3x3, 3x3-3x3, max pool all put together. These Inception modules have a "width" since they can be interpreted as performing multiple operations in parallel. They go even further with new Inception modules which have factorized convolutional sizes, 1x3, 3x1, etc. Use 1x1 conv layers (Network in Network style) to reduce dimensionality. They use a lot of dimensionality reduction techniques to achieve parameter efficiency. They believe that this is effective because adjacent feature maps have highly correlated outputs. Which makes sense as natural images are known to exhibit some local statistical properties consistent with this. So reducing dimensionality via 1x1 NIN layers does not have a disastrous effect on representational power. There's more in the article. I think it's an article that can offer some insight as to what you are asking about. They are talking about some very core concepts of conv net architectural design.
Rules for selecting convolutional neural network hyperparameters
To some degree yes, a recent paper came out by Google researchers on how to choose good Inception architectures. Inception nets achieve very high performance on a constrained parameter budget, so this
Rules for selecting convolutional neural network hyperparameters To some degree yes, a recent paper came out by Google researchers on how to choose good Inception architectures. Inception nets achieve very high performance on a constrained parameter budget, so this is as good of a place to start as any, and it's recent. Here's the link: Rethinking the Inception Architecture for Computer Vision. They do not offer any hard quantitative rules but rather guidelines that they used and believe have helped them achieve good performance in the recent ImageNet competitions. For example, some of the principles they discuss are: Use stacks of smaller receptive field convolutional layers instead of using a single large receptive field convolutional layers, i.e. 2 stacks of 3x3 conv layers vs a single 7x7 conv layer. This idea isn't new, it was also discussed in Return of the Devil in the Details: Delving Deep into Convolutional Networks by the Oxford VGG team. This is motivated by the need to be parameter efficient. It also has the dual effect of more representational capacity as we introduce more nonlinearity with more layers. Something that I haven't seen in the literature that this article mentioned is factorizing convolutional layers into deep layers. So instead of having a single 7x7 conv layer, we would have a 1x7 conv layer and then a 7x1 conv layer. Adds more depth, I believe it also parameter efficient as well. Balance the depth and width of your net. Use high dimensional representations. This is one of the principles behind their Inception modules, which concatenate multiple convolutinal layers together. So even if you have a small spatial size in your conv net, using Inception modules we can use a high dimensional representation via multi-scale convolutional concatenation: 1x1, 3x3, 3x3-3x3, max pool all put together. These Inception modules have a "width" since they can be interpreted as performing multiple operations in parallel. They go even further with new Inception modules which have factorized convolutional sizes, 1x3, 3x1, etc. Use 1x1 conv layers (Network in Network style) to reduce dimensionality. They use a lot of dimensionality reduction techniques to achieve parameter efficiency. They believe that this is effective because adjacent feature maps have highly correlated outputs. Which makes sense as natural images are known to exhibit some local statistical properties consistent with this. So reducing dimensionality via 1x1 NIN layers does not have a disastrous effect on representational power. There's more in the article. I think it's an article that can offer some insight as to what you are asking about. They are talking about some very core concepts of conv net architectural design.
Rules for selecting convolutional neural network hyperparameters To some degree yes, a recent paper came out by Google researchers on how to choose good Inception architectures. Inception nets achieve very high performance on a constrained parameter budget, so this
11,256
Rules for selecting convolutional neural network hyperparameters
I haven't come across any literature on choosing these hyper-parameters as a function of the problem specifications. But, it's my understanding that most are adopting Bayesian optimization methods to zero in on effective values. You specify a reasonable range, and by testing various combinations, you learn a model of how those hyper-parameters relate to the model's accuracy. It's worked well for me. Check out "Practical Bayesian Optimization of Machine Learning Algorithms" from Snoek, Larochelle, and Adams (http://papers.nips.cc/paper/4522-practical-bayesian-optimization-of-machine-learning-algorithms.pdf).
Rules for selecting convolutional neural network hyperparameters
I haven't come across any literature on choosing these hyper-parameters as a function of the problem specifications. But, it's my understanding that most are adopting Bayesian optimization methods to
Rules for selecting convolutional neural network hyperparameters I haven't come across any literature on choosing these hyper-parameters as a function of the problem specifications. But, it's my understanding that most are adopting Bayesian optimization methods to zero in on effective values. You specify a reasonable range, and by testing various combinations, you learn a model of how those hyper-parameters relate to the model's accuracy. It's worked well for me. Check out "Practical Bayesian Optimization of Machine Learning Algorithms" from Snoek, Larochelle, and Adams (http://papers.nips.cc/paper/4522-practical-bayesian-optimization-of-machine-learning-algorithms.pdf).
Rules for selecting convolutional neural network hyperparameters I haven't come across any literature on choosing these hyper-parameters as a function of the problem specifications. But, it's my understanding that most are adopting Bayesian optimization methods to
11,257
Is R viable for production (deployed) code
Yes it is. Look for example at this page for the wonderful headless RServe R server instance (by R Core member Simon Urbanek) which lists these deployments: Some projects using Rserve: The Dataverse Network Project Phenyx "J" interface Nexus BPM Taverna Bio7 INTAMAP Screensaver HTS LIMS CRISP WWARN with links at the page referenced above. "Industry" tends to be more cagey about details than academia, so you will be hardpressed to find "official" statements. But vendors like Revolution Analytics or Oracle ship R and their salesmen may have stories for you....
Is R viable for production (deployed) code
Yes it is. Look for example at this page for the wonderful headless RServe R server instance (by R Core member Simon Urbanek) which lists these deployments: Some projects using Rserve: The Dataver
Is R viable for production (deployed) code Yes it is. Look for example at this page for the wonderful headless RServe R server instance (by R Core member Simon Urbanek) which lists these deployments: Some projects using Rserve: The Dataverse Network Project Phenyx "J" interface Nexus BPM Taverna Bio7 INTAMAP Screensaver HTS LIMS CRISP WWARN with links at the page referenced above. "Industry" tends to be more cagey about details than academia, so you will be hardpressed to find "official" statements. But vendors like Revolution Analytics or Oracle ship R and their salesmen may have stories for you....
Is R viable for production (deployed) code Yes it is. Look for example at this page for the wonderful headless RServe R server instance (by R Core member Simon Urbanek) which lists these deployments: Some projects using Rserve: The Dataver
11,258
Is R viable for production (deployed) code
Typically not as R is an interpreted language, which on average is many times slower than equivalent compiled code. While converting your program to C, Fortran, or Java takes a significant investment, the code can literally run 10-100X faster than an equivalent R version. Additionally, R has very limited tools to manipulate large datasets, especially ones that require clusters to process or require special hardware. Moreover, most commercial implementations need to provide user interfaces and fit into existing frameworks, which are typically written in other languages. While you could interface with existing R code from most compiled languages (there are wrappers out there), you would find that your core numerical routines would still not be any faster than the original R code. At the end of the day, R (like Matlab) is used mostly for prototyping and/or trying out ideas using existing implementations.
Is R viable for production (deployed) code
Typically not as R is an interpreted language, which on average is many times slower than equivalent compiled code. While converting your program to C, Fortran, or Java takes a significant investment
Is R viable for production (deployed) code Typically not as R is an interpreted language, which on average is many times slower than equivalent compiled code. While converting your program to C, Fortran, or Java takes a significant investment, the code can literally run 10-100X faster than an equivalent R version. Additionally, R has very limited tools to manipulate large datasets, especially ones that require clusters to process or require special hardware. Moreover, most commercial implementations need to provide user interfaces and fit into existing frameworks, which are typically written in other languages. While you could interface with existing R code from most compiled languages (there are wrappers out there), you would find that your core numerical routines would still not be any faster than the original R code. At the end of the day, R (like Matlab) is used mostly for prototyping and/or trying out ideas using existing implementations.
Is R viable for production (deployed) code Typically not as R is an interpreted language, which on average is many times slower than equivalent compiled code. While converting your program to C, Fortran, or Java takes a significant investment
11,259
Is R viable for production (deployed) code
I believe (but this is based on anecdote) that R tends to be used more as a prototyping language by the companies you name above. R excels in the task of developing and testing multiple models quickly and effectively. However, it is not a good fit for personalisation tasks as these often need to take place as a user interacts with a particular website and I believe (again, this is mostly anecdote) that such models tend to be re-written in a compiled language (Java, C, C++). That being said, good question and I would love to be proved wrong on this.
Is R viable for production (deployed) code
I believe (but this is based on anecdote) that R tends to be used more as a prototyping language by the companies you name above. R excels in the task of developing and testing multiple models quickly
Is R viable for production (deployed) code I believe (but this is based on anecdote) that R tends to be used more as a prototyping language by the companies you name above. R excels in the task of developing and testing multiple models quickly and effectively. However, it is not a good fit for personalisation tasks as these often need to take place as a user interacts with a particular website and I believe (again, this is mostly anecdote) that such models tend to be re-written in a compiled language (Java, C, C++). That being said, good question and I would love to be proved wrong on this.
Is R viable for production (deployed) code I believe (but this is based on anecdote) that R tends to be used more as a prototyping language by the companies you name above. R excels in the task of developing and testing multiple models quickly
11,260
Structural Equation Models (SEMs) versus Bayesian Networks (BNs)
As far as I can tell, Bayesian Networks do not claim to be able to estimate causal effects in non-directed acyclic graphs, whereas SEM does. That's a generalization in favor of SEM... if you believe it. An example of this might be measuring cognitive decline among people where cognition is a latent effect estimated using a survey instrument like 3MSE, but some people may display decreased cognition as a function of pain meds usage. Their pain meds may have been a consequence of injuring themselves due to cognitive decline (falling for example). And so, in a cross sectional analysis, you would see a graph that has a circular shape. SEM analysts like to tackle problems like that. I steer clear. In the Bayes network world, you have very general methods of assessing conditional independence/dependence of nodes. One can use a fully parametric approach with any number of distributions, or go about the Bayesian nonparametric approaches I've heard about. SEM estimated using ML are (usually) assumed to be normal, which means that conditional independence is equivalent to having zero covariance for 2 nodes in the graph. I personally believe that's a rather strong assumption and would have very little robustness to model misspecification.
Structural Equation Models (SEMs) versus Bayesian Networks (BNs)
As far as I can tell, Bayesian Networks do not claim to be able to estimate causal effects in non-directed acyclic graphs, whereas SEM does. That's a generalization in favor of SEM... if you believe i
Structural Equation Models (SEMs) versus Bayesian Networks (BNs) As far as I can tell, Bayesian Networks do not claim to be able to estimate causal effects in non-directed acyclic graphs, whereas SEM does. That's a generalization in favor of SEM... if you believe it. An example of this might be measuring cognitive decline among people where cognition is a latent effect estimated using a survey instrument like 3MSE, but some people may display decreased cognition as a function of pain meds usage. Their pain meds may have been a consequence of injuring themselves due to cognitive decline (falling for example). And so, in a cross sectional analysis, you would see a graph that has a circular shape. SEM analysts like to tackle problems like that. I steer clear. In the Bayes network world, you have very general methods of assessing conditional independence/dependence of nodes. One can use a fully parametric approach with any number of distributions, or go about the Bayesian nonparametric approaches I've heard about. SEM estimated using ML are (usually) assumed to be normal, which means that conditional independence is equivalent to having zero covariance for 2 nodes in the graph. I personally believe that's a rather strong assumption and would have very little robustness to model misspecification.
Structural Equation Models (SEMs) versus Bayesian Networks (BNs) As far as I can tell, Bayesian Networks do not claim to be able to estimate causal effects in non-directed acyclic graphs, whereas SEM does. That's a generalization in favor of SEM... if you believe i
11,261
Structural Equation Models (SEMs) versus Bayesian Networks (BNs)
I don't really understand this, but see here: Structural equation models and Bayesian networks appear so intimately connected that it could be easy to forget the differences. The structural equation model is an algebraic object. As long as the causal graph remains acyclic, algebraic manipulations are interpreted as interventions on the causal system. The Bayesian network is a generative statistical model representing a class of joint probability distributions, and, as such, does not support algebraic manipulations. However, the symbolic representation of its Markov factorization is an algebraic object, essentially equivalent to the structural equation model.
Structural Equation Models (SEMs) versus Bayesian Networks (BNs)
I don't really understand this, but see here: Structural equation models and Bayesian networks appear so intimately connected that it could be easy to forget the differences. The structural equat
Structural Equation Models (SEMs) versus Bayesian Networks (BNs) I don't really understand this, but see here: Structural equation models and Bayesian networks appear so intimately connected that it could be easy to forget the differences. The structural equation model is an algebraic object. As long as the causal graph remains acyclic, algebraic manipulations are interpreted as interventions on the causal system. The Bayesian network is a generative statistical model representing a class of joint probability distributions, and, as such, does not support algebraic manipulations. However, the symbolic representation of its Markov factorization is an algebraic object, essentially equivalent to the structural equation model.
Structural Equation Models (SEMs) versus Bayesian Networks (BNs) I don't really understand this, but see here: Structural equation models and Bayesian networks appear so intimately connected that it could be easy to forget the differences. The structural equat
11,262
How to decompose a time series with multiple seasonal components?
R's forecast package bats() and tbats() functions can fit BATS and TBATS models to the data. The functions return lists with a class attribute either "bats" or "tbats". One of the elements on this list is a time series of state vectors, $x(t)$, for each time, $t$. See http://robjhyndman.com/papers/complex-seasonality/ for the formula's and Hyndman et al (2008) for a better description of ETS models. BATS and TBATS are an extension of ETS. For example: fit <- bats(myTimeseries) fit$x In this case, each row of x will be on fourier-like harmonic. There are also plot.tbats() and plot.bats() functions to automatically decompose and view the components.
How to decompose a time series with multiple seasonal components?
R's forecast package bats() and tbats() functions can fit BATS and TBATS models to the data. The functions return lists with a class attribute either "bats" or "tbats". One of the elements on this lis
How to decompose a time series with multiple seasonal components? R's forecast package bats() and tbats() functions can fit BATS and TBATS models to the data. The functions return lists with a class attribute either "bats" or "tbats". One of the elements on this list is a time series of state vectors, $x(t)$, for each time, $t$. See http://robjhyndman.com/papers/complex-seasonality/ for the formula's and Hyndman et al (2008) for a better description of ETS models. BATS and TBATS are an extension of ETS. For example: fit <- bats(myTimeseries) fit$x In this case, each row of x will be on fourier-like harmonic. There are also plot.tbats() and plot.bats() functions to automatically decompose and view the components.
How to decompose a time series with multiple seasonal components? R's forecast package bats() and tbats() functions can fit BATS and TBATS models to the data. The functions return lists with a class attribute either "bats" or "tbats". One of the elements on this lis
11,263
How to decompose a time series with multiple seasonal components?
R's forecast package now has a function mstl() to handle multiple seasonal time series decomposition. This page has got more details how to use it: https://pkg.robjhyndman.com/forecast/reference/mstl.html
How to decompose a time series with multiple seasonal components?
R's forecast package now has a function mstl() to handle multiple seasonal time series decomposition. This page has got more details how to use it: https://pkg.robjhyndman.com/forecast/reference/mstl.
How to decompose a time series with multiple seasonal components? R's forecast package now has a function mstl() to handle multiple seasonal time series decomposition. This page has got more details how to use it: https://pkg.robjhyndman.com/forecast/reference/mstl.html
How to decompose a time series with multiple seasonal components? R's forecast package now has a function mstl() to handle multiple seasonal time series decomposition. This page has got more details how to use it: https://pkg.robjhyndman.com/forecast/reference/mstl.
11,264
How to decompose a time series with multiple seasonal components?
The facebook prophet package supports multiple seasonalities. Yearly, weekly and daily seasonalities are built-in but custom seasonalities can be specified. Here is a custom monthly seasonality: df <- ... # data to build model on or decompose future <- ... # data to make forecasts on m <- prophet(weekly.seasonality = FALSE) m <- add_seasonality(m, name = 'monthly', period = 30.5, fourier.order = 5) m <- fit.prophet(m, df) forecast <- predict(m, future) prophet_plot_components(m, forecast) If predict() is called without passing in a data frame, then it will decompose the time series used to build the model.
How to decompose a time series with multiple seasonal components?
The facebook prophet package supports multiple seasonalities. Yearly, weekly and daily seasonalities are built-in but custom seasonalities can be specified. Here is a custom monthly seasonality: df <-
How to decompose a time series with multiple seasonal components? The facebook prophet package supports multiple seasonalities. Yearly, weekly and daily seasonalities are built-in but custom seasonalities can be specified. Here is a custom monthly seasonality: df <- ... # data to build model on or decompose future <- ... # data to make forecasts on m <- prophet(weekly.seasonality = FALSE) m <- add_seasonality(m, name = 'monthly', period = 30.5, fourier.order = 5) m <- fit.prophet(m, df) forecast <- predict(m, future) prophet_plot_components(m, forecast) If predict() is called without passing in a data frame, then it will decompose the time series used to build the model.
How to decompose a time series with multiple seasonal components? The facebook prophet package supports multiple seasonalities. Yearly, weekly and daily seasonalities are built-in but custom seasonalities can be specified. Here is a custom monthly seasonality: df <-
11,265
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis?
Percentage agreement (with tolerance = 0): 0.0143 Percentage agreement (with tolerance = 1): 11.8 Krippendorff's alpha: 0.1529467 These agreement measures state that there is virtually no categorial agreement - each coder has his or her own internal cutoff point for judging comments as "friendly" or "unfriendly". If we assume that the three categories are ordered, i.e.: Unfriendly < Neutral < Friendly, we can also calculate the intraclass correlation as another measure of agreement. On a random sample of 1000 comments, there is an ICC (2,1) of .28, and an ICC (2, k) of .88. That means, if you would only take one of the 20 raters, results would be very unreliable (.28), if you take the average of 20 raters, results are reliable (.88). Taking different combinations of three random raters, the averaged reliability is between .50 and .60, which still would be judged to be too low. The average bivariate correlation between two coders is .34, which also is rather low. If these agreement measures are seen as a quality measure of the coders (who actually should show good agreement), the answer is: they are not good coders and should be better trained. If this is seen as a measure of "how good is spontaneous agreement amongst random persons", the answer also is: not very high. As a benchmark, the average correlation for physical attractiveness ratings is around .47 - .71 [1] [1] Langlois, J. H., Kalakanis, L., Rubenstein, A. J., Larson, A., Hallam, M., & Smoot, M. (2000). Maxims or myths of beauty? A meta-analytic and theoretical review. Psychological Bulletin, 126, 390–423. doi:10.1037/0033-2909.126.3.390
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis?
Percentage agreement (with tolerance = 0): 0.0143 Percentage agreement (with tolerance = 1): 11.8 Krippendorff's alpha: 0.1529467 These agreement measures state that there is virtually no categorial
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis? Percentage agreement (with tolerance = 0): 0.0143 Percentage agreement (with tolerance = 1): 11.8 Krippendorff's alpha: 0.1529467 These agreement measures state that there is virtually no categorial agreement - each coder has his or her own internal cutoff point for judging comments as "friendly" or "unfriendly". If we assume that the three categories are ordered, i.e.: Unfriendly < Neutral < Friendly, we can also calculate the intraclass correlation as another measure of agreement. On a random sample of 1000 comments, there is an ICC (2,1) of .28, and an ICC (2, k) of .88. That means, if you would only take one of the 20 raters, results would be very unreliable (.28), if you take the average of 20 raters, results are reliable (.88). Taking different combinations of three random raters, the averaged reliability is between .50 and .60, which still would be judged to be too low. The average bivariate correlation between two coders is .34, which also is rather low. If these agreement measures are seen as a quality measure of the coders (who actually should show good agreement), the answer is: they are not good coders and should be better trained. If this is seen as a measure of "how good is spontaneous agreement amongst random persons", the answer also is: not very high. As a benchmark, the average correlation for physical attractiveness ratings is around .47 - .71 [1] [1] Langlois, J. H., Kalakanis, L., Rubenstein, A. J., Larson, A., Hallam, M., & Smoot, M. (2000). Maxims or myths of beauty? A meta-analytic and theoretical review. Psychological Bulletin, 126, 390–423. doi:10.1037/0033-2909.126.3.390
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis? Percentage agreement (with tolerance = 0): 0.0143 Percentage agreement (with tolerance = 1): 11.8 Krippendorff's alpha: 0.1529467 These agreement measures state that there is virtually no categorial
11,266
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis?
Reliability of scores is frequently interpreted in terms of Classical Test Theory. Here one has a true score, X, but what you observe at any particular outcome is not only the true score, but the true score with some error (i.e. Observed = X + error). In theory, by taking multiple observed measures of the same underlying test (making some assumptions about the distribution of the errors of those tests) one can then measure the unobserved true score. Note here in this framework that you have to assume that your multiple observed measures are measuring the same underlying test. Poor reliability of test items is then frequently taken as evidence that the observed measures are not measuring the same underlying test. This is just a convention of the field though, poor reliability, in and of itself, does not prove (in any statistical sense) the items are not measuring the same construct. So it could be argued that by taking many observed measures, even with very unreliable tests, one could come about a reliable measure of the true score. It also stands to be mentioned that classical test theory isn't necessarily the only way to interpret such tests, and many scholors would argue that the concept of latent variables and item-response theory is always more appropriate than classical test theory. Also a similar implicit assumption in classical test theory is when people say reliabilities are too high. It doesn't say anything about the validity of whether particular item(s) measure some underlying test, but that when reliabilities are too high researchers take it as evidence that errors between the tests are not independent. I'm not quite sure why you are so vehement about not going in and calculating the reliabilities yourself. Why could one not do this and subsequently interpret the analysis in light of this extra information?
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis?
Reliability of scores is frequently interpreted in terms of Classical Test Theory. Here one has a true score, X, but what you observe at any particular outcome is not only the true score, but the true
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis? Reliability of scores is frequently interpreted in terms of Classical Test Theory. Here one has a true score, X, but what you observe at any particular outcome is not only the true score, but the true score with some error (i.e. Observed = X + error). In theory, by taking multiple observed measures of the same underlying test (making some assumptions about the distribution of the errors of those tests) one can then measure the unobserved true score. Note here in this framework that you have to assume that your multiple observed measures are measuring the same underlying test. Poor reliability of test items is then frequently taken as evidence that the observed measures are not measuring the same underlying test. This is just a convention of the field though, poor reliability, in and of itself, does not prove (in any statistical sense) the items are not measuring the same construct. So it could be argued that by taking many observed measures, even with very unreliable tests, one could come about a reliable measure of the true score. It also stands to be mentioned that classical test theory isn't necessarily the only way to interpret such tests, and many scholors would argue that the concept of latent variables and item-response theory is always more appropriate than classical test theory. Also a similar implicit assumption in classical test theory is when people say reliabilities are too high. It doesn't say anything about the validity of whether particular item(s) measure some underlying test, but that when reliabilities are too high researchers take it as evidence that errors between the tests are not independent. I'm not quite sure why you are so vehement about not going in and calculating the reliabilities yourself. Why could one not do this and subsequently interpret the analysis in light of this extra information?
Is Joel Spolsky's "Hunting of the Snark" post valid statistical content analysis? Reliability of scores is frequently interpreted in terms of Classical Test Theory. Here one has a true score, X, but what you observe at any particular outcome is not only the true score, but the true
11,267
Correlation between two time series
Macro's point is correct the proper way to compare for relationships between time series is by the cross-correlation function (assuming stationarity). Having the same length is not essential. The cross correlation at lag 0 just computes a correlation like doing the Pearson correlation estimate pairing the data at the identical time points. If they do have the same length as you are assuming, you will have exact T pairs where T is the number of time points for each series. Lag 1 cross correlation matches time t from series 1 with time t+1 in series 2. Note that here even though the series are the same length you only have T-2 pair as one point in the first series has no match in the second and one other point in the second series will not have a match from the first. Given these two series you can estimate the cross-correlation at several lags . If any of the cross correlations is statistically significantly different from 0 it will indicate a correlation between the two series.
Correlation between two time series
Macro's point is correct the proper way to compare for relationships between time series is by the cross-correlation function (assuming stationarity). Having the same length is not essential. The cr
Correlation between two time series Macro's point is correct the proper way to compare for relationships between time series is by the cross-correlation function (assuming stationarity). Having the same length is not essential. The cross correlation at lag 0 just computes a correlation like doing the Pearson correlation estimate pairing the data at the identical time points. If they do have the same length as you are assuming, you will have exact T pairs where T is the number of time points for each series. Lag 1 cross correlation matches time t from series 1 with time t+1 in series 2. Note that here even though the series are the same length you only have T-2 pair as one point in the first series has no match in the second and one other point in the second series will not have a match from the first. Given these two series you can estimate the cross-correlation at several lags . If any of the cross correlations is statistically significantly different from 0 it will indicate a correlation between the two series.
Correlation between two time series Macro's point is correct the proper way to compare for relationships between time series is by the cross-correlation function (assuming stationarity). Having the same length is not essential. The cr
11,268
Correlation between two time series
You might want to look at a similar question and my answer Correlating volume timeseries which suggests that you can compute cross-correlations BUT testing them is a horse of a different color ( an equine of a different hue ) due to autoregressive or deterministic structure within either series.
Correlation between two time series
You might want to look at a similar question and my answer Correlating volume timeseries which suggests that you can compute cross-correlations BUT testing them is a horse of a different color ( an eq
Correlation between two time series You might want to look at a similar question and my answer Correlating volume timeseries which suggests that you can compute cross-correlations BUT testing them is a horse of a different color ( an equine of a different hue ) due to autoregressive or deterministic structure within either series.
Correlation between two time series You might want to look at a similar question and my answer Correlating volume timeseries which suggests that you can compute cross-correlations BUT testing them is a horse of a different color ( an eq
11,269
Correlation between two time series
There is some interesting stuff here https://stackoverflow.com/questions/3949226/calculating-pearson-correlation-and-significance-in-python This was actually what I needed. Simple to implement and explain.
Correlation between two time series
There is some interesting stuff here https://stackoverflow.com/questions/3949226/calculating-pearson-correlation-and-significance-in-python This was actually what I needed. Simple to implement and exp
Correlation between two time series There is some interesting stuff here https://stackoverflow.com/questions/3949226/calculating-pearson-correlation-and-significance-in-python This was actually what I needed. Simple to implement and explain.
Correlation between two time series There is some interesting stuff here https://stackoverflow.com/questions/3949226/calculating-pearson-correlation-and-significance-in-python This was actually what I needed. Simple to implement and exp
11,270
What is the architecture of a stacked convolutional autoencoder?
I am currently exploring stacked-convolutional autoencoders. I will try and answer some of your questions to the best of my knowledge. Mind you, I might be wrong so take it with a grain of salt. Yes, you have to "reverse" pool and then convolve with a set of filters to recover your output image. A standard neural network (considering MNIST data as input, i.e. 28x28 input dimensions) would be: 28x28(input) -- convolve with 5 filters, each filter 5x5 --> 5 @ 28 x 28 maps -- maxPooling --> 5 @ 14 x 14 (Hidden layer) -- reverse-maxPool --> 5 @ 28 x 28 -- convolve with 5 filters, each filter 5x5 --> 28x28 (output) My understanding is that conventionally that is what one should do, i.e. train each layer separately. After that you stack the layers and train the entire network once more using the pre-trained weights. However, Yohsua Bengio has some research (the reference escapes my memory) showcasing that one could construct a fully-stacked network and train from scratch. My understanding is that "noise layer" is there to introduce robustness/variability in the input so that the training does not overfit. As long as you are still "training" pre-training or fine-tuning, I think the reconstruction part (i.e. reversePooling, de-convolution etc) is necesary. Otherwise how should one perform error-back-propagation to tune weights? I have tried browsing through numerous papers, but the architecture is never explained in full. If you find any please do let me know.
What is the architecture of a stacked convolutional autoencoder?
I am currently exploring stacked-convolutional autoencoders. I will try and answer some of your questions to the best of my knowledge. Mind you, I might be wrong so take it with a grain of salt. Yes,
What is the architecture of a stacked convolutional autoencoder? I am currently exploring stacked-convolutional autoencoders. I will try and answer some of your questions to the best of my knowledge. Mind you, I might be wrong so take it with a grain of salt. Yes, you have to "reverse" pool and then convolve with a set of filters to recover your output image. A standard neural network (considering MNIST data as input, i.e. 28x28 input dimensions) would be: 28x28(input) -- convolve with 5 filters, each filter 5x5 --> 5 @ 28 x 28 maps -- maxPooling --> 5 @ 14 x 14 (Hidden layer) -- reverse-maxPool --> 5 @ 28 x 28 -- convolve with 5 filters, each filter 5x5 --> 28x28 (output) My understanding is that conventionally that is what one should do, i.e. train each layer separately. After that you stack the layers and train the entire network once more using the pre-trained weights. However, Yohsua Bengio has some research (the reference escapes my memory) showcasing that one could construct a fully-stacked network and train from scratch. My understanding is that "noise layer" is there to introduce robustness/variability in the input so that the training does not overfit. As long as you are still "training" pre-training or fine-tuning, I think the reconstruction part (i.e. reversePooling, de-convolution etc) is necesary. Otherwise how should one perform error-back-propagation to tune weights? I have tried browsing through numerous papers, but the architecture is never explained in full. If you find any please do let me know.
What is the architecture of a stacked convolutional autoencoder? I am currently exploring stacked-convolutional autoencoders. I will try and answer some of your questions to the best of my knowledge. Mind you, I might be wrong so take it with a grain of salt. Yes,
11,271
What is the architecture of a stacked convolutional autoencoder?
I have also been searching for fully explained model of Stacked Convolutional Autoencoders. I came across three different architectures. I am still studying them and I thought these might help others who are also starting to explore CAEs. Any further references to papers or implementations would greatly help. The one mentioned by you using pooling - unpooling. The layers of (convolve)__x_times -> (deconvolve)__x_times, and get the same size as input. (convolve -> pool)__x_times -> (strided deconvolution)__y_times the padding and strides are selected such that the final image size is same as original image. Reference
What is the architecture of a stacked convolutional autoencoder?
I have also been searching for fully explained model of Stacked Convolutional Autoencoders. I came across three different architectures. I am still studying them and I thought these might help others
What is the architecture of a stacked convolutional autoencoder? I have also been searching for fully explained model of Stacked Convolutional Autoencoders. I came across three different architectures. I am still studying them and I thought these might help others who are also starting to explore CAEs. Any further references to papers or implementations would greatly help. The one mentioned by you using pooling - unpooling. The layers of (convolve)__x_times -> (deconvolve)__x_times, and get the same size as input. (convolve -> pool)__x_times -> (strided deconvolution)__y_times the padding and strides are selected such that the final image size is same as original image. Reference
What is the architecture of a stacked convolutional autoencoder? I have also been searching for fully explained model of Stacked Convolutional Autoencoders. I came across three different architectures. I am still studying them and I thought these might help others
11,272
What is the architecture of a stacked convolutional autoencoder?
I don't think the layer-wised training method is correct. For example, the architecture of convolutional auto-encoder is: input->conv->max_poo->de_max_pool->de_conv->output. This is a auto-encoder, and should be trained with the entire architecture. Furthermore, there is no strict criterion whether one convolutional auto-encoder needs pool and un_pool. usually, one pool but without un_pool. Here is a experimental comparisons with the absence of pool and un_pool. https://arxiv.org/pdf/1701.04949.pdf
What is the architecture of a stacked convolutional autoencoder?
I don't think the layer-wised training method is correct. For example, the architecture of convolutional auto-encoder is: input->conv->max_poo->de_max_pool->de_conv->output. This is a auto-encoder, an
What is the architecture of a stacked convolutional autoencoder? I don't think the layer-wised training method is correct. For example, the architecture of convolutional auto-encoder is: input->conv->max_poo->de_max_pool->de_conv->output. This is a auto-encoder, and should be trained with the entire architecture. Furthermore, there is no strict criterion whether one convolutional auto-encoder needs pool and un_pool. usually, one pool but without un_pool. Here is a experimental comparisons with the absence of pool and un_pool. https://arxiv.org/pdf/1701.04949.pdf
What is the architecture of a stacked convolutional autoencoder? I don't think the layer-wised training method is correct. For example, the architecture of convolutional auto-encoder is: input->conv->max_poo->de_max_pool->de_conv->output. This is a auto-encoder, an
11,273
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height
I'm not totally sure of your question, but can remark on his claims and your confusion in the example model. Andrew is not quite clear if scientific interest lies in the height adjusted sex-income association or the sex adjusted height-income association. In a causal model framework sex causes height but height does not cause sex. So if we want the impact of sex, adjusting for height would introduce mediator bias (possibly collider bias too, since rich people are taller!). I find it confusing and funny when I see applied research that interprets the other "covariates" (confounders and precision variables) which are included in a model. They are nonsense, but simply provide adequate stratification to make the comparison that is necessary. Adjusting for height, if you are interested in inference on sex based differences in income, is the wrong thing to do. I agree counterfactuals are not necessary to explain Simpson's paradox. They can be simply a trait intrinsic to data. I think both crude and adjusted RRs are in some sense correct without being causal. It is more problematic, of course, when the objective is causal analysis, and overadjustment reveals problems of non-collapsibility (which inflates an OR) and insufficient sample size. As a reminder for the readers: Simpson's paradox is a very specific phenomenon that refers to an instance in which an association flips direction after controlling for a confounding variable. The Berkeley Admissions data was the motivating example. There, crude RRs showed women were less likely to be accepted to Berkeley. However, once stratified by departments, the RRs showed that women were more likely to be accepted in every single department. They just were more likely to apply to the difficult departments that rejected many people. Now in causal inference theory, we would be befuddled to conceive that the department one applied to causes gender. Gender is intrinsic right? Well, yes and no. Miettenen argues for a "study base" approach to such problems: who is the population? It is not all eligible students, it is the ones who specifically apply to Berkeley. The more competitive departments have attracted the women to apply to Berkeley when they would not have applied otherwise. To expand: a woman who is profoundly intelligent wants to get into the best, say, engineering program. If Berkeley had not had a great engineering program, she would not have applied to Berkeley anyway, she would have applied to MIT or CalPoly. So in that light, the "applying student" population, department causes gender and is a confounder. (caveat: I'm a first gen college student so don't know much about which programs are renowned for what). So how do we summarize this data? It is true that Berkeley were more likely to admit a man who applied than a woman. And it is true that the departments of Berkeley were more likely to admit women than to admit men. Crude and stratified RRs are sensible measures even if they are non-causal. This underscores how important it is to be precise with our wording as statisticians (the humble author does not presume himself to be remotely precise). Confounding is a phenomenon distinct from non-collapsibility, another form of omitted variable bias but one which is known to produce milder effects on estimates. Unlike logistic regression, non-collapsibilty does not cause bias in linear regression and the consideration of a continuous in Gelman's example should have been described more thoroughly. Andrew's interpretation of the sex coefficient in his sex / height adjusted income model reveals the nature of the model's assumptions: the assumption of linearity. Indeed in the linear model, such comparisons between men and women are enabled because for a specific woman, we can predict what a similar height male may have earned, even if he wasn't observed. This is also the case if one allows for effect modification, so that the slope of the trend in women is different from than that of men. On the other hand, I don't think it's so crazy to conceive of men and women of the same height, 66 inches indeed would be a tall woman and short man. It seems a mild projection to me, rather than gross extrapolation. Furthermore, since the model assumptions can be stated clearly, it helps readers understand that the sex stratified income-height association bears information which is borrowed across or averaged between samples of males and females. If such an association were the object of inference, the earnest statistician would obviously consider the possibility of effect modification.
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height
I'm not totally sure of your question, but can remark on his claims and your confusion in the example model. Andrew is not quite clear if scientific interest lies in the height adjusted sex-income ass
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height I'm not totally sure of your question, but can remark on his claims and your confusion in the example model. Andrew is not quite clear if scientific interest lies in the height adjusted sex-income association or the sex adjusted height-income association. In a causal model framework sex causes height but height does not cause sex. So if we want the impact of sex, adjusting for height would introduce mediator bias (possibly collider bias too, since rich people are taller!). I find it confusing and funny when I see applied research that interprets the other "covariates" (confounders and precision variables) which are included in a model. They are nonsense, but simply provide adequate stratification to make the comparison that is necessary. Adjusting for height, if you are interested in inference on sex based differences in income, is the wrong thing to do. I agree counterfactuals are not necessary to explain Simpson's paradox. They can be simply a trait intrinsic to data. I think both crude and adjusted RRs are in some sense correct without being causal. It is more problematic, of course, when the objective is causal analysis, and overadjustment reveals problems of non-collapsibility (which inflates an OR) and insufficient sample size. As a reminder for the readers: Simpson's paradox is a very specific phenomenon that refers to an instance in which an association flips direction after controlling for a confounding variable. The Berkeley Admissions data was the motivating example. There, crude RRs showed women were less likely to be accepted to Berkeley. However, once stratified by departments, the RRs showed that women were more likely to be accepted in every single department. They just were more likely to apply to the difficult departments that rejected many people. Now in causal inference theory, we would be befuddled to conceive that the department one applied to causes gender. Gender is intrinsic right? Well, yes and no. Miettenen argues for a "study base" approach to such problems: who is the population? It is not all eligible students, it is the ones who specifically apply to Berkeley. The more competitive departments have attracted the women to apply to Berkeley when they would not have applied otherwise. To expand: a woman who is profoundly intelligent wants to get into the best, say, engineering program. If Berkeley had not had a great engineering program, she would not have applied to Berkeley anyway, she would have applied to MIT or CalPoly. So in that light, the "applying student" population, department causes gender and is a confounder. (caveat: I'm a first gen college student so don't know much about which programs are renowned for what). So how do we summarize this data? It is true that Berkeley were more likely to admit a man who applied than a woman. And it is true that the departments of Berkeley were more likely to admit women than to admit men. Crude and stratified RRs are sensible measures even if they are non-causal. This underscores how important it is to be precise with our wording as statisticians (the humble author does not presume himself to be remotely precise). Confounding is a phenomenon distinct from non-collapsibility, another form of omitted variable bias but one which is known to produce milder effects on estimates. Unlike logistic regression, non-collapsibilty does not cause bias in linear regression and the consideration of a continuous in Gelman's example should have been described more thoroughly. Andrew's interpretation of the sex coefficient in his sex / height adjusted income model reveals the nature of the model's assumptions: the assumption of linearity. Indeed in the linear model, such comparisons between men and women are enabled because for a specific woman, we can predict what a similar height male may have earned, even if he wasn't observed. This is also the case if one allows for effect modification, so that the slope of the trend in women is different from than that of men. On the other hand, I don't think it's so crazy to conceive of men and women of the same height, 66 inches indeed would be a tall woman and short man. It seems a mild projection to me, rather than gross extrapolation. Furthermore, since the model assumptions can be stated clearly, it helps readers understand that the sex stratified income-height association bears information which is borrowed across or averaged between samples of males and females. If such an association were the object of inference, the earnest statistician would obviously consider the possibility of effect modification.
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height I'm not totally sure of your question, but can remark on his claims and your confusion in the example model. Andrew is not quite clear if scientific interest lies in the height adjusted sex-income ass
11,274
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height
"why compare a man and a woman who are both 66 inches tall, for example? That would be a comparison of a short man with a tall woman" The model assumes that income depends on gender and height. However, the way in which height generates higher income may not be the same for men and women. Women may be considered tall "enough" at a height for which a man may be still considered short. Simplifying the model in the following way may be useful. Assume that you want to regress the probability of being employed as a shop assistant in large clothing retailers shops and consider the following identification strategy. You observe that employers are more likely to hire workers that fulfill a certain minimum height, where the "minimum" is relative to the gender. Instead of measuring height in cm, let's suppose that there exists two threshold values defining at which height respectively a man and a woman are "tall": >= 180 cm for males and >= 170 cm for females. Assuming that the thresholds exist in reality (i.e. employers make an actual marked difference among being female and 169cm or 171cm tall), and that they are the correct ones, you are able to build a dummy defining tall/short males and females. Men and women of different height may still fall in the same category of your dummy and at the same time your measure is consistent with the real dynamics of the that particular labour market.
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height
"why compare a man and a woman who are both 66 inches tall, for example? That would be a comparison of a short man with a tall woman" The model assumes that income depends on gender and height. Howeve
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height "why compare a man and a woman who are both 66 inches tall, for example? That would be a comparison of a short man with a tall woman" The model assumes that income depends on gender and height. However, the way in which height generates higher income may not be the same for men and women. Women may be considered tall "enough" at a height for which a man may be still considered short. Simplifying the model in the following way may be useful. Assume that you want to regress the probability of being employed as a shop assistant in large clothing retailers shops and consider the following identification strategy. You observe that employers are more likely to hire workers that fulfill a certain minimum height, where the "minimum" is relative to the gender. Instead of measuring height in cm, let's suppose that there exists two threshold values defining at which height respectively a man and a woman are "tall": >= 180 cm for males and >= 170 cm for females. Assuming that the thresholds exist in reality (i.e. employers make an actual marked difference among being female and 169cm or 171cm tall), and that they are the correct ones, you are able to build a dummy defining tall/short males and females. Men and women of different height may still fall in the same category of your dummy and at the same time your measure is consistent with the real dynamics of the that particular labour market.
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height "why compare a man and a woman who are both 66 inches tall, for example? That would be a comparison of a short man with a tall woman" The model assumes that income depends on gender and height. Howeve
11,275
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height
Would you be telling (in more plain words) that the typical gender fight saying men have more chances than women as their income is p% higher would be paradoxically biased? Maybe that's a point. We tend to see things how they look like and not to analyze the underlying implications. to go above Simpson's paradox we would have to answer the question "how much more money makes a woman doing the same amount of unbiased work compared to a man?" then somebody could say that they have to be pregnant and raise children more that their counterparts which is true but the important issue is that it is sort sighed just to say, "women for the very fact of being women have less opportunities" and a profound analyisis with conditional statistics would lead us to see that in essence there tend to be equal opportunities and they are other factors not related with sex what makes statistics look like the are discrimination related with sex issues.
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height
Would you be telling (in more plain words) that the typical gender fight saying men have more chances than women as their income is p% higher would be paradoxically biased? Maybe that's a point. We te
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height Would you be telling (in more plain words) that the typical gender fight saying men have more chances than women as their income is p% higher would be paradoxically biased? Maybe that's a point. We tend to see things how they look like and not to analyze the underlying implications. to go above Simpson's paradox we would have to answer the question "how much more money makes a woman doing the same amount of unbiased work compared to a man?" then somebody could say that they have to be pregnant and raise children more that their counterparts which is true but the important issue is that it is sort sighed just to say, "women for the very fact of being women have less opportunities" and a profound analyisis with conditional statistics would lead us to see that in essence there tend to be equal opportunities and they are other factors not related with sex what makes statistics look like the are discrimination related with sex issues.
Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height Would you be telling (in more plain words) that the typical gender fight saying men have more chances than women as their income is p% higher would be paradoxically biased? Maybe that's a point. We te
11,276
Did I just invent a Bayesian method for analysis of ROC curves?
First off, there is no accepted way to "analyze" a ROC curve: it is merely a graphic that portrays the predictive ability of a classification model. You can certainly summarize a ROC curve using a c-statistic or the AUC, but calculating confidence intervals and performing inference using $c$-statistics is well understood due to its relation to the Wilcoxon U-statistic. It's generally fairly well accepted that you can estimate the variability in ROC curves using the bootstrap cf Pepe Etzione Feng. This is a nice approach because the ROC curve is an empirical estimate and the bootstrap is non-parametric. Parameterizing anything in such a fashion introduces assumptions and complications such as "is a flat prior really noninformative?" I am not convinced this is the case here. Lastly, there's the issue of pseudo likelihood. You can induced variability in the ROC curves by putting a prior on $\theta$ which, in all of ROC usage, is the only thing which is typically not considered a random variable. You have then assumed that the variability in TPR and FPR induced by variability in $\theta$ are independent. They are not. In fact they are completely dependent. You are sort calculating a Bayesian posterior for your own weight in kilograms and pounds and saying they do not depend on each other. Take, as an example, a model with perfect discrimination. Using your method, you will find that the confidence bands are the unit square. They are not! There is no variability in a model with perfect discrimination. A bootstrap will show you that. If one were to approach the issue of ROC "analysis" from a Bayesian perspective, it would perhaps be most useful to address the problem of model selection by putting a prior on the space of models used for analysis. That would be a very interesting problem.
Did I just invent a Bayesian method for analysis of ROC curves?
First off, there is no accepted way to "analyze" a ROC curve: it is merely a graphic that portrays the predictive ability of a classification model. You can certainly summarize a ROC curve using a c-s
Did I just invent a Bayesian method for analysis of ROC curves? First off, there is no accepted way to "analyze" a ROC curve: it is merely a graphic that portrays the predictive ability of a classification model. You can certainly summarize a ROC curve using a c-statistic or the AUC, but calculating confidence intervals and performing inference using $c$-statistics is well understood due to its relation to the Wilcoxon U-statistic. It's generally fairly well accepted that you can estimate the variability in ROC curves using the bootstrap cf Pepe Etzione Feng. This is a nice approach because the ROC curve is an empirical estimate and the bootstrap is non-parametric. Parameterizing anything in such a fashion introduces assumptions and complications such as "is a flat prior really noninformative?" I am not convinced this is the case here. Lastly, there's the issue of pseudo likelihood. You can induced variability in the ROC curves by putting a prior on $\theta$ which, in all of ROC usage, is the only thing which is typically not considered a random variable. You have then assumed that the variability in TPR and FPR induced by variability in $\theta$ are independent. They are not. In fact they are completely dependent. You are sort calculating a Bayesian posterior for your own weight in kilograms and pounds and saying they do not depend on each other. Take, as an example, a model with perfect discrimination. Using your method, you will find that the confidence bands are the unit square. They are not! There is no variability in a model with perfect discrimination. A bootstrap will show you that. If one were to approach the issue of ROC "analysis" from a Bayesian perspective, it would perhaps be most useful to address the problem of model selection by putting a prior on the space of models used for analysis. That would be a very interesting problem.
Did I just invent a Bayesian method for analysis of ROC curves? First off, there is no accepted way to "analyze" a ROC curve: it is merely a graphic that portrays the predictive ability of a classification model. You can certainly summarize a ROC curve using a c-s
11,277
Did I just invent a Bayesian method for analysis of ROC curves?
This post seems similar to an existing paper. I could be misunderstanding the nuances though. Hellmich, Martin, et al. "A Bayesian approach to a general regression model for ROC curves." Medical Decision Making 18.4 (1998): 436-443.
Did I just invent a Bayesian method for analysis of ROC curves?
This post seems similar to an existing paper. I could be misunderstanding the nuances though. Hellmich, Martin, et al. "A Bayesian approach to a general regression model for ROC curves." Medical Decis
Did I just invent a Bayesian method for analysis of ROC curves? This post seems similar to an existing paper. I could be misunderstanding the nuances though. Hellmich, Martin, et al. "A Bayesian approach to a general regression model for ROC curves." Medical Decision Making 18.4 (1998): 436-443.
Did I just invent a Bayesian method for analysis of ROC curves? This post seems similar to an existing paper. I could be misunderstanding the nuances though. Hellmich, Martin, et al. "A Bayesian approach to a general regression model for ROC curves." Medical Decis
11,278
Is a log transformation a valid technique for t-testing non-normal data?
It is common to try to apply some kind of transformation to normality (using e.g. logarithms, square roots, ...) when encountered with data that isn't normal. While the logarithm yields good results for skewed data reasonably often, there is no guarantee that it will work in this particular case. One should also bear @whubers comment above in mind when analysing transformed data: "A t-test for the logarithms is neither the same as a t-test for the untransformed data nor a nonparametric test. The t-test on the logs compares geometric means, not the (usual) arithmetic means." Transformations to normality should always be followed by an investigation of the normality assumption, to assess whether the transformed data looks "normal enough". This can be done using for instance histograms, QQ-plots and tests for normality. The t-test is particularly sensitive to deviations from normality in form of skewness and therefore a test for normality that is directed towards skew alternatives would be preferable. Pearson's sample skewness $\frac{n^{-1}\sum_{i=1}^n(x_i-\bar{x})^3}{(n^{-1}\sum_{i=1}^n(x_i-\bar{x})^2)^{3/2}}$ is a suitable test statistic in this case. Rather than choosing a transformation (such as logarithms) because it works most of the time, I prefer to use the Box-Cox procedure for choosing a transformation using the given data. There are however some philosophical issues with this; in particular whether this should affect the number of degrees of freedom in the t-test, since we've used some information from the sample when choosing which transform to use. Finally, a good alternative to using either the t-test after a transformation or a classical nonparametric test is to use the bootstrap analogue of the t-test. It does not require the assumption of normality and is a test about the untransformed means (and not about anything else).
Is a log transformation a valid technique for t-testing non-normal data?
It is common to try to apply some kind of transformation to normality (using e.g. logarithms, square roots, ...) when encountered with data that isn't normal. While the logarithm yields good results f
Is a log transformation a valid technique for t-testing non-normal data? It is common to try to apply some kind of transformation to normality (using e.g. logarithms, square roots, ...) when encountered with data that isn't normal. While the logarithm yields good results for skewed data reasonably often, there is no guarantee that it will work in this particular case. One should also bear @whubers comment above in mind when analysing transformed data: "A t-test for the logarithms is neither the same as a t-test for the untransformed data nor a nonparametric test. The t-test on the logs compares geometric means, not the (usual) arithmetic means." Transformations to normality should always be followed by an investigation of the normality assumption, to assess whether the transformed data looks "normal enough". This can be done using for instance histograms, QQ-plots and tests for normality. The t-test is particularly sensitive to deviations from normality in form of skewness and therefore a test for normality that is directed towards skew alternatives would be preferable. Pearson's sample skewness $\frac{n^{-1}\sum_{i=1}^n(x_i-\bar{x})^3}{(n^{-1}\sum_{i=1}^n(x_i-\bar{x})^2)^{3/2}}$ is a suitable test statistic in this case. Rather than choosing a transformation (such as logarithms) because it works most of the time, I prefer to use the Box-Cox procedure for choosing a transformation using the given data. There are however some philosophical issues with this; in particular whether this should affect the number of degrees of freedom in the t-test, since we've used some information from the sample when choosing which transform to use. Finally, a good alternative to using either the t-test after a transformation or a classical nonparametric test is to use the bootstrap analogue of the t-test. It does not require the assumption of normality and is a test about the untransformed means (and not about anything else).
Is a log transformation a valid technique for t-testing non-normal data? It is common to try to apply some kind of transformation to normality (using e.g. logarithms, square roots, ...) when encountered with data that isn't normal. While the logarithm yields good results f
11,279
Sites for predictive modeling competitions
Isabelle Guyon (working with many colleagues) has organised a series of machine learning challenges, see the website for details of previous challenges. The competitions are usually part of the programme of a conference, but attendance at the event is optional, and they are a good test of the tools in ones toolbox!
Sites for predictive modeling competitions
Isabelle Guyon (working with many colleagues) has organised a series of machine learning challenges, see the website for details of previous challenges. The competitions are usually part of the progr
Sites for predictive modeling competitions Isabelle Guyon (working with many colleagues) has organised a series of machine learning challenges, see the website for details of previous challenges. The competitions are usually part of the programme of a conference, but attendance at the event is optional, and they are a good test of the tools in ones toolbox!
Sites for predictive modeling competitions Isabelle Guyon (working with many colleagues) has organised a series of machine learning challenges, see the website for details of previous challenges. The competitions are usually part of the progr
11,280
Sites for predictive modeling competitions
Here are some nice datasets: http://archive.ics.uci.edu/ml/ Update: The question has changed since I gave this answer.
Sites for predictive modeling competitions
Here are some nice datasets: http://archive.ics.uci.edu/ml/ Update: The question has changed since I gave this answer.
Sites for predictive modeling competitions Here are some nice datasets: http://archive.ics.uci.edu/ml/ Update: The question has changed since I gave this answer.
Sites for predictive modeling competitions Here are some nice datasets: http://archive.ics.uci.edu/ml/ Update: The question has changed since I gave this answer.
11,281
Sites for predictive modeling competitions
Adding Numerai! http://www.numer.ai Numerai is an AI competition where you model the underlying fund's data - in real time - and make predictions. Download the fund's data - protected by homomorphic encryption. Upload predictions and get featured on the leaderboard. You may even get assigned profits.
Sites for predictive modeling competitions
Adding Numerai! http://www.numer.ai Numerai is an AI competition where you model the underlying fund's data - in real time - and make predictions. Download the fund's data - protected by homomorphic e
Sites for predictive modeling competitions Adding Numerai! http://www.numer.ai Numerai is an AI competition where you model the underlying fund's data - in real time - and make predictions. Download the fund's data - protected by homomorphic encryption. Upload predictions and get featured on the leaderboard. You may even get assigned profits.
Sites for predictive modeling competitions Adding Numerai! http://www.numer.ai Numerai is an AI competition where you model the underlying fund's data - in real time - and make predictions. Download the fund's data - protected by homomorphic e
11,282
Bonferroni or Tukey? When does the number of comparisons become large?
In addition to the useful link mentioned in the comments by @schenectady. I would also add the point that Bonferroni correction applies to a broader class of problems. As far as I'm aware Tukey's HSD is only applied to situations where you want to examine all possible pairwise comparisons, whereas Bonferroni correction can be applied to any set of hypothesis tests. In particular, Bonferroni correction is useful when you have a small set of planned comparisons, and you want to control the family-wise Type I error rate. This also permits compound comparisons. For example, you have a 6-way ANOVA and you want to compare the average of groups 1, 2, and 3 with group 4, and you want to compare group 5 with 6. To further illustrate, you could apply Bonferroni correction to assessing significance of correlations in a correlation matrix, or the set of main and interaction effects in an ANOVA. However, such a correction is typically not applied, presumably for the reason that the reduction in Type I error rate results in an unacceptable reduction in power.
Bonferroni or Tukey? When does the number of comparisons become large?
In addition to the useful link mentioned in the comments by @schenectady. I would also add the point that Bonferroni correction applies to a broader class of problems. As far as I'm aware Tukey's HSD
Bonferroni or Tukey? When does the number of comparisons become large? In addition to the useful link mentioned in the comments by @schenectady. I would also add the point that Bonferroni correction applies to a broader class of problems. As far as I'm aware Tukey's HSD is only applied to situations where you want to examine all possible pairwise comparisons, whereas Bonferroni correction can be applied to any set of hypothesis tests. In particular, Bonferroni correction is useful when you have a small set of planned comparisons, and you want to control the family-wise Type I error rate. This also permits compound comparisons. For example, you have a 6-way ANOVA and you want to compare the average of groups 1, 2, and 3 with group 4, and you want to compare group 5 with 6. To further illustrate, you could apply Bonferroni correction to assessing significance of correlations in a correlation matrix, or the set of main and interaction effects in an ANOVA. However, such a correction is typically not applied, presumably for the reason that the reduction in Type I error rate results in an unacceptable reduction in power.
Bonferroni or Tukey? When does the number of comparisons become large? In addition to the useful link mentioned in the comments by @schenectady. I would also add the point that Bonferroni correction applies to a broader class of problems. As far as I'm aware Tukey's HSD
11,283
Unbiased estimation of covariance matrix for multiply censored data
I have not full internalized the issue of matrix interference but here is one approach. Let: $Y$ be a vector that represents the concentration of all the target compounds in the undiluted sample. $Z$ be the corresponding vector in the diluted sample. $d$ be the dilution factor i.e., the sample is diluted $d$:1. Our model is: $Y \sim N(\mu,\Sigma)$ $Z = \frac{Y}{d} + \epsilon$ where $\epsilon \sim N(0,\sigma^2\ I)$ represents the error due to dilution errors. Therefore, it follows that: $Z \sim N(\frac{\mu}{d}, \Sigma + \sigma^2\ I)$ Denote the above distribution of $Z$ by $f_Z(.)$. Let $O$ be the observed concentrations and $\tau$ represent the test instrument's threshold below which it cannot detect a compound. Then, for the $i^{th}$ compound we have: $O_i = Z_i I(Z_i > \tau) + 0 I(Z_i \le \tau)$ Without loss of generality let the first $k$ compounds be such that they are below the threshold. Then the likelihood function can be written as: $L(O_1, ... O_k, O_{k+1},...O_n |- ) = [\prod_{i=1}^{i=k}{Pr(Z_i \le \tau)}] [\prod_{i=k+1}^{i=n}{f(O_i |-)}]$ where $f(O_i |-) = \int_{j\neq i}{f_Z(O_i|-) I(O_i > \tau)}$ Estimation is then a matter of using either maximum likelihood or bayesian ideas. I am not sure how tractable the above is but I hope it gives you some ideas.
Unbiased estimation of covariance matrix for multiply censored data
I have not full internalized the issue of matrix interference but here is one approach. Let: $Y$ be a vector that represents the concentration of all the target compounds in the undiluted sample. $Z$
Unbiased estimation of covariance matrix for multiply censored data I have not full internalized the issue of matrix interference but here is one approach. Let: $Y$ be a vector that represents the concentration of all the target compounds in the undiluted sample. $Z$ be the corresponding vector in the diluted sample. $d$ be the dilution factor i.e., the sample is diluted $d$:1. Our model is: $Y \sim N(\mu,\Sigma)$ $Z = \frac{Y}{d} + \epsilon$ where $\epsilon \sim N(0,\sigma^2\ I)$ represents the error due to dilution errors. Therefore, it follows that: $Z \sim N(\frac{\mu}{d}, \Sigma + \sigma^2\ I)$ Denote the above distribution of $Z$ by $f_Z(.)$. Let $O$ be the observed concentrations and $\tau$ represent the test instrument's threshold below which it cannot detect a compound. Then, for the $i^{th}$ compound we have: $O_i = Z_i I(Z_i > \tau) + 0 I(Z_i \le \tau)$ Without loss of generality let the first $k$ compounds be such that they are below the threshold. Then the likelihood function can be written as: $L(O_1, ... O_k, O_{k+1},...O_n |- ) = [\prod_{i=1}^{i=k}{Pr(Z_i \le \tau)}] [\prod_{i=k+1}^{i=n}{f(O_i |-)}]$ where $f(O_i |-) = \int_{j\neq i}{f_Z(O_i|-) I(O_i > \tau)}$ Estimation is then a matter of using either maximum likelihood or bayesian ideas. I am not sure how tractable the above is but I hope it gives you some ideas.
Unbiased estimation of covariance matrix for multiply censored data I have not full internalized the issue of matrix interference but here is one approach. Let: $Y$ be a vector that represents the concentration of all the target compounds in the undiluted sample. $Z$
11,284
Unbiased estimation of covariance matrix for multiply censored data
Another more computationally efficient option would be to fit the covariance matrix by moment matching using a model that has been called the "dichomized Gaussian", really just a Gaussian copula model. A recent paper from Macke et al 2010 describes a closed form procedure for fitting this model which involves only the (censored) empirical covariance matrix and the calculation of some bivariate normal probabilities. The same group (Bethge lab at MPI Tuebingen) has also described hybrid discrete/continuous Gaussian models which are probably what you want here (i.e., since the Gaussian RVs aren't fully "dichotomized" -- only those below threshold). Critically, this is not an ML estimator, and I'm afraid I don't know what its bias properties are.
Unbiased estimation of covariance matrix for multiply censored data
Another more computationally efficient option would be to fit the covariance matrix by moment matching using a model that has been called the "dichomized Gaussian", really just a Gaussian copula model
Unbiased estimation of covariance matrix for multiply censored data Another more computationally efficient option would be to fit the covariance matrix by moment matching using a model that has been called the "dichomized Gaussian", really just a Gaussian copula model. A recent paper from Macke et al 2010 describes a closed form procedure for fitting this model which involves only the (censored) empirical covariance matrix and the calculation of some bivariate normal probabilities. The same group (Bethge lab at MPI Tuebingen) has also described hybrid discrete/continuous Gaussian models which are probably what you want here (i.e., since the Gaussian RVs aren't fully "dichotomized" -- only those below threshold). Critically, this is not an ML estimator, and I'm afraid I don't know what its bias properties are.
Unbiased estimation of covariance matrix for multiply censored data Another more computationally efficient option would be to fit the covariance matrix by moment matching using a model that has been called the "dichomized Gaussian", really just a Gaussian copula model
11,285
Unbiased estimation of covariance matrix for multiply censored data
How many compounds are in your sample? (Or, how big is the covariance matrix in question?). Alan Genz has some very nice code in a variety of languages (R, Matlab, Fortran; see here) for computing integrals of multivariate normal densities over hyper-rectangles (i.e., the kinds of integrals you need to evaluate the likelihood, as noted by user28). I've used these functions ("ADAPT" and "QSIMVN") for integrals up to around 10-12 dimensions, and several functions on that page advertise integrals (and associated derivatives you might need) for problems up to dimension 100. I don't know if that's enough dimensions for your purposes, but if so it could presumably allow you to find maximum likelihood estimates by gradient ascent.
Unbiased estimation of covariance matrix for multiply censored data
How many compounds are in your sample? (Or, how big is the covariance matrix in question?). Alan Genz has some very nice code in a variety of languages (R, Matlab, Fortran; see here) for computing
Unbiased estimation of covariance matrix for multiply censored data How many compounds are in your sample? (Or, how big is the covariance matrix in question?). Alan Genz has some very nice code in a variety of languages (R, Matlab, Fortran; see here) for computing integrals of multivariate normal densities over hyper-rectangles (i.e., the kinds of integrals you need to evaluate the likelihood, as noted by user28). I've used these functions ("ADAPT" and "QSIMVN") for integrals up to around 10-12 dimensions, and several functions on that page advertise integrals (and associated derivatives you might need) for problems up to dimension 100. I don't know if that's enough dimensions for your purposes, but if so it could presumably allow you to find maximum likelihood estimates by gradient ascent.
Unbiased estimation of covariance matrix for multiply censored data How many compounds are in your sample? (Or, how big is the covariance matrix in question?). Alan Genz has some very nice code in a variety of languages (R, Matlab, Fortran; see here) for computing
11,286
Two ways of using bootstrap to estimate the confidence interval of coefficients in regression
If the response-predictor pairs have been obtained from a population by random sample, it is safe to use case/random-x/your-first resampling scheme. If predictors were controlled for, or the values of the predictors were set by the experimenter, you may consider using residual/model-based/fixed-x/your-second resampling scheme. How do the two differ? An introduction to the bootstrap with applications in R by Davison and Kounen has a discussion pertinent to this question (see p.9). See also the R code in this appendix by John Fox, particularly functions boot.huber on p.5 for the random-x scheme and boot.huber.fixed on p.10 for the fixed-x scheme. While in the lecture notes by Shalizi the two schemes are applied to different datasets/problems, Fox's appendix illustrate how little difference the two schemes may often make. When can the two be expected to deliver near identical results? One situation is when the regression model is correctly specified, e.g., there is no unmodelled nonlinearity and the usual regression assumptions (e.g., iid errors, no outliers) are satisfied. See chapter 21 of Fox's book (in which the aforementioned appendix with the R code indirectly belongs), particularly the discussion on page 598 and exercise 21.3. entitled "Random versus fixed resampling in regression". To quote from the book By randomly reattaching resampled residuals to fitted values, the [fixed-x/model-based] procedure implicitly assumes that the errors are identically distributed. If, for example, the true errors have non-constant variance, then this property will not be reflected in the resampled residuals. Likewise, the unique impact of a high-leverage outlier will be lost to the resampling. You will also learn from that discussion why fixed-x bootstrap implicitly assumes that the functional form of the model is correct (even though no assumption is made about the shape of the error distribution). See also slide 12 of this talk for Society Of Actuaries in Ireland by Derek Bain. It also has an illustration of what should be considered "the same result": The approach of re-sampling cases to generate pseudo data is the more usual form of bootstrapping. The approach is robust in that if an incorrect model is fitted an appropriate measure of parameter meter uncertainty is still obtained. However re sampling residuals is more efficient if the correct model has been fitted. The graphs shows both approaches in estimating the variance of a 26 point data sample mean and a 52 point sample mean. In the larger sample the two approaches are equivalent.
Two ways of using bootstrap to estimate the confidence interval of coefficients in regression
If the response-predictor pairs have been obtained from a population by random sample, it is safe to use case/random-x/your-first resampling scheme. If predictors were controlled for, or the values of
Two ways of using bootstrap to estimate the confidence interval of coefficients in regression If the response-predictor pairs have been obtained from a population by random sample, it is safe to use case/random-x/your-first resampling scheme. If predictors were controlled for, or the values of the predictors were set by the experimenter, you may consider using residual/model-based/fixed-x/your-second resampling scheme. How do the two differ? An introduction to the bootstrap with applications in R by Davison and Kounen has a discussion pertinent to this question (see p.9). See also the R code in this appendix by John Fox, particularly functions boot.huber on p.5 for the random-x scheme and boot.huber.fixed on p.10 for the fixed-x scheme. While in the lecture notes by Shalizi the two schemes are applied to different datasets/problems, Fox's appendix illustrate how little difference the two schemes may often make. When can the two be expected to deliver near identical results? One situation is when the regression model is correctly specified, e.g., there is no unmodelled nonlinearity and the usual regression assumptions (e.g., iid errors, no outliers) are satisfied. See chapter 21 of Fox's book (in which the aforementioned appendix with the R code indirectly belongs), particularly the discussion on page 598 and exercise 21.3. entitled "Random versus fixed resampling in regression". To quote from the book By randomly reattaching resampled residuals to fitted values, the [fixed-x/model-based] procedure implicitly assumes that the errors are identically distributed. If, for example, the true errors have non-constant variance, then this property will not be reflected in the resampled residuals. Likewise, the unique impact of a high-leverage outlier will be lost to the resampling. You will also learn from that discussion why fixed-x bootstrap implicitly assumes that the functional form of the model is correct (even though no assumption is made about the shape of the error distribution). See also slide 12 of this talk for Society Of Actuaries in Ireland by Derek Bain. It also has an illustration of what should be considered "the same result": The approach of re-sampling cases to generate pseudo data is the more usual form of bootstrapping. The approach is robust in that if an incorrect model is fitted an appropriate measure of parameter meter uncertainty is still obtained. However re sampling residuals is more efficient if the correct model has been fitted. The graphs shows both approaches in estimating the variance of a 26 point data sample mean and a 52 point sample mean. In the larger sample the two approaches are equivalent.
Two ways of using bootstrap to estimate the confidence interval of coefficients in regression If the response-predictor pairs have been obtained from a population by random sample, it is safe to use case/random-x/your-first resampling scheme. If predictors were controlled for, or the values of
11,287
What is the probability that $n$ random points in $d$ dimensions are linearly separable?
Assuming no duplicates exist in the data. If $n\leq d+1$, the probability is $\text{Pr}=1$. For other combinations of $(n,d)$, see the following plot: I generated this plot simulating input and output data as specified in the OP. Linear separability was defined as failure of convergence in a logistic regression model, due to the Hauck-Donner effect. We can see the probability decreases for increasing $n$. In fact, we could fit a model relating $n, d$ to $p$, and this was the result: $$P(n,d)={ 1 \over {1 + e^ {-(5.82944-4.58261\times n + 1.37271 \times d -0.0235785 \times n \times d)} } }$$ Code for the plot (in Julia): using GLM ds = 10; #number of dimensions to be investigated ns = 100 #number of examples to be investigated niter = 1000; #number of iterations per d per n P = niter * ones(Int64, ds, ns); #starting the number of successes for d in 1:ds for n in (d+1):ns p = 0 #0 hits for i in 1:niter println("Dimensions: $d; Samples: $n; Iteration: $i;") try #we will try to catch errors in the logistic glm, these are due to perfect separability X = hcat(rand((n,d)), ones(n)); #sampling from uniform plus intercept Y = sample(0:1, n) #sampling a binary outcome glm(X, Y, Binomial(), LogitLink()) catch p = p+1 #if we catch an error, increase the count end end P[d,n] = p end end using Plots gui(heatmap(P./niter, xlabel = "Number of Samples", ylabel = "Number of Dimensions", title = "Probability of linear separability")) Code for the model relating $(n,d)$ to $p$ (in Julia): probs = P./niter N = transpose(repmat(1:ns, 1, ds)) D = repmat(1:ds, 1, ns) fit = glm(hcat(log.(N[:]), D[:], N[:].*D[:], ones(ds*ns)), probs[:], Binomial(), LogitLink()) coef(fit) #4-element Array{Float64,1}: # -4.58261 # 1.37271 # -0.0235785 # 5.82944 gui(heatmap(reshape(predict(fit), ds, ns), xlabel = "Number of Samples", ylabel = "Number of Dimensions", title = "Fit of probability of linear separability"))
What is the probability that $n$ random points in $d$ dimensions are linearly separable?
Assuming no duplicates exist in the data. If $n\leq d+1$, the probability is $\text{Pr}=1$. For other combinations of $(n,d)$, see the following plot: I generated this plot simulating input and outpu
What is the probability that $n$ random points in $d$ dimensions are linearly separable? Assuming no duplicates exist in the data. If $n\leq d+1$, the probability is $\text{Pr}=1$. For other combinations of $(n,d)$, see the following plot: I generated this plot simulating input and output data as specified in the OP. Linear separability was defined as failure of convergence in a logistic regression model, due to the Hauck-Donner effect. We can see the probability decreases for increasing $n$. In fact, we could fit a model relating $n, d$ to $p$, and this was the result: $$P(n,d)={ 1 \over {1 + e^ {-(5.82944-4.58261\times n + 1.37271 \times d -0.0235785 \times n \times d)} } }$$ Code for the plot (in Julia): using GLM ds = 10; #number of dimensions to be investigated ns = 100 #number of examples to be investigated niter = 1000; #number of iterations per d per n P = niter * ones(Int64, ds, ns); #starting the number of successes for d in 1:ds for n in (d+1):ns p = 0 #0 hits for i in 1:niter println("Dimensions: $d; Samples: $n; Iteration: $i;") try #we will try to catch errors in the logistic glm, these are due to perfect separability X = hcat(rand((n,d)), ones(n)); #sampling from uniform plus intercept Y = sample(0:1, n) #sampling a binary outcome glm(X, Y, Binomial(), LogitLink()) catch p = p+1 #if we catch an error, increase the count end end P[d,n] = p end end using Plots gui(heatmap(P./niter, xlabel = "Number of Samples", ylabel = "Number of Dimensions", title = "Probability of linear separability")) Code for the model relating $(n,d)$ to $p$ (in Julia): probs = P./niter N = transpose(repmat(1:ns, 1, ds)) D = repmat(1:ds, 1, ns) fit = glm(hcat(log.(N[:]), D[:], N[:].*D[:], ones(ds*ns)), probs[:], Binomial(), LogitLink()) coef(fit) #4-element Array{Float64,1}: # -4.58261 # 1.37271 # -0.0235785 # 5.82944 gui(heatmap(reshape(predict(fit), ds, ns), xlabel = "Number of Samples", ylabel = "Number of Dimensions", title = "Fit of probability of linear separability"))
What is the probability that $n$ random points in $d$ dimensions are linearly separable? Assuming no duplicates exist in the data. If $n\leq d+1$, the probability is $\text{Pr}=1$. For other combinations of $(n,d)$, see the following plot: I generated this plot simulating input and outpu
11,288
What is the probability that $n$ random points in $d$ dimensions are linearly separable?
This is related to Cover's theorem. A nice summary by Emin Orhan is given here. Ps: I would post this in a comment but don't have enough reputation.
What is the probability that $n$ random points in $d$ dimensions are linearly separable?
This is related to Cover's theorem. A nice summary by Emin Orhan is given here. Ps: I would post this in a comment but don't have enough reputation.
What is the probability that $n$ random points in $d$ dimensions are linearly separable? This is related to Cover's theorem. A nice summary by Emin Orhan is given here. Ps: I would post this in a comment but don't have enough reputation.
What is the probability that $n$ random points in $d$ dimensions are linearly separable? This is related to Cover's theorem. A nice summary by Emin Orhan is given here. Ps: I would post this in a comment but don't have enough reputation.
11,289
Fitting custom distributions by MLE
This answer assumes $\mu$ is known. One very flexible way to get MLE's in R is to use STAN via rstan. STAN has a reputation for being an MCMC tool, but it also can estimate parameters by variational inference or MAP. And you're free to not specify the priors. In this case, what you're doing is very similar to their hurdle-model example. Here is the STAN code for that example. data { int<lower=0> N; int<lower=0> y[N]; } parameters { real<lower=0, upper=1> theta; real<lower=0> lambda; } model { for (n in 1:N) { if (y[n] == 0) target += bernoulli_lpmf(1 | theta); else target += bernoulli_lpmf(0 | theta) + poisson_lpmf(y[n] | lambda); } } To adapt this for your own use, you could: Replace poisson_lpmf with the log-density for your $f_A$. Add a third case to the if-else so that it checks for exceeding $\mu$, not just 0. As the meat of that third case, use the log pmf for your extreme value distribution of choice. Replace bernoulli_lpmf with categorical_lpmf and make the mixture probability parameter into a vector. To incorporate covariates, you can add regression parameters, and make all your other parameters functions of them. It may help to use categorical_logit_lpmf in place of categorical_lpmf. Truncate one mixture component at $\mu$ from above and the other at $\mu$ from below, depending on your perspective on the dilemma raised by Jarle Tufto in the comments. It seems like you could get VERY different estimates depending on how exactly you decide to handle this. A nice sanity check: generate a fake dataset from the fitted parameters and make sure it has the right amount at 0, amount above $\mu$, etc. Once you have a file with the right STAN code, you can use STAN with lots of different toolchains. To use it with R, check out these examples. I simplified one to get an MLE, using rstan::optimizing instead of sampling: install.packages("rstan") library("rstan") model = stan_model("Example1.stan") fit = optimizing(model) There are also some tricks for faster/better optimization that could help in practice.
Fitting custom distributions by MLE
This answer assumes $\mu$ is known. One very flexible way to get MLE's in R is to use STAN via rstan. STAN has a reputation for being an MCMC tool, but it also can estimate parameters by variational i
Fitting custom distributions by MLE This answer assumes $\mu$ is known. One very flexible way to get MLE's in R is to use STAN via rstan. STAN has a reputation for being an MCMC tool, but it also can estimate parameters by variational inference or MAP. And you're free to not specify the priors. In this case, what you're doing is very similar to their hurdle-model example. Here is the STAN code for that example. data { int<lower=0> N; int<lower=0> y[N]; } parameters { real<lower=0, upper=1> theta; real<lower=0> lambda; } model { for (n in 1:N) { if (y[n] == 0) target += bernoulli_lpmf(1 | theta); else target += bernoulli_lpmf(0 | theta) + poisson_lpmf(y[n] | lambda); } } To adapt this for your own use, you could: Replace poisson_lpmf with the log-density for your $f_A$. Add a third case to the if-else so that it checks for exceeding $\mu$, not just 0. As the meat of that third case, use the log pmf for your extreme value distribution of choice. Replace bernoulli_lpmf with categorical_lpmf and make the mixture probability parameter into a vector. To incorporate covariates, you can add regression parameters, and make all your other parameters functions of them. It may help to use categorical_logit_lpmf in place of categorical_lpmf. Truncate one mixture component at $\mu$ from above and the other at $\mu$ from below, depending on your perspective on the dilemma raised by Jarle Tufto in the comments. It seems like you could get VERY different estimates depending on how exactly you decide to handle this. A nice sanity check: generate a fake dataset from the fitted parameters and make sure it has the right amount at 0, amount above $\mu$, etc. Once you have a file with the right STAN code, you can use STAN with lots of different toolchains. To use it with R, check out these examples. I simplified one to get an MLE, using rstan::optimizing instead of sampling: install.packages("rstan") library("rstan") model = stan_model("Example1.stan") fit = optimizing(model) There are also some tricks for faster/better optimization that could help in practice.
Fitting custom distributions by MLE This answer assumes $\mu$ is known. One very flexible way to get MLE's in R is to use STAN via rstan. STAN has a reputation for being an MCMC tool, but it also can estimate parameters by variational i
11,290
Fitting custom distributions by MLE
My STANswer is so complex that it's just begging for something to go wrong. Here's a simpler way: do all of your inference conditional on the (known) facts of whether each datum exceeds 0 and whether each datum exceeds $\mu$. In other words, reduce the data to: The set of observations $S_1 \equiv \{y_i: 0<x_i<\mu\}$. The set of observations $S_2 \equiv \{y_i: \mu<x_i\}$. The number of zeroes $N_0$. Let $N_1 \equiv |S_1|$ and $N_2 \equiv |S_2|$. Then maximize, separately: $(1-F_A(\mu))^{N_1} \prod_{y \in S_1} f_A(y) $ w.r.t. parameters of $f_A$. $\prod_{y \in S_2} GPD(y)$ w.r.t. parameters of your gross promestic doduct (GPD). $\pi^{N_0}(1-\pi)^{N_1 + N_2}$ w.r.t. $\pi$ . This doesn't seem to do quite what you ask because: $\mu$ must be user-specified. the GPD scale parameter is not fixed to $\frac{f_A(\mu)}{1-F_A(\mu)}$. Hopefully that part is not essential for interpretability. If it is, maybe it would be good enough to just fix $\sigma$ based on the results of bullet point 1, then optimize the remaining parameters. It's no longer a joint MLE then. There's no way to uncouple the optimization if you are really dead set on that.
Fitting custom distributions by MLE
My STANswer is so complex that it's just begging for something to go wrong. Here's a simpler way: do all of your inference conditional on the (known) facts of whether each datum exceeds 0 and whether
Fitting custom distributions by MLE My STANswer is so complex that it's just begging for something to go wrong. Here's a simpler way: do all of your inference conditional on the (known) facts of whether each datum exceeds 0 and whether each datum exceeds $\mu$. In other words, reduce the data to: The set of observations $S_1 \equiv \{y_i: 0<x_i<\mu\}$. The set of observations $S_2 \equiv \{y_i: \mu<x_i\}$. The number of zeroes $N_0$. Let $N_1 \equiv |S_1|$ and $N_2 \equiv |S_2|$. Then maximize, separately: $(1-F_A(\mu))^{N_1} \prod_{y \in S_1} f_A(y) $ w.r.t. parameters of $f_A$. $\prod_{y \in S_2} GPD(y)$ w.r.t. parameters of your gross promestic doduct (GPD). $\pi^{N_0}(1-\pi)^{N_1 + N_2}$ w.r.t. $\pi$ . This doesn't seem to do quite what you ask because: $\mu$ must be user-specified. the GPD scale parameter is not fixed to $\frac{f_A(\mu)}{1-F_A(\mu)}$. Hopefully that part is not essential for interpretability. If it is, maybe it would be good enough to just fix $\sigma$ based on the results of bullet point 1, then optimize the remaining parameters. It's no longer a joint MLE then. There's no way to uncouple the optimization if you are really dead set on that.
Fitting custom distributions by MLE My STANswer is so complex that it's just begging for something to go wrong. Here's a simpler way: do all of your inference conditional on the (known) facts of whether each datum exceeds 0 and whether
11,291
Do you have a global vision on those analysis techniques?
In terms of batch versus on-line , my experience tells me that sometimes you combine both. What I mean is that you let the heavy-lifting i.e compute intensive stuff relating to model formulation be done off-line and then employ quick/adaptive procedures to use these models. We have found that "new data" can be used in three ways; 1. to simply forecast ; 2. to revise parameters of known model and 3. to revise parameters and possibly revise model. These three approaches have been used for "live analysis" and of course the time to complete one of these three steps depends on both the software used and the hardware available. Now to your other point regarding how to model y vs x. I prefer to use an expanded version of regression ( called Transfer Functions or ARMAX Models ) as the basis of pulling out the impact of the history of y and the current and pas values of x. It is critical that one validate the Gaussian requirements and to incorporate as necessary proxies for both omitted deterministic structure ( via Outlier Detection ) and omitted stochastic structure via the ARMA component. Additionally one needs to ensure that one hasn't used too much data ( tests for parameter constancy ) and that any non-constant error variance resulting from deterministic/stochastic error variance and/or linkage between the expected value of y and the variance of the residuals. Now historically ( or hysterically if you wish ) different silos of thought have attempted to formulate approaches. Many of the ad-hoc models used by our ancestors cane be shown to be subsets of a Transfer Function but there are data sets that can be imagined which would challenge the assumptions of a Transfer Function. While these data sets may exist it should not be assumed that they will directly affect you unless analysis yields that conclusion. Texts like Wei ( Addison-Wessley ) or Box-Jenkins should provide a reasonable road-map to support my commnents and to lead you to some more "answers" By the way this is a Great Question ! Additionally if you have any data that you wish to use , I could demonstrate the various options outlined herein. Please post your data to the web for all to see and use in their efforts to relate "y to x" .
Do you have a global vision on those analysis techniques?
In terms of batch versus on-line , my experience tells me that sometimes you combine both. What I mean is that you let the heavy-lifting i.e compute intensive stuff relating to model formulation be do
Do you have a global vision on those analysis techniques? In terms of batch versus on-line , my experience tells me that sometimes you combine both. What I mean is that you let the heavy-lifting i.e compute intensive stuff relating to model formulation be done off-line and then employ quick/adaptive procedures to use these models. We have found that "new data" can be used in three ways; 1. to simply forecast ; 2. to revise parameters of known model and 3. to revise parameters and possibly revise model. These three approaches have been used for "live analysis" and of course the time to complete one of these three steps depends on both the software used and the hardware available. Now to your other point regarding how to model y vs x. I prefer to use an expanded version of regression ( called Transfer Functions or ARMAX Models ) as the basis of pulling out the impact of the history of y and the current and pas values of x. It is critical that one validate the Gaussian requirements and to incorporate as necessary proxies for both omitted deterministic structure ( via Outlier Detection ) and omitted stochastic structure via the ARMA component. Additionally one needs to ensure that one hasn't used too much data ( tests for parameter constancy ) and that any non-constant error variance resulting from deterministic/stochastic error variance and/or linkage between the expected value of y and the variance of the residuals. Now historically ( or hysterically if you wish ) different silos of thought have attempted to formulate approaches. Many of the ad-hoc models used by our ancestors cane be shown to be subsets of a Transfer Function but there are data sets that can be imagined which would challenge the assumptions of a Transfer Function. While these data sets may exist it should not be assumed that they will directly affect you unless analysis yields that conclusion. Texts like Wei ( Addison-Wessley ) or Box-Jenkins should provide a reasonable road-map to support my commnents and to lead you to some more "answers" By the way this is a Great Question ! Additionally if you have any data that you wish to use , I could demonstrate the various options outlined herein. Please post your data to the web for all to see and use in their efforts to relate "y to x" .
Do you have a global vision on those analysis techniques? In terms of batch versus on-line , my experience tells me that sometimes you combine both. What I mean is that you let the heavy-lifting i.e compute intensive stuff relating to model formulation be do
11,292
Do you have a global vision on those analysis techniques?
Breiman address this issue in "Statistical Modeling: Two Cultures". A first response to an excellent question.
Do you have a global vision on those analysis techniques?
Breiman address this issue in "Statistical Modeling: Two Cultures". A first response to an excellent question.
Do you have a global vision on those analysis techniques? Breiman address this issue in "Statistical Modeling: Two Cultures". A first response to an excellent question.
Do you have a global vision on those analysis techniques? Breiman address this issue in "Statistical Modeling: Two Cultures". A first response to an excellent question.
11,293
Do you have a global vision on those analysis techniques?
I suspect the answer to this question is something along the lines of "there is no free lunch." Perhaps the reason statisticians, computer scientists, and electrical engineers have developed different algorithms is that they're interest in solving different sorts of problems.
Do you have a global vision on those analysis techniques?
I suspect the answer to this question is something along the lines of "there is no free lunch." Perhaps the reason statisticians, computer scientists, and electrical engineers have developed different
Do you have a global vision on those analysis techniques? I suspect the answer to this question is something along the lines of "there is no free lunch." Perhaps the reason statisticians, computer scientists, and electrical engineers have developed different algorithms is that they're interest in solving different sorts of problems.
Do you have a global vision on those analysis techniques? I suspect the answer to this question is something along the lines of "there is no free lunch." Perhaps the reason statisticians, computer scientists, and electrical engineers have developed different
11,294
Do you have a global vision on those analysis techniques?
I would say that these three group you indicated are indeed only two groups: Statistics Machine learning, artificial intelligence and pattern recognition. All the branches related to signal filtering are based on two aspects: feature extraction (wavelets, Gabor and Fourier) which belongs to pattern recognition and Discrete Fourier Transformation which belongs to hard mathematics. In fact, digital filtering is more close to a engineering side as it try to solve this pattern recognition problem by means of simple and low computational cost algorithms. But essentially, it is machine learning. Moreover, Filtering, Wavelets, Gabor and Fourier are extensively used in image processing being the core of artificial vision. The difference exists between statistics and machine learning.
Do you have a global vision on those analysis techniques?
I would say that these three group you indicated are indeed only two groups: Statistics Machine learning, artificial intelligence and pattern recognition. All the branches related to signal filterin
Do you have a global vision on those analysis techniques? I would say that these three group you indicated are indeed only two groups: Statistics Machine learning, artificial intelligence and pattern recognition. All the branches related to signal filtering are based on two aspects: feature extraction (wavelets, Gabor and Fourier) which belongs to pattern recognition and Discrete Fourier Transformation which belongs to hard mathematics. In fact, digital filtering is more close to a engineering side as it try to solve this pattern recognition problem by means of simple and low computational cost algorithms. But essentially, it is machine learning. Moreover, Filtering, Wavelets, Gabor and Fourier are extensively used in image processing being the core of artificial vision. The difference exists between statistics and machine learning.
Do you have a global vision on those analysis techniques? I would say that these three group you indicated are indeed only two groups: Statistics Machine learning, artificial intelligence and pattern recognition. All the branches related to signal filterin
11,295
Random matrices with constraints on row and column length
As @cardinal said in a comment: Actually, after a little thought, I think you algorithm is exactly the Sinkhorn-Knopp algorithm with a very minor modification. Let $X$ be your original matrix and let $Y$ be a matrix of the same size such that $Y_{ij}=X^2_{ij}$. Then, your algorithm is equivalent to applying Sinkhorn-Knopp to $Y$, where at the final step you recover your desired form by taking $\hat{X}_{ij}=sgn(X_{ij})\sqrt{Y_{ij}}$. Sinkhorn-Knopp is guaranteed to converge except in quite pathological circumstances. Reading up on it should be very helpful. ...it seems that the iterative algorithm I suggested in the original question is very similar to the Sinkhorn-Knopp algorithm. Interestingly, it also seems very similar to iterative proportional fitting (IPF), which, as described on the IPF wikipedia page, is related to Newton's method and expectation maximization (all have the same limit). These iterative methods are often applied to problems which lack a closed form solution, so I will tentatively assume that the answer to the question is negative: there is no way to achieve the desired solution without row/column iteration.
Random matrices with constraints on row and column length
As @cardinal said in a comment: Actually, after a little thought, I think you algorithm is exactly the Sinkhorn-Knopp algorithm with a very minor modification. Let $X$ be your original matrix and let
Random matrices with constraints on row and column length As @cardinal said in a comment: Actually, after a little thought, I think you algorithm is exactly the Sinkhorn-Knopp algorithm with a very minor modification. Let $X$ be your original matrix and let $Y$ be a matrix of the same size such that $Y_{ij}=X^2_{ij}$. Then, your algorithm is equivalent to applying Sinkhorn-Knopp to $Y$, where at the final step you recover your desired form by taking $\hat{X}_{ij}=sgn(X_{ij})\sqrt{Y_{ij}}$. Sinkhorn-Knopp is guaranteed to converge except in quite pathological circumstances. Reading up on it should be very helpful. ...it seems that the iterative algorithm I suggested in the original question is very similar to the Sinkhorn-Knopp algorithm. Interestingly, it also seems very similar to iterative proportional fitting (IPF), which, as described on the IPF wikipedia page, is related to Newton's method and expectation maximization (all have the same limit). These iterative methods are often applied to problems which lack a closed form solution, so I will tentatively assume that the answer to the question is negative: there is no way to achieve the desired solution without row/column iteration.
Random matrices with constraints on row and column length As @cardinal said in a comment: Actually, after a little thought, I think you algorithm is exactly the Sinkhorn-Knopp algorithm with a very minor modification. Let $X$ be your original matrix and let
11,296
The cross validation (CV) and the generalized cross validation (GCV) statistics
I believe the comments are pointing at the answer, but not stating it bluntly. So I'll be blunt. The V formula cited here is specific to linear ridge regression. They don't say it is the same as PRESS, they say it is a rotation-invariant version of PRESS. The "rotation-invariant" part is what makes this generalized. Efron's paper is about logistic regression, customized to that context. If you want to see the math translation between the two contexts, the right book to read is Elements of Statistical Learning, 2ed, by Hastie, Tibshirani, and Freedman. They offer that book free, online: https://web.stanford.edu/~hastie/Papers/ESLII.pdf. Another helpful read on GCV is Generalized Additive Models by Simon Wood. His treatment integrates GCV in general with applications in regression and logistic regression. If you look at the ESL book, p 244, you see basically the same symbology. They refer to that large matrix product you have as the Smoother matrix (I'd say its a Hat matrix, or a near cousin). They describe the Smoother $S$ as the mapping from $y$ to $\hat{y}$ $$ \hat{y}=S y $$ $S$ can be used to calculate leave one out CV values, one for each row in the data. For linear models, the $S$ matrix plays the role of the Hat matrix in regression diagnostics. However, they say it may be computationally challenging or unnecessary to work that out, and the GCV approach is a slightly more general version of same idea. They offer a formula for the approximation of GCV: $$ GCV(\hat{f})=\frac{1}{N}\sum_{i=1}^{N}\left[\frac{y_i - \hat{f}(x_i)}{1-trace(S)/N}\right]^2 $$ This is quite similar in behavior to the AIC in many models. The $trace{S}$ is the effective number of parameters. The $n\lambda$ piece you quote is more generally a trace of $S$. As far as I can understand, in the abstract GCV is an approximate version of leave one out crossvalidation, but in some cases, (I believe ridge regression), it is exact. That's a main point in the Golub paper. Good luck, write back if you learn more.
The cross validation (CV) and the generalized cross validation (GCV) statistics
I believe the comments are pointing at the answer, but not stating it bluntly. So I'll be blunt. The V formula cited here is specific to linear ridge regression. They don't say it is the same as PRE
The cross validation (CV) and the generalized cross validation (GCV) statistics I believe the comments are pointing at the answer, but not stating it bluntly. So I'll be blunt. The V formula cited here is specific to linear ridge regression. They don't say it is the same as PRESS, they say it is a rotation-invariant version of PRESS. The "rotation-invariant" part is what makes this generalized. Efron's paper is about logistic regression, customized to that context. If you want to see the math translation between the two contexts, the right book to read is Elements of Statistical Learning, 2ed, by Hastie, Tibshirani, and Freedman. They offer that book free, online: https://web.stanford.edu/~hastie/Papers/ESLII.pdf. Another helpful read on GCV is Generalized Additive Models by Simon Wood. His treatment integrates GCV in general with applications in regression and logistic regression. If you look at the ESL book, p 244, you see basically the same symbology. They refer to that large matrix product you have as the Smoother matrix (I'd say its a Hat matrix, or a near cousin). They describe the Smoother $S$ as the mapping from $y$ to $\hat{y}$ $$ \hat{y}=S y $$ $S$ can be used to calculate leave one out CV values, one for each row in the data. For linear models, the $S$ matrix plays the role of the Hat matrix in regression diagnostics. However, they say it may be computationally challenging or unnecessary to work that out, and the GCV approach is a slightly more general version of same idea. They offer a formula for the approximation of GCV: $$ GCV(\hat{f})=\frac{1}{N}\sum_{i=1}^{N}\left[\frac{y_i - \hat{f}(x_i)}{1-trace(S)/N}\right]^2 $$ This is quite similar in behavior to the AIC in many models. The $trace{S}$ is the effective number of parameters. The $n\lambda$ piece you quote is more generally a trace of $S$. As far as I can understand, in the abstract GCV is an approximate version of leave one out crossvalidation, but in some cases, (I believe ridge regression), it is exact. That's a main point in the Golub paper. Good luck, write back if you learn more.
The cross validation (CV) and the generalized cross validation (GCV) statistics I believe the comments are pointing at the answer, but not stating it bluntly. So I'll be blunt. The V formula cited here is specific to linear ridge regression. They don't say it is the same as PRE
11,297
When are zero-correlation mixed models theoretically sound?
The answer to this question turns out to be rather definitional. If one shifted the coordinates of the independent variables of a ZCP model and allowed correlations to develop in an unconstrained manner, predictions would not change, because linear mixed effects models with unconstrained correlations are translation invariant (one can show this with a bit of math). But, by definition, a ZCP model has correlations constrained to $0$. On shifting coordinates, correlations would not be allowed to develop as required in an unconstrained LME model. Therefore, ZCP models are not translation invariant, and a coordinate shift would change model predictions. And (if you expect LME models to be translation invariant to sensible coordinate shifts) only models in which such coordinate shifts don't make sense are theoretically sensible as ZCP models (i.e., the 'special' ones mentioned in the third paragraph of the paraphrase of Bates et al above). [Note: I will embellish this answer in the future to include formulas I have derived for the correlation that develops when coordinate-shifting an initially ZCP model, and for the proof that LME models with unconstrained correlations are translation invariant.] Bates et al's result is simply a typo. The answer, $\delta$, must have the same dimensions as the predictor, $x$ (Days), which is shifted. Since, w.l.o.g., $\sigma_{intercept}$ and $\rho$ can be considered to have dimensions of unity, $\sigma_{slope}$, which has dimensions $1/x$ (the same dimensions as $slope$), must be in the denominator in order for $\delta$ to have the correct dimensions.
When are zero-correlation mixed models theoretically sound?
The answer to this question turns out to be rather definitional. If one shifted the coordinates of the independent variables of a ZCP model and allowed correlations to develop in an unconstrained man
When are zero-correlation mixed models theoretically sound? The answer to this question turns out to be rather definitional. If one shifted the coordinates of the independent variables of a ZCP model and allowed correlations to develop in an unconstrained manner, predictions would not change, because linear mixed effects models with unconstrained correlations are translation invariant (one can show this with a bit of math). But, by definition, a ZCP model has correlations constrained to $0$. On shifting coordinates, correlations would not be allowed to develop as required in an unconstrained LME model. Therefore, ZCP models are not translation invariant, and a coordinate shift would change model predictions. And (if you expect LME models to be translation invariant to sensible coordinate shifts) only models in which such coordinate shifts don't make sense are theoretically sensible as ZCP models (i.e., the 'special' ones mentioned in the third paragraph of the paraphrase of Bates et al above). [Note: I will embellish this answer in the future to include formulas I have derived for the correlation that develops when coordinate-shifting an initially ZCP model, and for the proof that LME models with unconstrained correlations are translation invariant.] Bates et al's result is simply a typo. The answer, $\delta$, must have the same dimensions as the predictor, $x$ (Days), which is shifted. Since, w.l.o.g., $\sigma_{intercept}$ and $\rho$ can be considered to have dimensions of unity, $\sigma_{slope}$, which has dimensions $1/x$ (the same dimensions as $slope$), must be in the denominator in order for $\delta$ to have the correct dimensions.
When are zero-correlation mixed models theoretically sound? The answer to this question turns out to be rather definitional. If one shifted the coordinates of the independent variables of a ZCP model and allowed correlations to develop in an unconstrained man
11,298
State of art streaming learning
A rigorous survey of multiple algorithms similar to the Delgado paper you linked is not available as far as I know, but there have been efforts to gather results for families of algorithms. Here are some sources I find useful (disclaimer: I publish in the area, so it's likely I'm biased in my selection): A survey on Ensemble Learning for Data Stream Classification (Survey) Online Learning and Online Convex Optimization (Technical Report) Online Machine Learning in Big Data Streams (Survey) Machine Learning for Data Streams (Book) Algorithms for Learning Regression Trees and Ensembles on Evolving Data Streams (PhD Thesis) Learning under Concept Drift: an Overview (Survey) Optimal and Adaptive Online Learning (PhD Thesis) Adaptive Learning and Mining for Data Streams and Frequent Patterns (PhD Thesis) Some sofware packages: MOA and SAMOA scikit-multiflow Jubatus LIB(S)OL StreamDM I can add more info and sources if needed. As others have said the field could use a comprehensive survey.
State of art streaming learning
A rigorous survey of multiple algorithms similar to the Delgado paper you linked is not available as far as I know, but there have been efforts to gather results for families of algorithms. Here are s
State of art streaming learning A rigorous survey of multiple algorithms similar to the Delgado paper you linked is not available as far as I know, but there have been efforts to gather results for families of algorithms. Here are some sources I find useful (disclaimer: I publish in the area, so it's likely I'm biased in my selection): A survey on Ensemble Learning for Data Stream Classification (Survey) Online Learning and Online Convex Optimization (Technical Report) Online Machine Learning in Big Data Streams (Survey) Machine Learning for Data Streams (Book) Algorithms for Learning Regression Trees and Ensembles on Evolving Data Streams (PhD Thesis) Learning under Concept Drift: an Overview (Survey) Optimal and Adaptive Online Learning (PhD Thesis) Adaptive Learning and Mining for Data Streams and Frequent Patterns (PhD Thesis) Some sofware packages: MOA and SAMOA scikit-multiflow Jubatus LIB(S)OL StreamDM I can add more info and sources if needed. As others have said the field could use a comprehensive survey.
State of art streaming learning A rigorous survey of multiple algorithms similar to the Delgado paper you linked is not available as far as I know, but there have been efforts to gather results for families of algorithms. Here are s
11,299
How to create a multivariate Brownian Bridge?
As you already pointed out in the comments, the question reduces to simulating a Brownian sheet. This can be done by generalizing simulation of Brownian motion in a straightforward way. To simulating the Brownian motion, one can take an i.i.d. mean-0 variance-1 time series $W_i$, $i = 1, 2, \cdots$, and construct the normalized partial sum process $$ X_n(t) = \frac{1}{\sqrt{n}} \sum_{i = 1}^{[nt]} W_i. $$ As $n \rightarrow \infty$, $X_n$ convergence weakly (in the sense of Borel probability measures on a metric space) to the standard Brownian $B$ on the Skorohod space $D[0,1]$. The i.i.d. with finite second moment case is the simplest way to simulate. The mathematical result (Functional Central Limit Theorem/Donsker's Theorem/Invariance Principle) holds in much greater generality. Now to simulating the (say, two-dimensional) Brownian sheet, takes i.i.d. mean-0 variance-1 array $W_{ij}$, $i,j = 1, 2, \cdots$, and construct the normalized partial sum process $$ X_n(t_1, t_2) = \frac{1}{ n } \sum_{1 \leq i \leq [nt_1] , 1 \leq j \leq [nt_2]} W_{ij}. $$ As $n \rightarrow \infty$, $X_n$ convergence weakly to the standard Brownian sheet on the Skorohod space $D([0,1]^2)$ on the unit square. (The proof is a standard weak convergence argument: Convergence of finite dimensional distribution follows from the Levy-Lindeberg CLT. Tightness on $D([0,1]^2)$ follows from a sufficient moment condition that holds trivially in the i.i.d. finite second moment case---see, e.g. Bickel and Wichura (1971). ) Then, by the continuous mapping theorem $$ X_n(t_1, t_2) - \prod_{j=1}^2 t_j X_n(t_1, t_2) $$ converges weakly to the two-dimensional Brownian bridge.
How to create a multivariate Brownian Bridge?
As you already pointed out in the comments, the question reduces to simulating a Brownian sheet. This can be done by generalizing simulation of Brownian motion in a straightforward way. To simulating
How to create a multivariate Brownian Bridge? As you already pointed out in the comments, the question reduces to simulating a Brownian sheet. This can be done by generalizing simulation of Brownian motion in a straightforward way. To simulating the Brownian motion, one can take an i.i.d. mean-0 variance-1 time series $W_i$, $i = 1, 2, \cdots$, and construct the normalized partial sum process $$ X_n(t) = \frac{1}{\sqrt{n}} \sum_{i = 1}^{[nt]} W_i. $$ As $n \rightarrow \infty$, $X_n$ convergence weakly (in the sense of Borel probability measures on a metric space) to the standard Brownian $B$ on the Skorohod space $D[0,1]$. The i.i.d. with finite second moment case is the simplest way to simulate. The mathematical result (Functional Central Limit Theorem/Donsker's Theorem/Invariance Principle) holds in much greater generality. Now to simulating the (say, two-dimensional) Brownian sheet, takes i.i.d. mean-0 variance-1 array $W_{ij}$, $i,j = 1, 2, \cdots$, and construct the normalized partial sum process $$ X_n(t_1, t_2) = \frac{1}{ n } \sum_{1 \leq i \leq [nt_1] , 1 \leq j \leq [nt_2]} W_{ij}. $$ As $n \rightarrow \infty$, $X_n$ convergence weakly to the standard Brownian sheet on the Skorohod space $D([0,1]^2)$ on the unit square. (The proof is a standard weak convergence argument: Convergence of finite dimensional distribution follows from the Levy-Lindeberg CLT. Tightness on $D([0,1]^2)$ follows from a sufficient moment condition that holds trivially in the i.i.d. finite second moment case---see, e.g. Bickel and Wichura (1971). ) Then, by the continuous mapping theorem $$ X_n(t_1, t_2) - \prod_{j=1}^2 t_j X_n(t_1, t_2) $$ converges weakly to the two-dimensional Brownian bridge.
How to create a multivariate Brownian Bridge? As you already pointed out in the comments, the question reduces to simulating a Brownian sheet. This can be done by generalizing simulation of Brownian motion in a straightforward way. To simulating
11,300
Wavelet-domain Gaussian processes: what is the covariance?
The driving process, white noise η(t), is independent of the choice of basis. In a CWT (unlike DWT jumping in octaves) there is some redundancy, narrow wavebands do overlap. The "feature" being tested for significance is a variance (power) observed in a narrow frequency over a short time. This clearly does depend mathematically on the chosen wavelet but not very much - narrower bandwidth can detect more slowly changing features with greater sensitivity, wider bandwidth is more responsive but has noisier background and is less specific. As this measures wavelet space it's integrated over wavelet's duration, the transform you've written would be for any "point in time". Generally one needs phase information to invert the CWT. Maraun's test is essentially Chi-squared in power. No. Maraun depends on signal to noise in a frequency band over a time range, this could have many different realisations in noise space and is phase independent. It is sensitive to an AR(1) signal in wavelet domain at a specific frequency, i.e oscillation sustained over time, e.g. CWT domain will tend to suppress an isolated spike in broadband noise.
Wavelet-domain Gaussian processes: what is the covariance?
The driving process, white noise η(t), is independent of the choice of basis. In a CWT (unlike DWT jumping in octaves) there is some redundancy, narrow wavebands do overlap. The "feature" being teste
Wavelet-domain Gaussian processes: what is the covariance? The driving process, white noise η(t), is independent of the choice of basis. In a CWT (unlike DWT jumping in octaves) there is some redundancy, narrow wavebands do overlap. The "feature" being tested for significance is a variance (power) observed in a narrow frequency over a short time. This clearly does depend mathematically on the chosen wavelet but not very much - narrower bandwidth can detect more slowly changing features with greater sensitivity, wider bandwidth is more responsive but has noisier background and is less specific. As this measures wavelet space it's integrated over wavelet's duration, the transform you've written would be for any "point in time". Generally one needs phase information to invert the CWT. Maraun's test is essentially Chi-squared in power. No. Maraun depends on signal to noise in a frequency band over a time range, this could have many different realisations in noise space and is phase independent. It is sensitive to an AR(1) signal in wavelet domain at a specific frequency, i.e oscillation sustained over time, e.g. CWT domain will tend to suppress an isolated spike in broadband noise.
Wavelet-domain Gaussian processes: what is the covariance? The driving process, white noise η(t), is independent of the choice of basis. In a CWT (unlike DWT jumping in octaves) there is some redundancy, narrow wavebands do overlap. The "feature" being teste