Tin Theethawat Savastham commited on
Commit
11b2f84
·
1 Parent(s): b9dac23

📝 Talk about model in Readme

Browse files
Files changed (1) hide show
  1. Readme.md +24 -0
Readme.md CHANGED
@@ -20,4 +20,28 @@ pip install -r requirement.txt
20
 
21
  The Model is structure into folder model, functions. The model and functions that related to **model** is located in folder model and the **function** contain the function to do the experiment.
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  © 2024, Prince of Songkla University under Inteligent Automation Engineering Center
 
20
 
21
  The Model is structure into folder model, functions. The model and functions that related to **model** is located in folder model and the **function** contain the function to do the experiment.
22
 
23
+ ## Model
24
+
25
+ The model is located in `model/` folder. The main file is `tdce_model.py` which is a based model of TDCE.
26
+
27
+ ### Main Model
28
+
29
+ TDCE class is the main class of our model. It was constructed by 3 elements which are `self.material_element`, `selef.employee_element`, and `self.capital_cost_element`. The material element is non-time driven element, it came from the `material_network.py` while employee and capital cost (or called utility cost in the thesis and article) were time-driven elements, which came from `time_driven_network`.
30
+
31
+ On this main class, it located function `fit_with_validation` for a training. The procedure of them can be listed as.
32
+
33
+ - **Normalize the payload** by using function `mnorm.normalize_payload()` which come from `normalize.py`.
34
+
35
+ - **Training Period** for each epoch or iterations, errors are initialize with 0. Then we iteration over the samples, find the payload of sample, and find the associated validation sample. We send the sample into each model element under the function `predict_sample()` and recieve their results and do that again for the validation data sample. Finally we combined the result weighted by the model-level weight.
36
+
37
+ - **Back Propagation** Follwed by the training, in the same iteration, we find the derviative of error (MSE) ad we find the gradient of each model-level weight.
38
+
39
+ ```python
40
+ loss_prime = self.loss_prime(result_input, result)
41
+ material_weight_error = np.dot(predicted_mc, loss_prime)
42
+
43
+ ```
44
+
45
+ For the element-level weight, we pass it to the `back_propagation` function. To make the element-level learnin from the previoused experincanced m
46
+
47
  © 2024, Prince of Songkla University under Inteligent Automation Engineering Center