On data-driven chance constraint learning for mixed-integer optimization problems