- added a learn() method that does linear regression