mechanoChemML.workflows.mr_learning.mrnn_utility¶
Module Contents¶
Functions¶
parse_sys_args() |
Command line input variables |
notebook_args(args) |
Additional configurations |
split_data(datax, datay, split_ratio=[‘0.6’, ‘0.25’, ‘0.15’]) |
Split data based on different ratios |
get_package_version(tf_version) |
get the major and minor version of tensor flow |
getlist_str(option, sep=’,’, chars=None) |
Return a list from a ConfigParser option. By default, |
getlist_int(option, sep=’,’, chars=None) |
Return a list from a ConfigParser option. By default, |
getlist_float(option, sep=’,’, chars=None) |
Return a list from a ConfigParser option. By default, |
get_now() |
Return the now string: yyyy-mm-dd-hh-mm-ss |
exe_cmd(cmd) |
execute shell cmd |
get_dummy_data(num) |
get dummy_data for num of fields |
csvDf(dat, **kwargs) |
Generate dataframe based on csv file |
read_config_file(configfile, print_keys=False) |
read configuration file and modify the related path |
read_one_vtk(filepath, scalar=’’, vector=’’) |
Read one VTK file |
read_psi_me_from_mechanical_data(file_path) |
Read psi_me from mechanical_data: for temporary label of vtk datatype |
load_data_from_npy_for_label_shift_frame(config, dataset_frame, normalization_flag=True, verbose=0) |
Load data from npy for label shift frame |
load_data_from_vtk_for_label_shift_frame(config, dataset_frame, normalization_flag=True, verbose=0) |
Load data from vtk for label shift frame |
load_all_data_from_vtk_database(config, normalization_flag=True, verbose=0) |
Load all data from vtk database |
load_all_data_from_npy_database(config, normalization_flag=True, verbose=0) |
load all data from npy database |
load_data_from_vtk_database(config, normalization_flag=True, verbose=0) |
Load data from vtk database with hard coded label mechanical_data.txt |
load_all_data(config, args) |
load csv, image, url etc data to the main code |
read_csv_fields(file_path, fields, sep=’,’) |
Read CSV fields information |
dataset_pop_list(data_set, pop_list) |
Pop a list of index from the dataset |
norm(x, train_stats, DataNormOption=0) |
Different data normalization scheme |
prepare_data_from_csv_file(config, normalization_flag=True, verbose=0) |
load the desired fields from the csv file, not full list |
load_all_data_from_csv(config, normalization_flag=True, verbose=0) |
Load all the data from a csv file |
inspect_cnn_features(model, config, test_dataset, savefig=False) |
Output intermediate CNN results after each layer |
generate_dummy_dataset(old_config) |
based on the label list, generate dummy dataset |
special_input_case(inputs, input_case=’’) |
deal with special case for old inputs: |
-
mechanoChemML.workflows.mr_learning.mrnn_utility.parse_sys_args()[source]¶ Command line input variables
-
mechanoChemML.workflows.mr_learning.mrnn_utility.notebook_args(args)[source]¶ Additional configurations
-
mechanoChemML.workflows.mr_learning.mrnn_utility.split_data(datax, datay, split_ratio=['0.6', '0.25', '0.15'])[source]¶ Split data based on different ratios
-
mechanoChemML.workflows.mr_learning.mrnn_utility.get_package_version(tf_version)[source]¶ get the major and minor version of tensor flow
-
mechanoChemML.workflows.mr_learning.mrnn_utility.getlist_str(option, sep=', ', chars=None)[source]¶ - Return a list from a ConfigParser option. By default,
- split on a comma and strip whitespaces.
-
mechanoChemML.workflows.mr_learning.mrnn_utility.getlist_int(option, sep=', ', chars=None)[source]¶ - Return a list from a ConfigParser option. By default,
- split on a comma and strip whitespaces.
-
mechanoChemML.workflows.mr_learning.mrnn_utility.getlist_float(option, sep=', ', chars=None)[source]¶ - Return a list from a ConfigParser option. By default,
- split on a comma and strip whitespaces.
-
mechanoChemML.workflows.mr_learning.mrnn_utility.get_now()[source]¶ Return the now string: yyyy-mm-dd-hh-mm-ss
-
mechanoChemML.workflows.mr_learning.mrnn_utility.get_dummy_data(num)[source]¶ get dummy_data for num of fields
-
mechanoChemML.workflows.mr_learning.mrnn_utility.csvDf(dat, **kwargs)[source]¶ Generate dataframe based on csv file
-
mechanoChemML.workflows.mr_learning.mrnn_utility.read_config_file(configfile, print_keys=False)[source]¶ read configuration file and modify the related path
-
mechanoChemML.workflows.mr_learning.mrnn_utility.read_one_vtk(filepath, scalar='', vector='')[source]¶ Read one VTK file
-
mechanoChemML.workflows.mr_learning.mrnn_utility.read_psi_me_from_mechanical_data(file_path)[source]¶ Read psi_me from mechanical_data: for temporary label of vtk datatype
This function should be a standalone script to prepare the label and features for vtk files.
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_data_from_npy_for_label_shift_frame(config, dataset_frame, normalization_flag=True, verbose=0)[source]¶ Load data from npy for label shift frame
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_data_from_vtk_for_label_shift_frame(config, dataset_frame, normalization_flag=True, verbose=0)[source]¶ Load data from vtk for label shift frame
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_all_data_from_vtk_database(config, normalization_flag=True, verbose=0)[source]¶ Load all data from vtk database
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_all_data_from_npy_database(config, normalization_flag=True, verbose=0)[source]¶ load all data from npy database
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_data_from_vtk_database(config, normalization_flag=True, verbose=0)[source]¶ Load data from vtk database with hard coded label mechanical_data.txt
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_all_data(config, args)[source]¶ load csv, image, url etc data to the main code
-
mechanoChemML.workflows.mr_learning.mrnn_utility.read_csv_fields(file_path, fields, sep=', ')[source]¶ Read CSV fields information
-
mechanoChemML.workflows.mr_learning.mrnn_utility.dataset_pop_list(data_set, pop_list)[source]¶ Pop a list of index from the dataset
-
mechanoChemML.workflows.mr_learning.mrnn_utility.norm(x, train_stats, DataNormOption=0)[source]¶ Different data normalization scheme
-
mechanoChemML.workflows.mr_learning.mrnn_utility.prepare_data_from_csv_file(config, normalization_flag=True, verbose=0)[source]¶ load the desired fields from the csv file, not full list split the data based on the label fields split the data to three different set [train, validation, test]
-
mechanoChemML.workflows.mr_learning.mrnn_utility.load_all_data_from_csv(config, normalization_flag=True, verbose=0)[source]¶ Load all the data from a csv file
-
mechanoChemML.workflows.mr_learning.mrnn_utility.inspect_cnn_features(model, config, test_dataset, savefig=False)[source]¶ Output intermediate CNN results after each layer
-
mechanoChemML.workflows.mr_learning.mrnn_utility.generate_dummy_dataset(old_config)[source]¶ based on the label list, generate dummy dataset
-
mechanoChemML.workflows.mr_learning.mrnn_utility.special_input_case(inputs, input_case='')[source]¶ deal with special case for old inputs: for example, another DNN is for the frame 800, which has input only F11, F12, F21, F22, whereas, the current model might have additional microstructure features, thus, the input needs to be sliced to fit for the old DNN.