salesforce / PyRCA

PyRCA: A Python Machine Learning Library for Root Cause Analysis
BSD 3-Clause "New" or "Revised" License
421 stars 43 forks source link

want to contribute on this project #35

Open Sarabhian opened 1 year ago

Sarabhian commented 1 year ago

Hi there, I'm a data scientist and want to contribute over this project, I have some industry experience and enhancing this project will help industrialists for RCA a lot, how can I connect with you all...

yangwenz commented 1 year ago

Hi, thanks for this, we welcome any contributions that can improve this library. Your industry experience will be very helpful. Your can just submit a PR and sign the Salesforce contributor license, and then we will work together with you on this PR.

Supamongkol commented 1 year ago

Hi

I am process Engineer at Orbray .,co, th. I usually analyze my job by using Design of Experiment (DOE) that is tool for root cause analysis in Industials field. But I thought that PyRCA will find root cause as well and accuracy

yangwenz commented 1 year ago

Hi, we will be appreciated if you can help to bring PyRCA more features and make it more useful in real-world applications. This lib have many components that can be improved, e.g., more RCA methods, supporting more real-world applications, more reliable causal discovery methods.

Supamongkol commented 1 year ago

Hi, I am preparing data for test . But I don't understand about Data of Parent weight. Can you introduce me? . (from the example, parent weight will create route/path). Is it correlation?

Thank you very much

On Fri, 28 Jul 2023 at 13:07, Yang Wenzhuo @.***> wrote:

Hi, we will be appreciated if you can help to bring PyRCA more features and make it more useful in real-world applications. This lib have many components that can be improved, e.g., more RCA methods, supporting more real-world applications, more reliable causal discovery methods.

— Reply to this email directly, view it on GitHub https://github.com/salesforce/PyRCA/issues/35#issuecomment-1655081207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILWY2YFVIP6ME7MVBUNDH3XSNJLNANCNFSM6AAAAAAZXOFOFY . You are receiving this because you commented.Message ID: @.***>

yangwenz commented 1 year ago

If you apply causal discovery to construct the causal graph, there will no edge weights or parent weights in the graph, only the graph structure. Given the graph, the Bayesian based RCA will build a Bayesian network to infer root causes. The values in the network are the conditional probabilities. Could you explain more about "Parent weight"?

Supamongkol commented 1 year ago

Hi , from your tutorial (Simulated DataGen). Can you check for me? I don't know if I did it correctly. "I can use DataGenConfig to create normal_data, parent_weights, noise_weights, func_form, and noise_form directly from using graph_matrix = graph_df.to_numpy(), right?" ..... Thank you very much ////////////////////////////////////////////////////////////// import pandas as pd import numpy as np import networkx as nx

df = pd.read_csv("df.csv",index_col = 0)

from pyrca.graphs.causal.pc import PC model = PC(PC.config_class(run_pdag2dag = False))

graph_df = model.train(df) graph_matrix = graph_df.to_numpy()

G = nx.DiGraph(graph_matrix)

nx.draw(G, with_labels = True)

from pyrca.simulation.data_gen import DataGenConfig, DataGen

config = DataGenConfig(dag=graph_matrix, func_type='square', noise_type='laplace', weight_generator='normal') normal_data, parent_weights, noise_weights, func_form, noise_form = DataGen(config).gen()

from pyrca.simulation.data_gen import AnomalyDataGenConfig, AnomalyDataGen

config = AnomalyDataGenConfig(parent_weights=parent_weights, noise_weights=noise_weights, func_type=func_form, noise_type=noise_form, threshold=threshold, baseline=baseline, anomaly_type=0) anomaly_data, fault = AnomalyDataGen(config).gen() ////////////////////////////