Logistics Regression Using Python Dictionaries