| 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:
[legend]
Collaboration diagram for gdayf.handlers.h2ohandler.H2OHandler:
[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_c | context 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

  self | object 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

  self | object pointer
  dataframe | pandas dataframe
  base_ns | NormalizationMetadata orderedDict() compatible
  model_id | base model identificator
  filtering | STANDARDIZE if standardize filtering rules need to be applied or DROP drop_columns filtering rules need to be applied
  exist_objective | True 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

  self | object pointer
  base_ar | initial 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

  self | object pointer
  ar_metadata | ArMetadata 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()
  metric | String 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

  armetadata | structure 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

  atype | String in ATypeMetadata().get_artypes(cls)
  objective_column | String Column Objective
  training_frame | H2OFrame for training (optional)
  valid_frame | H2OFrame for validation (optional)
  predict_frame | H2OFrame 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

  self | object pointer
  training_pframe | pandas.DataFrame
  base_ar | ar_template.json
  **kwargs | extra 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

  self | object pointer
  predict_frame | pandas.DataFrame
  base_ar | ArMetadata or compatible tuple (OrderedDict(), OrderedDict())
  **kwargs | extra 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

  arlist | List 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

  arlist | List 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

  cls | class 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

  armetadata | structure 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:

- D:/OneDrive/DayF/git/gdayf-core/src/gdayf/handlers/h2ohandler.py