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
Functions
gdayf.common.utils Namespace Reference

Define all objects, functions and structs related to common utilities not associated to one concrete object and able to be reused on whole context. More...

Functions

def hash_key (hash_type, filename)
 Function oriented to get the hash_key for a file. More...
 
def decode_json_to_dataframe (json_string, orient='split')
 Function oriented convert a json dataframe string structure on pandas.dataframe() More...
 
def decode_ordered_dict_to_dataframe (ordered_dict, orient='split')
 Function oriented convert a OrderedDict() dataframe string structure on pandas.dataframe() More...
 
def compare_list_ordered_dict (list1, list2)
 Function oriented compare two normalizations_sets based on hash_key(json transformations) More...
 
def compare_sorted_list_dict (list1, list2)
 Function oriented compare two normalizations_sets based on cmp functions Need to be sorted in same order. More...
 
def get_model_fw (model)
 Function to get framework from ar.json model description.
 
def get_model_ns (model)
 Function to get normalization_sets structure from ar.json model description. More...
 
def pandas_split_data (df, train_perc=0.9)
 Function to get pandas dataframe split without copy. More...
 
def xstr (s)
 Function to return empty string if String variable is None. More...
 

Detailed Description

Define all objects, functions and structs related to common utilities not associated to one concrete object and able to be reused on whole context.

Function Documentation

◆ compare_list_ordered_dict()

def gdayf.common.utils.compare_list_ordered_dict (   list1,
  list2 
)

Function oriented compare two normalizations_sets based on hash_key(json transformations)

Parameters
list1List of Dict
list2List of Dict
Returns
True if equals false in other case

Definition at line 61 of file utils.py.

◆ compare_sorted_list_dict()

def gdayf.common.utils.compare_sorted_list_dict (   list1,
  list2 
)

Function oriented compare two normalizations_sets based on cmp functions Need to be sorted in same order.

Parameters
list1List of Dict
list2List of Dict
Returns
True if equals false in other case

Definition at line 78 of file utils.py.

◆ decode_json_to_dataframe()

def gdayf.common.utils.decode_json_to_dataframe (   json_string,
  orient = 'split' 
)

Function oriented convert a json dataframe string structure on pandas.dataframe()

Parameters
json_stringcontaining a DataFrame table
orientsplit (default) as usual DayF uses
Returns
pandas.dataframe

Definition at line 44 of file utils.py.

Here is the caller graph for this function:

◆ decode_ordered_dict_to_dataframe()

def gdayf.common.utils.decode_ordered_dict_to_dataframe (   ordered_dict,
  orient = 'split' 
)

Function oriented convert a OrderedDict() dataframe string structure on pandas.dataframe()

Parameters
ordered_dictcontaining a DataFrame table
orientsplit (default) as usual DayF uses
Returns
pandas.dataframe

Definition at line 52 of file utils.py.

Here is the call graph for this function:

◆ get_model_ns()

def gdayf.common.utils.get_model_ns (   model)

Function to get normalization_sets structure from ar.json model description.

Parameters
modelArMetadata
Returns
ArMetadata deepcopy

Definition at line 96 of file utils.py.

◆ hash_key()

def gdayf.common.utils.hash_key (   hash_type,
  filename 
)

Function oriented to get the hash_key for a file.

Parameters
hash_typein ['MD5', 'SHS256']
filenamefull path string
Returns
Hash_key if success and (1) on error issues

Definition at line 27 of file utils.py.

◆ pandas_split_data()

def gdayf.common.utils.pandas_split_data (   df,
  train_perc = 0.9 
)

Function to get pandas dataframe split without copy.

Parameters
dfPandas dataframe
train_perc% for train_dataframe
Returns
Dict ('train df pointer, 'test' df pointer)

Definition at line 104 of file utils.py.

◆ xstr()

def gdayf.common.utils.xstr (   s)

Function to return empty string if String variable is None.

Parameters
sString or None
Returns
String

Definition at line 114 of file utils.py.