class_docstr: This table contains the base learner origins of the Xcessiv notebook
class_docstr_tok: ["This","table","contains","the","base","learner","origins","of","the","Xcessiv","notebook"]
docstr: Generates a Python file with the importable base learner set to ``hyperparameters``
  
   This function generates a Python file in the specified file path that contains
   the base learner as an importable variable stored in ``base_learner``. The base
   learner will be set to the appropriate  hyperparameters through ``set_params``.
  
  Args:
      filepath (str, unicode): File path to save file in
  
      hyperparameters (dict): Dictionary to use for ``set_params``
docstr_tok: ["Generates","a","Python","file","with","the","importable","base","learner","set","to","``","hyperparameters","``","This","function","generates","a","Python","file","in","the","specified","file","path","that","contains","the","base","learner","as","an","importable","variable","stored","in","``","base_learner","``",".","The","base","learner","will","be","set","to","the","appropriate","hyperparameters","through","``","set_params","``",".","Args",":","filepath","(","str",",","unicode",")",":","File","path","to","save","file","in","hyperparameters","(","dict",")",":","Dictionary","to","use","for","``","set_params","``"]
code: def export_as_file(self, filepath, hyperparameters):
      """Generates a Python file with the importable base learner set to ``hyperparameters``
  
       This function generates a Python file in the specified file path that contains
       the base learner as an importable variable stored in ``base_learner``. The base
       learner will be set to the appropriate  hyperparameters through ``set_params``.
  
      Args:
          filepath (str, unicode): File path to save file in
  
          hyperparameters (dict): Dictionary to use for ``set_params``
      """
      if not filepath.endswith(".py"):
          filepath += ".py"
  
      file_contents = ""
      file_contents += self.source
      file_contents += "\n\nbase_learner.set_params(**{})\n".format(
          hyperparameters
      )
      file_contents += '\nmeta_feature_generator = "{}"\n'.format(
          self.meta_feature_generator
      )
      with open(filepath, "wb") as f:
          f.write(file_contents.encode("utf8"))
  
imports: from __future__ import absolute_import, print_function, division, unicode_literals
  import random
  import string
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy import Column, Text, Integer, Boolean, TypeDecorator, ForeignKey, Table, UniqueConstraint
  from sqlalchemy.orm import relationship
  from sqlalchemy.ext import mutable
  import numpy
  import json
  import os
  from sklearn.model_selection import train_test_split
  from xcessiv import constants
  from xcessiv import exceptions
  from xcessiv import functions
  from xcessiv import app
label_desc: Use image node_id 5 for calling the BaseLearnerOrigin obj's underlying member method code with example usage: obj.export_as_file(filepath, hyperparameters) without return types