# Research on a Time Series Data Prediction Model Based on Causal Feature Weight Adjustment
## 3 LWA-LSTM Method
### LiNGAM Algorithm and Causal Weight Adjustment  
Currently, the mainstream causal discovery algorithms can be classified into three main types: constraint-based methods, structure-based causal model methods, and hybrid methods. Constraint-based methods remove redundant edges in the causal graph by conducting independence tests on variables. Structure-based causal model methods start from the causal mechanisms generated by data and construct functions to determine the causal relationships between variables, thereby identifying the direction of causality. Hybrid methods combine both approaches, aiming to achieve both the high-dimensional scalability of constraint-based methods and the strong causal discovery capability of structure-based causal model methods. Constraint-based methods often have drawbacks such as misidentification and high time complexity. Additionally, these methods are unable to learn all edges in a causal network graph; they can only obtain a directed acyclic graph comprising a set of Markov equivalent classes. On the other hand, structure-based causal modeling methods overcome these limitations by studying the distribution properties of data to discover causal relationships. However, research on hybrid approaches is still in its early stages and faces challenges like insufficient theoretical analysis. Therefore, we have chosen to study the LiNGAM algorithm, which is based on structure-based causal modeling. LiNGAM, short for Linear Non-Gaussian Acyclic Model, was proposed by [PERSON] et al. It is a variation of structural equation models and Bayesian networks. The model \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Number** & **Factor** & **Number** & **Factor** & **Number** & **Factor** \\ \hline X1 & next\_close & X12 & open\_qfq & X23 & macd \\ X2 & open & X13 & close\_hfq & X24 & kdj\_k \\ X3 & high & X14 & close\_qfq & X25 & kdj\_d \\ X4 & low & X15 & high\_hfq & X26 & kdj\_j \\ X5 & pre\_close & X16 & high\_qfq & X27 & rsi\_6 \\ X6 & change & X17 & low\_hfq & X28 & rsi\_12 \\ X7 & pct\_change & X18 & low\_qfq & X29 & rsi\_24 \\ X8 & vol & X19 & pre\_close\_hfq & X30 & boll\_upper \\ X9 & amount & X20 & pre\_close\_qfq & X31 & boll\_mid \\ X10 & adj\_factor & X21 & macd\_diff & X32 & boll\_lower \\ X11 & open\_hfq & X22 & macd\_dea & X33 & cci \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Complete set of multifactorial features. requires that the causal structure of the variables satisfies three conditions: first, the directed graph formed by all the variables must be acyclic; second, the model must be linear, with the target variable being a linear sum of its corresponding cause variables; third, the noise variables follow non-Gaussian distributions with nonzero variances and are mutually independent. The variables in the LiNGAM model are generated in a causal order, so after the variables are arranged in a causal order, the variable located in the back cannot be the dependent variable of the preceding variable. In practice, the arrangement of the observed variables is random, as opposed to the causal order. We write the variables as \(\{v_{1},\,v_{2},\,\ldots,\,v_{n}\}\), denoting the causal order as \(k\) (\(i\)), \(i\) \(\in\) [1, \(n\)]. (\(i\) \(\in\) [1, \(n\)] represents the position of the \(i\)-th variable in the causal order of the observation sequence, then the generation process of the variable can be described as:  
\[v_{i}=\sum_{k(j)<k(i)}b_{ij}v_{j}+n_{i}\qquad i,j\in[1,n] \tag{1}\]  
In the formula, \(n_{i}\) represents the noise terms that obey the non-Gaussian distribution, and the noise terms are independent of each other in pairs; if \(b_{ij}\) is not 0, there is an edge with \(v_{j}\) pointing to \(v_{i}\). Under the linear non-Gaussian acyclic conditions described above, the LiNGAM model is expressed as a matrix:  
\[V=BV+n \tag{2}\]  
\(V\) is a p-dimensional random vector, \(B\) is a \(p\times p\) adjacency matrix, and \(n\) is a p-dimensional non-Gaussian random noise variable.