I removed sample_weight from this function.