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.core.controller.Controller Class Reference

Core class oriented to manage the comunication and execution messages pass for all components on system orchestrating the execution of actions activities (train and prediction) on specific frameworks. More...

Inheritance diagram for gdayf.core.controller.Controller:
Inheritance graph
[legend]
Collaboration diagram for gdayf.core.controller.Controller:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, e_c=None, user_id='PoC_gDayF', workflow_id='default')
 Constructor.
 
def config_checks (self)
 Method leading configurations coherence checks. More...
 
def exec_prediction (self, datapath, armetadata=None, model_file=None)
 Method leading and controlling prediction's executions on all frameworks. More...
 
def clean_handler (self, fw)
 Method focus on cleaning handler objects. More...
 
def init_handler (self, fw)
 Method oriented to init handler objects. More...
 
def clean_handlers (self)
 Method oriented to shutdown localClusters.
 
def exec_analysis (self, datapath, objective_column, amode=POC, metric='test_accuracy', deep_impact=3, kwargs)
 Method leading and controlling analysis's executions on all frameworks. More...
 
def log_model_list (self, ar_list, metric)
 Method oriented to log leaderboard against selected metrics. More...
 
def table_model_list (self, ar_list, metric)
 Method oriented to log leaderboard against selected metrics on dataframe. More...
 
def exec_sanalysis (self, datapath, list_ar_metadata, metric='combined_accuracy', deep_impact=1, kwargs)
 Method leading and controlling analysis's executions on specific analysis. More...
 
def get_external_model (self, armetadata, type='pojo')
 Method leading and controlling coversion to java model. More...
 
def save_models (self, arlist, mode=BEST, metric='accuracy')
 Method leading and controlling model savings. More...
 
def load_models (self, arlist)
 Method leading and controlling model loads. More...
 
def remove_models (self, arlist, mode=ALL)
 Method leading and controlling model removing from server. More...
 
def reconstruct_execution_tree (self, arlist=None, metric='combined', store=True)
 Method oriented to generate execution tree for visualizations and analysis issues. More...
 
def priorize_list (self, arlist, metric)
 Method oriented to priorize ARlist. More...
 
def get_ar_from_engine (self, path)
 Method base to get an ArMetadata Structure from file. More...
 

Public Attributes

 timestamp
 
 analysis_list
 
 model_handler
 
 adviser
 

Detailed Description

Core class oriented to manage the comunication and execution messages pass for all components on system orchestrating the execution of actions activities (train and prediction) on specific frameworks.

Definition at line 41 of file controller.py.

Member Function Documentation

◆ clean_handler()

def gdayf.core.controller.Controller.clean_handler (   self,
  fw 
)

Method focus on cleaning handler objects.

Parameters
fwframework

Definition at line 276 of file controller.py.

Here is the caller graph for this function:

◆ config_checks()

def gdayf.core.controller.Controller.config_checks (   self)

Method leading configurations coherence checks.

Parameters
selfobject pointer
Returns
True if OK / False if wrong

Definition at line 66 of file controller.py.

Here is the call graph for this function:

◆ exec_analysis()

def gdayf.core.controller.Controller.exec_analysis (   self,
  datapath,
  objective_column,
  amode = POC,
  metric = 'test_accuracy',
  deep_impact = 3,
  kwargs 
)

Method leading and controlling analysis's executions on all frameworks.

Parameters
selfobject pointer
datapathString Path indicating file to be analyzed or DataFrame
objective_columnstring indicating objective column
amodeAnalysis mode of execution [0,1,2,3,4,5,6]
metricto evalute models ['train_accuracy', 'train_rmse', 'test_accuracy', 'combined_accuracy', 'test_rmse', 'cdistance']
deep_impactdeep analysis
Returns
status, adviser.analysis_recommendation_order

Definition at line 321 of file controller.py.

Here is the call graph for this function:

◆ exec_prediction()

def gdayf.core.controller.Controller.exec_prediction (   self,
  datapath,
  armetadata = None,
  model_file = None 
)

Method leading and controlling prediction's executions on all frameworks.

Parameters
selfobject pointer
datapathString Path indicating file to be analyzed or Dataframe
armetadata
model_fileString Path indicating model_file ArMetadata.json structure

Definition at line 211 of file controller.py.

Here is the call graph for this function:

◆ exec_sanalysis()

def gdayf.core.controller.Controller.exec_sanalysis (   self,
  datapath,
  list_ar_metadata,
  metric = 'combined_accuracy',
  deep_impact = 1,
  kwargs 
)

Method leading and controlling analysis's executions on specific analysis.

Parameters
selfobject pointer
datapathString Path indicating file to be analyzed or DataFrame
list_ar_metadatalist of models to execute
metricto evalute models
deep_impactdeep analysis
Returns
status, adviser.analysis_recommendation_order

Definition at line 554 of file controller.py.

Here is the call graph for this function:

◆ get_ar_from_engine()

def gdayf.core.controller.Controller.get_ar_from_engine (   self,
  path 
)

Method base to get an ArMetadata Structure from file.

Parameters
selfobject pointer
pathFilePath
Returns
operation status (0 success /1 error, ArMetadata/None)

Definition at line 834 of file controller.py.

◆ get_external_model()

def gdayf.core.controller.Controller.get_external_model (   self,
  armetadata,
  type = 'pojo' 
)

Method leading and controlling coversion to java model.

Parameters
selfobject pointer
armetadataArmetada object
typebase type if is possible
Returns
download_path, hash MD5 key

Definition at line 647 of file controller.py.

Here is the call graph for this function:

◆ init_handler()

def gdayf.core.controller.Controller.init_handler (   self,
  fw 
)

Method oriented to init handler objects.

Parameters
fwframework

Definition at line 283 of file controller.py.

Here is the caller graph for this function:

◆ load_models()

def gdayf.core.controller.Controller.load_models (   self,
  arlist 
)

Method leading and controlling model loads.

Parameters
selfobject pointer
arlistList of armetadata
Returns
list of ar_descriptors of models correctly loaded

Definition at line 688 of file controller.py.

Here is the call graph for this function:

◆ log_model_list()

def gdayf.core.controller.Controller.log_model_list (   self,
  ar_list,
  metric 
)

Method oriented to log leaderboard against selected metrics.

Parameters
ar_listList of AR models Execution Data
metricto execute order ['train_accuracy', 'train_rmse', 'test_accuracy', 'combined_accuracy', 'test_rmse', 'cdistance']

Definition at line 447 of file controller.py.

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

◆ priorize_list()

def gdayf.core.controller.Controller.priorize_list (   self,
  arlist,
  metric 
)

Method oriented to priorize ARlist.

Parameters
selfobject pointer
analysis_id
arlistPriorized ArMetadata list
metric['accuracy', 'combined', 'test_accuracy', 'rmse']
Returns
OrderedDict() with execution tree data Analysis

Definition at line 824 of file controller.py.

Here is the caller graph for this function:

◆ reconstruct_execution_tree()

def gdayf.core.controller.Controller.reconstruct_execution_tree (   self,
  arlist = None,
  metric = 'combined',
  store = True 
)

Method oriented to generate execution tree for visualizations and analysis issues.

Parameters
arlistPriorized ArMetadata list
metric['accuracy', 'combined', 'test_accuracy', 'rmse']
storeTrue/False
experimentanalysys_id for mongoDB recovery
useruser_id for mongoDB recovery
Returns
OrderedDict() with execution tree data Analysis

Definition at line 740 of file controller.py.

Here is the call graph for this function:

◆ remove_models()

def gdayf.core.controller.Controller.remove_models (   self,
  arlist,
  mode = ALL 
)

Method leading and controlling model removing from server.

Parameters
selfobject pointer
modeto be keeped in memory [BEST, BEST_3, EACH_BEST, ALL,NONE]
arlistList of armetadata

Definition at line 704 of file controller.py.

Here is the call graph for this function:

◆ save_models()

def gdayf.core.controller.Controller.save_models (   self,
  arlist,
  mode = BEST,
  metric = 'accuracy' 
)

Method leading and controlling model savings.

Parameters
selfobject pointer
mode[BEST, BEST_3, EACH_BEST, ALL]
arlistList of armetadata
metric['accuracy', 'combined', 'test_accuracy', 'rmse']

Definition at line 659 of file controller.py.

Here is the call graph for this function:

◆ table_model_list()

def gdayf.core.controller.Controller.table_model_list (   self,
  ar_list,
  metric 
)

Method oriented to log leaderboard against selected metrics on dataframe.

Parameters
analysis_id
ar_listList of AR models Execution Data
metricto execute order ['train_accuracy', 'train_rmse', 'test_accuracy', 'combined_accuracy', 'test_rmse', 'cdistance']
Returns
Dataframe performance model list

Definition at line 495 of file controller.py.

Here is the call graph for this function:

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