Fit Method In Python Class