FRsūtil̲s
A fuzzy-rough reasoning utilities library
 
Loading...
Searching...
No Matches
plot_fuzzy_quantifiers.py
Go to the documentation of this file.
1import matplotlib.pyplot as plt
2import numpy as np
3import sys
4import os
5
6sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../core')))
7
8import fuzzy_quantifiers as fq
9
10# Define parameters
11alpha = 0.3
12beta = 0.7
13
14# Input values from 0 to 1
15x_vals = np.linspace(0, 1, 200)
16y_vals = fq.fuzzy_quantifier_quad(x_vals, alpha, beta)
17y_vals = fq.fuzzy_quantifier1(x_vals, alpha, beta)
18
19# Plot
20plt.plot(x_vals, y_vals, label=f'Q({alpha}, {beta})(x)', color='blue')
21plt.title("Smooth Fuzzy Quantifier")
22plt.xlabel("x")
23plt.ylabel("Q(x)")
24plt.grid(True)
25plt.legend()
26plt.show()