Skip to main content
Fig. 3 | Chinese Medicine

Fig. 3

From: Machine learning in TCM with natural products and molecules: current status and future perspectives

Fig. 3

The basic structure of LSTM. Input X(t), output Y(t); W represents weight, b represents bias term. Hidden state: \({h}_{t}={o}_{t}\otimes \text{t}\text{a}\text{n}\text{h}\left({g}_{t}\right)\); input node: \({g}_{t}=\text{t}\text{a}\text{n}\text{h}({X}_{t}{W}_{xg}+{h}_{t-1}{W}_{hg}+{b}_{g})\); memory cell internal state: \({C}_{t}= {f}_{t}\otimes {C}_{t-1}+{i}_{t}\otimes {g}_{t}\). Input gate: \({i}_{t}=sigmoid({X}_{t}{W}_{xi}+{h}_{t-1}{W}_{hi}+{b}_{i})\); forget gate: \({f}_{t}=sigmoid({X}_{t}{W}_{xf}+{h}_{t-1}{W}_{hf}+{b}_{f})\); output gate: \({o}_{t}=sigmoid({X}_{t}{W}_{xo}+{h}_{t-1}{W}_{ho}+{b}_{o})\)

Back to article page