Refactor initialize_machine_learner method in twitter_api.rb