| 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

adviserastar.py
1
5
6 '''
7 Copyright (C) e2its - All Rights Reserved
8 * Unauthorized copying of this file, via any medium is strictly prohibited
9 * Proprietary and confidential
10 *
11 * This file is part of gDayF project.
12 *
13 * Written by Jose L. Sanchez <e2its.es@gmail.com>, 2016-2019
14 '''
15
16
17 from gdayf.core.adviserbase import Adviser
18 from gdayf.common.utils import get_model_fw
19 import importlib
20 ''' Don't delete used for dynamic optimizer methods'''
21 from gdayf.conf.loadconfig import LoadConfig
22 from gdayf.common.utils import decode_ordered_dict_to_dataframe
23 from gdayf.models.parametersmetadata import ParameterMetadata
24
25
26
30 class AdviserAStar(Adviser):
31
32
39 def __init__(self, e_c, deep_impact=3, metric='train_accuracy', dataframe_name='', hash_dataframe=''):
40 super(AdviserAStar, self).__init__(e_c=e_c, deep_impact=deep_impact, metric=metric,
41 dataframe_name=dataframe_name, hash_dataframe=hash_dataframe)
42
43
46 def optimize_models(self, armetadata):
47 metric_value, _, objective = eval('self.get_' + self.metric + '(armetadata)')
48 engine = get_model_fw(armetadata)
49 for engines in [*self._frameworks]:
50 if engine == engines:
51 optimizer_engine = importlib.import_module(self._frameworks[engine]['conf']['optimization_method'])
52 model_list = optimizer_engine.Optimizer(self._ec).optimize_models(armetadata=armetadata,
53 metric_value=metric_value,
54 objective=objective,
55 deepness=self.deepness,
56 deep_impact=self.deep_impact)
57 optimized_model_list = list()
58 for model in model_list:
59 self.safe_append(optimized_model_list, model)
60
61 return (optimized_model_list)
62
63
gdayf.core.adviserastar.AdviserAStar.__init__
def __init__(self, e_c, deep_impact=3, metric='train_accuracy', dataframe_name='', hash_dataframe='')
Constructor.
Definition: adviserastar.py:39
gdayf.core.adviserbase
Define all objects, functions and structured related to manage and execute Smart analysis based on A*...
Definition: adviserbase.py:1
gdayf.core.adviserbase.Adviser
Class focused on execute A* based analysis on three modalities of working Fast: 1 level analysis over...
Definition: adviserbase.py:36
gdayf.core.adviserastar.AdviserAStar
Class focused on execute A* based analysis on three modalities of working Fast: 1 level analysis over...
Definition: adviserastar.py:30
gdayf.common.utils
Define all objects, functions and structs related to common utilities not associated to one concrete ...
Definition: utils.py:1
gdayf.core.adviserbase.Adviser.metric
metric
Definition: adviserbase.py:60
gdayf.core.adviserastar.AdviserAStar.optimize_models
def optimize_models(self, armetadata)
Method mangaing the generation of possible optimized models.
Definition: adviserastar.py:46
gdayf.core.adviserbase.Adviser.safe_append
def safe_append(self, model_list, model)
Check if model is previously executed.
Definition: adviserbase.py:802
gdayf.core.adviserbase.Adviser.deepness
int deepness
Definition: adviserbase.py:37
gdayf.core.adviserbase.Adviser.deep_impact
deep_impact
Definition: adviserbase.py:55
gdayf.core.adviserbase.Adviser._ec
_ec
Definition: adviserbase.py:48
gdayf.models.parametersmetadata
Define all objects, functions and structured related to manage Model Parameters Structure: OrderedDic...
Definition: parametersmetadata.py:1
gdayf.conf.loadconfig
Define all objects, functions and structs related to load on system all configuration parameter from ...
Definition: loadconfig.py:1
gdayf.core.adviserbase.Adviser._frameworks
_frameworks
Definition: adviserbase.py:51