infer min,max domain from data
infer categories, too