MCPcopy Create free account

hub / github.com/Leo-Lee92/Diet-Generation-As-Sequence / functions

Functions59 in github.com/Leo-Lee92/Diet-Generation-As-Sequence

↓ 12 callersFunctionsequence_to_sentence
시퀀스를 문장으로 변환해주는 함수
Code/util.py:796
↓ 7 callersFunctionget_score_pandas
(diet_batch, food_dict, nutrient_data)
Code/util.py:846
↓ 5 callersFunctionkor_to_eng
(sentence_list, refer = translate_dict)
Code/util.py:1204
↓ 3 callersMethod__init__
(self, **kwargs)
Code/Model.py:11
↓ 3 callersFunctioncreateFolder
(directory)
Code/util.py:196
↓ 2 callersFunctionget_params
()
Code/main.py:25
↓ 2 callersFunctionget_reward_ver2
영양보상 계산 done : determine whether to terminate the function
Code/util.py:876
↓ 2 callersFunctionget_score_vector
diet는 array 타입의 tokenize된 식단 벡터이어야 함
Code/util.py:1185
↓ 2 callersMethodinitialize_hidden_state
(self)
Code/Model.py:39
↓ 2 callersFunctionsentence_trim
(any_sentence, cut_len)
Code/util.py:1218
↓ 1 callersMethodcheck_by_nutrient_data
(self, diet_data, nutrient_data)
Code/util.py:123
↓ 1 callersFunctioncreateDir
(root_dir, params)
Code/util.py:172
↓ 1 callersFunctiondiet_to_incidence
(diet_data_np, food_dict)
Code/util.py:719
↓ 1 callersFunctiondish_hit_score
최소한 달성해야 하는 식단의 dish-level 구성 관점에서 매긴 점수 > Position 기반 Composition Measure 1. 0번, 15번 index에는 "앞뒤" 서브클래스2 2. 1,2, 8,9번 index에는 "간식" 서
Code/util.py:479
↓ 1 callersFunctionfood_to_token
empty_delete : empty 갯수 지정해서 지정한 갯수 이상 포함된 식단ㅇ들 제거할지 여부. default = False이고, 이 경우 empty로 꽉찬 행만 제거 num_empty : empty 갯수
Code/util.py:728
↓ 1 callersFunctionget_TargetDir
(target_address, target_keyword)
Code/util.py:209
↓ 1 callersMethodget_nutrient_features
(self, feature_data)
Code/util.py:63
↓ 1 callersMethodinference
input_seqs : encoder에 입력되는 input_seqs 데이터 encoder, decoder : checkpoint에 저장되어 있는 사전에 학습된 encoder, decoder 모델 및 파라미터. initialized stat
Code/Model.py:316
↓ 1 callersFunctioninitialize_setting
()
Code/main.py:2
↓ 1 callersMethodinsert_padding_feature
(self)
Code/util.py:40
↓ 1 callersFunctionloadParams
(directory)
Code/util.py:251
↓ 1 callersFunctionmain
()
Code/main.py:53
↓ 1 callersFunctionmake_synthetic_target
(x, beta_score, pred_seqs)
Code/util.py:266
↓ 1 callersFunctionmeal_hit_score
최소한 달성해야 하는 식단의 meal-level 구성 관점에서 매긴 점수 > Position 기반 Composition Measure 만점 9점.
Code/util.py:378
↓ 1 callersFunctionrewards_matrix
(epoch, rewards)
Code/util.py:665
↓ 1 callersFunctionsaveParams
(directory, params, dict_dat, feature_dat, inci_dat)
Code/util.py:225
↓ 1 callersFunctionsave_reward_df
(reward_df, model, eb, bs, lr, num_epochs)
Code/util.py:679
↓ 1 callersMethodselect_DB_quality
(self)
Code/util.py:107
↓ 1 callersMethodtrain
(self, x, x_update)
Code/Model.py:178
↓ 1 callersFunctionupdate_dataset
(epoch, BATCH_SIZE, target_buffer_update, target_buffer, tf_dataset_update, x, food_dict, nutrient_data)
Code/util.py:291
FunctionAffinity_Propagation
(nutrient_data)
Code/util.py:782
FunctionRollOutSamplar
(incidence_data, t, inputs)
Code/util.py:700
Method__call__
(self)
Code/util.py:75
Method__call__
(self, nutrient_data)
Code/util.py:152
Method__init__
(self, units, **kwargs)
Code/Model.py:43
Method__init__
(self, **kwargs)
Code/Model.py:82
Method__init__
(self, food_dict, nutrient_data, incidence_data, **kwargs)
Code/Model.py:148
Method__init__
(self, **preprocessing_kwargs)
Code/util.py:35
Method__init__
(self, **preprocessing_kwargs)
Code/util.py:94
Methodcall
(self, input_seq, enc_hidden)
Code/Model.py:29
Methodcall
(self, dec_hidden, all_enc_hiddens)
Code/Model.py:49
Methodcall
(self, target, dec_hidden, enc_output)
Code/Model.py:107
Functiondo_curriculum
(do, epoch, num_epochs, len_seq, curriculum_step)
Code/util.py:349
Functionget_action
가능성 있는 행위들 중 특정 행위를 선택하는 함수. (신경망의 마지막 softmax층이 반환하는 확률벡터 기반의 확률적 샘플링)
Code/util.py:813
Functionget_composition_score
(diet, category_data)
Code/util.py:838
Functionget_most_change_sequence
(real_seqs, gen_seqs, top_n)
Code/util.py:1265
Functioningredient_tokenization
(diet_ingred_sequences, ingred_dict)
Code/util.py:1282
Functionload_weights_from_checkpoint
network : checkpoint에 저장된 네트워크 인스턴스의 이름
Code/util.py:706
Functionmake_matrix_for_tsne
(total_nutrient_df_gen)
Code/util.py:624
Functionobjectification
(sample_diet_sequences, menus_dict)
Code/util.py:1291
Functionplot_attention
(sample_num, attention, sentence, predicted_sentence, food_dict, reference, language = 'kor')
Code/util.py:1222
Functionplot_reward
(dir_reward_df)
Code/util.py:579
Functionplot_reward_dist
(reward_vec)
Code/util.py:1196
Functionsave_Gens
(cp_dir, gen_seqs, food_dict)
Code/util.py:607
Functionstr2bool
(v)
Code/util.py:21
Functiontoken_to_cluster
(diet_data_np, food_ap_label)
Code/util.py:774
Functiontsne_mapping
(total_nutrient_df_real, total_nutrient_df_gen)
Code/util.py:638
Functiontsne_mapping_multiple_gen
(total_nutrient_df_real, total_nutrient_df)
Code/util.py:631
Functiontsne_plot
(tsne_values, method_label)
Code/util.py:650