Error running optimization tool for GAFuzzy
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
please help me out with the error below.
Optimization running.
Error running optimization.
Illegal parameters in fisGeneralizedBellMf() --> a = 0
採用された回答
Walter Roberson
2018 年 9 月 22 日
Your fis includes a Generalized Bell Membership Function rule, https://www.mathworks.com/help/fuzzy/gbellmf.html
Those are of the form
1/(1 + abs((x-c)/a)^(2*b))
That is not valid if a is 0, because it gives a division by 0.
I suspect you are trying to do fuzzy processing to optimize a FIS. You need to put a positive lower bound on the first value.
7 件のコメント
sattybol40
2018 年 9 月 23 日
編集済み: Walter Roberson
2018 年 9 月 23 日
i tried to implement your suggestion, but i failed.
this is my lower bound
[0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 1 -Inf -Inf 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1]
Walter Roberson
2018 年 9 月 23 日
That does not tell me much, as I do not know which of those entries is the one that is going to go on to be the parameter passed as the first entry to the generalized bell membership.
It would have to be one of entries #
2 6 10 14 18 22 26 30 34 38 42 46 50 54 59 60 61 64 65 66 69 70 71 74 75 76 79 80 81 84 85 86 89 90 91 94 95 96 99 100 101 104 105 106 109 110 111 114 115 116 119 120 121 124 125 126 129 130 131
for that lower bound to be effective in preventing the problem.
sattybol40
2018 年 9 月 23 日
what should be the corresponding upper bound value if i choose any of the above specified lower bound values
Walter Roberson
2018 年 9 月 23 日
Those are indices, not lower bounds. For any entry in your lb vector that corresponds to an element that is going to become an "a" value of a generalized bell transfer function, the lower bound should be positive.
If your a is small (near zero) for 1/(1 + abs((x-c)/a)^(2*b)) then (x-c) would tend to be large (potentially significantly greater than 1) except when x == c exactly. A number significantly greater than one, raised to 2*b, is potentially going to end up huge if b > 1/2 so that 2*b > 1. That would lead to 1+large number on the denominator, and 1 over that would lead to a small value. If 2*b < 1 but positive, then raising to 2*b would tend to pull the value back towards 1 but still potentially much greater than 1, so 1/(1 + abs((x-c)/a)^(2*b)) could still end up fairly small
If your a is greater than max of abs(x-c) then (x-c)/a would be in the range of +/- 1. Raise that to 2*b with 2*b > 1 and you would tend to pull towards 0; if 2*b < 1 then you would tend to pull towards +/- 1. Add that to the 1 and you would tend to a value between 1 and 2, and 1 over that would be relatively moderate, 1/2 to 1.
If you continue to raise a relative the maximum x-c range, then you tend to emphasize the 1/2 or 1 possibilities more strongly.
If you know the maximum x-c value then you could tune the parameters such that what you get is effectively two cases, 1 overall where x == c exactly, and mostly a different value such as 1/2 otherwise.
sattybol40
2018 年 9 月 23 日
Thanks for your response, it would take some time for me to understand and implement your suggestion.
Walter Roberson
2018 年 9 月 23 日
What shape are you expecting? Are you trying to create an impulse-like function that is quite different at c then at other locations that are not near c ?
You can compute an effective limitation on a . If a is large enough, abs((x-c)/a) will be near zero, and if b > 1/2 then abs((x-c)/a)^(2*b) is going to be less than eps(1) so 1 + abs((x-c)/a)^(2*b) would become the same as 1, so the entire expression would just compute 1, with the calculation becoming useless. You might as well put an upper bound on a to prevent it from exceeding that value.
The analysis is a bit different if b can be small: the smaller b is, the more the calculation tend to single out x == c as special and output 1 at x == c and output 1/2 otherwise.
sattybol40
2018 年 9 月 24 日
Thank You sir, Finally i am able to solve the problem with your help.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Fuzzy Logic Toolbox についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
