Conditional Density Estimation via Weighted Logistic Regressions