fix bug in regression.py