DayF core  1.2.1.2
DayF (Decision at your Fingertips) is an AutoML freeware development framework that let developers works with Machine Learning models without any idea of AI, simply taking a csv dataset and the objective column
Public Member Functions | Public Attributes | List of all members
gdayf.handlers.h2ohandler.H2OHandler Class Reference
Inheritance diagram for gdayf.handlers.h2ohandler.H2OHandler:
Inheritance graph
[legend]
Collaboration diagram for gdayf.handlers.h2ohandler.H2OHandler:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, e_c)
 Constructor Initialize all framework variables and starts or connect to h2o cluster Aditionally starts PersistenceHandler and logsHandler. More...
 
def __del__ (self)
 Destructor.
 
def shutdown_cluster (cls)
 Class Method for cluster shutdown. More...
 
def connect (self)
 Connexion_method to cluster If cluster is up connect to cluster on another case start a cluster. More...
 
def is_alive (self)
 Is alive_connection method.
 
def get_external_model (self, ar_metadata, type)
 Generate java model class_. More...
 
def delete_frames (self)
 Remove used dataframes during analysis execution_. More...
 
def generate_base_path (self, base_ar, type_)
 Generate base path to store all files [models, logs, json] relative to it. More...
 
def get_metric (self, algorithm_description, metric, source)
 Get one especific metric for execution metrics Not tested yet. More...
 
def need_factor (self, atype, objective_column, training_frame=None, valid_frame=None, predict_frame=None)
 Auxiliary Method to convert numerical and string columns on H2OFrame to enum (factor) for classification analysis Returns H2OFrames modified if apply for classification objectives. More...
 
def execute_normalization (self, dataframe, base_ns, model_id, filtering='NONE', exist_objective=True)
 Method to execute normalizations base on params. More...
 
def order_training (self, training_pframe, base_ar, kwargs)
 Main method to execute sets of analysis and normalizations base on params. More...
 
def store_model (self, armetadata)
 Method to save model to persistence layer from armetadata. More...
 
def load_model (self, armetadata)
 Method to load model from persistence layer by armetadata. More...
 
def predict (self, predict_frame, base_ar, kwargs)
 Main method to execute predictions over traning models Take the ar.json for and execute predictions including its metrics a storage paths. More...
 
def remove_memory_models (self, arlist)
 Method to remove list of model from server. More...
 
def remove_models (self, arlist)
 Method to remove list of model from server. More...
 

Public Attributes

 localfs
 
 hdfs
 
 mongoDB
 
 primary_path
 
 url
 
 nthreads
 
 ice_root
 
 max_mem_size
 
 start_h2o
 

Detailed Description

Definition at line 74 of file h2ohandler.py.

Constructor & Destructor Documentation

◆ __init__()

def gdayf.handlers.h2ohandler.H2OHandler.__init__ (   self,
  e_c 
)

Constructor Initialize all framework variables and starts or connect to h2o cluster Aditionally starts PersistenceHandler and logsHandler.

Parameters
e_ccontext pointer

Definition at line 80 of file h2ohandler.py.

Member Function Documentation

◆ connect()

def gdayf.handlers.h2ohandler.H2OHandler.connect (   self)

Connexion_method to cluster If cluster is up connect to cluster on another case start a cluster.

Returns
initiatiated True/False

Definition at line 124 of file h2ohandler.py.

◆ delete_frames()

def gdayf.handlers.h2ohandler.H2OHandler.delete_frames (   self)

Remove used dataframes during analysis execution_.

Parameters
selfobject pointer

Definition at line 281 of file h2ohandler.py.

◆ execute_normalization()

def gdayf.handlers.h2ohandler.H2OHandler.execute_normalization (   self,
  dataframe,
  base_ns,
  model_id,
  filtering = 'NONE',
  exist_objective = True 
)

Method to execute normalizations base on params.

Parameters
selfobject pointer
dataframepandas dataframe
base_nsNormalizationMetadata orderedDict() compatible
model_idbase model identificator
filteringSTANDARDIZE if standardize filtering rules need to be applied or DROP drop_columns filtering rules need to be applied
exist_objectiveTrue if exist False if not
Returns
(Dataframe, DFMetadata, Hash_value, True/False, base_ns)

Definition at line 701 of file h2ohandler.py.

Here is the caller graph for this function:

◆ generate_base_path()

def gdayf.handlers.h2ohandler.H2OHandler.generate_base_path (   self,
  base_ar,
  type_ 
)

Generate base path to store all files [models, logs, json] relative to it.

Parameters
selfobject pointer
base_arinitial ar.json template pass to object instance
type_type of analysis to execute
Returns
base path string

Definition at line 295 of file h2ohandler.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_external_model()

def gdayf.handlers.h2ohandler.H2OHandler.get_external_model (   self,
  ar_metadata,
  type 
)

Generate java model class_.

Parameters
selfobject pointer
ar_metadataArMetadata stored model
type['pojo', 'mojo']
Returns
download_path, MD5 hash_key

Definition at line 176 of file h2ohandler.py.

Here is the call graph for this function:

◆ get_metric()

def gdayf.handlers.h2ohandler.H2OHandler.get_metric (   self,
  algorithm_description,
  metric,
  source 
)

Get one especific metric for execution metrics Not tested yet.

Parameters
algorithm_description(subclass executionmetricscollection) or compatible OrderedDict()
metricString metric key name
source[train, val, xval] @ return (Variable) metrics value or String "Not Found"

Definition at line 641 of file h2ohandler.py.

◆ load_model()

def gdayf.handlers.h2ohandler.H2OHandler.load_model (   self,
  armetadata 
)

Method to load model from persistence layer by armetadata.

Parameters
armetadatastructure to be stored return armetadata if model loaded successfully or None if not loaded

Definition at line 1186 of file h2ohandler.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ need_factor()

def gdayf.handlers.h2ohandler.H2OHandler.need_factor (   self,
  atype,
  objective_column,
  training_frame = None,
  valid_frame = None,
  predict_frame = None 
)

Auxiliary Method to convert numerical and string columns on H2OFrame to enum (factor) for classification analysis Returns H2OFrames modified if apply for classification objectives.

Parameters
atypeString in ATypeMetadata().get_artypes(cls)
objective_columnString Column Objective
training_frameH2OFrame for training (optional)
valid_frameH2OFrame for validation (optional)
predict_frameH2OFrame for prediction (optional)

Definition at line 660 of file h2ohandler.py.

Here is the caller graph for this function:

◆ order_training()

def gdayf.handlers.h2ohandler.H2OHandler.order_training (   self,
  training_pframe,
  base_ar,
  kwargs 
)

Main method to execute sets of analysis and normalizations base on params.

Parameters
selfobject pointer
training_pframepandas.DataFrame
base_arar_template.json
**kwargsextra arguments
Returns
(String, ArMetadata) equivalent to (analysis_id, analysis_results)

Definition at line 733 of file h2ohandler.py.

Here is the call graph for this function:

◆ predict()

def gdayf.handlers.h2ohandler.H2OHandler.predict (   self,
  predict_frame,
  base_ar,
  kwargs 
)

Main method to execute predictions over traning models Take the ar.json for and execute predictions including its metrics a storage paths.

Parameters
selfobject pointer
predict_framepandas.DataFrame
base_arArMetadata or compatible tuple (OrderedDict(), OrderedDict())
**kwargsextra arguments
Returns
(String, [ArMetadata]) equivalent to (analysis_id, List[analysis_results])

Definition at line 1206 of file h2ohandler.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_memory_models()

def gdayf.handlers.h2ohandler.H2OHandler.remove_memory_models (   self,
  arlist 
)

Method to remove list of model from server.

Parameters
arlistList of ArMetadata
Returns
remove_fails True/False

Definition at line 1456 of file h2ohandler.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_models()

def gdayf.handlers.h2ohandler.H2OHandler.remove_models (   self,
  arlist 
)

Method to remove list of model from server.

Parameters
arlistList of ArMetadata
Returns
remove_fails True/False

Definition at line 1475 of file h2ohandler.py.

Here is the call graph for this function:

◆ shutdown_cluster()

def gdayf.handlers.h2ohandler.H2OHandler.shutdown_cluster (   cls)

Class Method for cluster shutdown.

Parameters
clsclass pointer

Definition at line 115 of file h2ohandler.py.

◆ store_model()

def gdayf.handlers.h2ohandler.H2OHandler.store_model (   self,
  armetadata 
)

Method to save model to persistence layer from armetadata.

Parameters
armetadatastructure to be stored return saved_model (True/False)

Definition at line 1125 of file h2ohandler.py.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: