mobeets / nullSpaceControl

1 stars 0 forks source link

conditional nonparametric hypothesis #114

Closed mobeets closed 8 years ago

mobeets commented 8 years ago

instead of fitting multivariate normals, fit some sort of nonparametric density estimator

we want to do this to handle to skew for some of the distributions

mobeets commented 8 years ago

the problem is that once we have a density estimate, we want the conditional density.

mobeets commented 8 years ago

sampling from:

Sampling from a kernel density estimate There are times when one wants to draw a random sample from the estimated distribution. This is easy with kernel density estimates, because each kernel is itself a probability density, generally a very tractable one. The general pattern goes as follows. Suppose the kernel is Gaussian, that we have scalar observations x1, x2, . . . xn, and the selected bandwidth is h. Then we pick an integer uniformly at random from 1 to n, and invoke rnorm(1,x[i],h). 4 Using a different kernel, we’d just need to use the random number generator function for the corresponding distribution.

src: http://www.stat.cmu.edu/~cshalizi/350/lectures/28/lecture-28.pdf also: http://stats.stackexchange.com/questions/43674/simple-sampling-method-for-a-kernel-density-estimator

mobeets commented 8 years ago

currently reading peter hall paper on conditional kernel density estimation: "Cross-Validation and the Estimation of Conditional Probability Densities"

and:

also: https://scholar.google.com/scholar?hl=en&q=conditional+kernel+density&btnG=&as_sdt=1%2C44&as_sdtp=

mobeets commented 8 years ago

screen shot 2016-04-07 at 7 49 17 pm

mobeets commented 8 years ago

(L, by the way, is just another kernel, and they're assuming Y is univariate.)

So m is just an estimate of p(X) (the marginal), and f(X,Y) is the joint. the conditional p(y|X=x) is joint over marginal. so estimating the conditional distribution is just made up estimating those two components.

mobeets commented 8 years ago

note, however, that this method is biased for predicting the conditional mean, so there's a two-step estimation procedure given in "Estimating and Visualizing Conditional Densities"

basically for a given X=x, you estimate E[Y | X=x] and then do the above conditional distribution kernel estimation on the zero-mean Ys: Y_i - E[Y | X=x]

mobeets commented 8 years ago

and the Hall paper gives a loss function to use for doing cross-validation to pick the bandwidth parameter

mobeets commented 8 years ago

(another paper mentions the conditional mean step being unnecessary in their case.)

mobeets commented 8 years ago

actually, not gonna do this anymore, because from #112 i can see that actually, things look very gaussian once you condition on thetaGrp