Updated regression.py and documentation