Neural Fuzzy Hybrid Rule-Based Inference System with Test Cases for Prediction of Heart Attack Probability
Algorithm 1
Pseudo-code for hybrid neuro-fuzzy inference system.
Step 1: Input dataset
Step 2: Create prerequisite for model, and select number of input, hidden, and output neurons.
Step 3: Generate feature indices using mRMR feature selection algorithm.
Step 4: Generate initial population with random uniform values of chromosomes.
Step 5: Compute weight matrix of population using genetic algorithm.
Step 6: Train the model
Step 7: Repeat steps 4 to 6 for different sets of features and record the highest score.
Step 8: Test data to find if patient has heart disease or not.
Step 9: Create inference rules using the priority and complexity of medical parameters from the dataset.
Step 10: Create membership functions for each medical parameter based on the fuzzy set range defined.
The mapping of a set of real numbers (xi) onto membership values (ui), which typically fall between [0, 1], is known as a fuzzy set. A fuzzy set is represented in this fuzzy package by a set of pairs, ui/xi, where ui is the membership value for real number xi.
Step 11: Process the input using fuzzification process.
A point with a low membership value should have less influence on the calculation of the infimum according to the weighting approach (or minimum). As a result, the distance between x and can be expressed as follows: where f is a decreasing function of μ (e.g., f(μ(y)) = 1/μ(y)) such that f(1) < +∞ (in order to guarantee that if x belongs completely to μ, i.e., if μ(x) = 1, the distance is attained for y = x), and with the convention 0f(0) = +∞. If μ(x) = 0, i.e., if x is completely outside of μ, this definition leads to satisfactory results.
Step 12: Pass the fuzzy output to defuzzification process to get crisp output.
Defuzzification is the process of converting a fuzzy set to a precise integer. When you want a precise number as the output from a fuzzy system, defuzzification is necessary. where μA(x) is called the membership function of A in (c, d).