Class: PythonModel
- Inherits:
-
ScoutModel
- Object
- ScoutModel
- PythonModel
- Defined in:
- lib/scout/model/python/base.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ScoutModel
Instance Method Summary collapse
-
#initialize(dir, python_class = nil, python_module = nil, options = nil) ⇒ PythonModel
constructor
A new instance of PythonModel.
Methods inherited from ScoutModel
#add, #add_list, #eval, #eval_list, #execute, #extract_features, #extract_features_list, #init, #load_method, #load_options, #load_ruby_code, #load_state, #post_process, #post_process_list, #restore, #save, #save_method, #save_options, #save_state, #state_file, #train
Constructor Details
#initialize(dir, python_class = nil, python_module = nil, options = nil) ⇒ PythonModel
Returns a new instance of PythonModel.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/scout/model/python/base.rb', line 5 def initialize(dir, python_class = nil, python_module = nil, = nil) , python_module = python_module, :model if .nil? && Hash === python_module = {} if .nil? [:python_class] = python_class if python_class [:python_module] = python_module if python_module super(dir, ) if [:python_class] self.init do ScoutPython.add_path Scout.python.find(:lib) ScoutPython.add_path directory ScoutPython.init_scout ScoutPython.class_new_obj([:python_module], [:python_class], **.except(:python_class, :python_module)) end end end |