refactor set_class_weight, make unstructured models have new interface.