CsnowyLstar / HoGRC

Higher-order Granger reservoir computing
MIT License
12 stars 3 forks source link

Where in the code Granger causality is involved and why the hos = ['7-7-7','7-7-356','7-7-35','7-7-3','7-7-5','7-7-34','7-7-124'] is added in the example of Task 1 #1

Closed github-lyj closed 1 month ago

github-lyj commented 2 months ago

Hello May I ask why the hos = ['7-7-7','7-7-356','7-7-35','7-7-3','7-7-5','7-7-34','7-7-124'] is added in the example of Task 1, and why it is necessary to add edges_in = pd.DataFrame(np.array([[1,1],[1,2],[2,2],[2,5],[4,4],[4,3]])) edges_ex = pd.DataFrame(np.array([[1],[2],[2]])) in Data_CL.py? Is there any basis for this? The main purpose of the article is about higher-order structure inference and multi-step prediction. Can you tell me where in the code Granger causality is involved? I couldn't find it. I have the same question in other examples as well. Thank you

CsnowyLstar commented 2 months ago

Thank you for your attention to our work. Here, we employ a greedy strategy (Algorithm 1 in the main text) to infer higher-order structures. A simple example can be seen in Figure 2a of the main text and its related explanation.

As experimental validation, we have manually adjusted the structure optimization process. Consequently, Granger causality is not explicitly shown in the code, but rather, applied during the process of structural inference.

In fact, we can also write an automatic inference process by combining Algorithm 1 from the main text, with the key being in the structure reduction process (the operations of dimension reduction and deletion of simplices). We will supplement this content in the futher. 

If you have any questions, please feel free to continue the discussion!

------------------ 原始邮件 ------------------ 发件人: "CsnowyLstar/HoGRC" @.>; 发送时间: 2024年4月16日(星期二) 晚上10:33 @.>; @.***>; 主题: [CsnowyLstar/HoGRC] Where in the code Granger causality is involved and why the hos = ['7-7-7','7-7-356','7-7-35','7-7-3','7-7-5','7-7-34','7-7-124'] is added in the example of Task 1 (Issue #1)

Hello May I ask why the hos = ['7-7-7','7-7-356','7-7-35','7-7-3','7-7-5','7-7-34','7-7-124'] is added in the example of Task 1, and why it is necessary to add edges_in = pd.DataFrame(np.array([[1,1],[1,2],[2,2],[2,5],[4,4],[4,3]])) edges_ex = pd.DataFrame(np.array([[1],[2],[2]])) in Data_CL.py? Is there any basis for this? The main purpose of the article is about higher-order structure inference and multi-step prediction. Can you tell me where in the code Granger causality is involved? I couldn't find it. I have the same question in other examples as well. Thank you

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

github-lyj commented 2 months ago

Hello, Thank you for your response. I'm eagerly looking forward to the code for this automated reasoning process. Could you please provide a brief description of this process? I only found descriptions like "possibly containing all" in the paper. Additionally, could you explain the purpose of N in args? I didn't understand the help in the code, and how does it differ from n and V? What does nj signify? For example, in an aviation network with x airports, each described by 2 variables, would it be N=1, n=x, V=2? If I want to discover the optimal high-order structural information for each airport, such as which airports or combinations of airports it contains, would I need to iterate nj from 0 to x-1, essentially running the model x times? Am I understanding this correctly? Thank you

CsnowyLstar commented 2 months ago

In the code, we initially intended to use the variable N to represent the number of data entries to be generated. However, as it turns out, this variable was never used in subsequent experiments (since N was always set to 1), and therefore it can be disregarded. 

In addition, n represents the number of subsystems, and V represents the number of variables contained in each subsystem. For example, in the coupled Lorenz system mentioned in the text, n=5, V=3, thus there are in total 15 variables (also referred to as nodes). "nj" indicates that we calculate the prediction error of the nj subsystem separately.

The example you mentioned may be comparable to our network dynamics experiment (Equation 14 in the main text). Here, it is important to note the difference and connection between the coupled network structure ("edges.csv") and the inference of higher-order structures ("edges_in.csv" and "edges_ex.csv").

------------------ 原始邮件 ------------------ 发件人: "CsnowyLstar/HoGRC" @.>; 发送时间: 2024年4月17日(星期三) 晚上9:04 @.>; @.**@.>; 主题: Re: [CsnowyLstar/HoGRC] Where in the code Granger causality is involved and why the hos = ['7-7-7','7-7-356','7-7-35','7-7-3','7-7-5','7-7-34','7-7-124'] is added in the example of Task 1 (Issue #1)

Hello, Thank you for your response. I'm eagerly looking forward to the code for this automated reasoning process. Could you please provide a brief description of the process? I only found descriptions like "possibly containing all" in the paper. Additionally, could you explain the purpose of N in args? I didn't understand the help in the code, and how does it differ from n and V? What does nj signify? For example, in an aviation network with x airports, each described by 10 variables, would it be N=1, n=x, V=10? If I want to discover the optimal high-order structural information for each airport, would I need to iterate nj from 0 to x-1, essentially running the model x times? Am I understanding this correctly? Thank you.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

github-lyj commented 2 months ago

Thank you for your reply. Could you please explain the meaning of trajectory.csv in the context of the aviation network mentioned above, or the power grid, or any other real-world network? Additionally, what are the differences between edges_ex.csv, edges_in.csv, and Sd.csv? Why was edges_ex = pd.DataFrame(np.array([[1,1,2],[1,2,1],[2,1,2],[2,2,1]])) manually added in Data_HCO.py for the power_grid project? What is the basis and purpose of this addition?

CsnowyLstar commented 2 months ago

Your understanding is correct. In terms of the power grid system mentioned in the article, it can also be understood as having no concept of subsystems, since each subsystem contains only one node. That is to say, the edges_ex.csv file would only be useful for network dynamics in cases where the subsystems consist of multiple nodes.

------------------ 原始邮件 ------------------ 发件人: "CsnowyLstar/HoGRC" @.>; 发送时间: 2024年4月18日(星期四) 中午11:56 @.>; @.**@.>; 主题: Re: [CsnowyLstar/HoGRC] Where in the code Granger causality is involved and why the hos = ['7-7-7','7-7-356','7-7-35','7-7-3','7-7-5','7-7-34','7-7-124'] is added in the example of Task 1 (Issue #1)

Thank you for your response. Could you please explain the meanings of edges.csv, edges_in.csv, edges_ex.csv, and trajectory.csv in the data, with reference to the aviation network mentioned above or the UK power grid in the article, or any other real-world networks? Are edges_in.csv and edges_ex.csv files respectively storing the higher-order structures within subsystems and between subsystems?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

github-lyj commented 1 month ago

Thank you for your reply.