$G$-Mapper: Learning a Cover in the Mapper Construction