Learning in a double-phase cobweb model