Modified classifier.py so that it is general enough to take clf from any classifier