Alternating Projections for Learning with Expectation Constraints