Learning from Data of Variable Quality