Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Membership Functions | Membership Functions and Fuzzy Sets
Fuzzy Logic and Approximate Reasoning

bookMembership Functions

メニューを表示するにはスワイプしてください

A membership function is a mathematical tool at the core of fuzzy logic, allowing you to describe how strongly an element belongs to a fuzzy set. Rather than assigning a strict yes-or-no value as in classical logic, a membership function maps each element in a domain to a value between 0 and 1. This value represents the degree of membership or the "truth" that the element belongs to the fuzzy set. For instance, consider the fuzzy set representing medium temperature. Instead of saying a temperature is either medium or not, the membership function lets you express that 20°C is "somewhat medium" (e.g., 0.6), 25°C is "very medium" (e.g., 1.0), and 30°C is "barely medium" (e.g., 0.2). The shape of the membership function — such as triangular, trapezoidal, or Gaussian — determines how these degrees are assigned across the domain, making it possible to model vague or imprecise concepts in a mathematically precise way.

123456789101112131415161718192021222324252627
def triangular_membership(x, a, b, c): """ Triangular membership function using if-else logic. Parameters: x: input value (single float) a: left foot of triangle b: peak of triangle c: right foot of triangle Returns: Degree of membership between 0 and 1 """ if x <= a or x >= c: return 0.0 elif a < x < b: return (x - a) / (b - a) elif b < x < c: return (c - x) / (c - b) elif x == b: return 1.0 else: return 0.0 # Example: evaluate degrees for a few temperatures values = [15, 20, 25, 30, 35] results = [triangular_membership(v, a=15, b=25, c=35) for v in values] print("Temperatures:", values) print("Degrees of membership:", results)
copy
question mark

Which statement best describes the role of a membership function in fuzzy logic?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  1

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 2.  1
some-alt