baynet_inference

Use the pre-trained model and test_result to get probability.

Syntax

Description

This function uses the original D matrix data file to obtain the name of test indicators and different fault types. So only the headers of the original data file is in need. Together with the pre-trained model, the test result from real experiments is also sent into this function, so the fault probability will be returned by this function after model inference.

Examples


Here is the second example of this function.

Attention:

The example files in the above code are the source D matrix data files and pre-trained models, which are also uploaded at Bayesian Net Download website.

Input Arguments

D_matrix —— A string. It is the path where the source D matrix data file is located. It is recommended to use the absolute path of this file, for the function doesn't handle the input path exactly.


model_path —— A string. It is the path where the pre-trained bayesian network is located. It is recommended to use the absolute path of this file, for the function doesn't handle the input path exactly.


test_result —— An array. It contains the test results from each test indicator. When the test result from an indicator is 0 means there is no fault, and 1 represents that there is a fault detected by the indicator.

Properties of Arguments

Name of the parametersis optional?Source, dialog or input port?
D_martixNoInput port
model_pathNoInput port
test_resultNoInput port

Output Arguments

result —— An array. It contains the fault probability of each items in the prediction of the Bayesian Network with the input test_result.