Ridge regression now uses compute_class_weight()

Closes issue #1494.