how can optimize the width of member function of fuzzy in MATLAB us... (2024)

2 views (last 30 days)

Show older comments

wissam alansari on 29 Sep 2023

  • Link

    Direct link to this question

    https://support.mathworks.com/matlabcentral/answers/2027234-how-can-optimize-the-width-of-member-function-of-fuzzy-in-matlab-using-ant-colony

  • Link

    Direct link to this question

    https://support.mathworks.com/matlabcentral/answers/2027234-how-can-optimize-the-width-of-member-function-of-fuzzy-in-matlab-using-ant-colony

Answered: Sam Chak on 29 Sep 2023

i need to opimize 3 prameters of fuzzy member function using Ant Colony

i need to know how can i wirte the limit as parameter in fuzzy block

0 Comments

Show -2 older commentsHide -2 older comments

Sign in to comment.

Sign in to answer this question.

Answers (1)

Sam Chak on 29 Sep 2023

  • Link

    Direct link to this answer

    https://support.mathworks.com/matlabcentral/answers/2027234-how-can-optimize-the-width-of-member-function-of-fuzzy-in-matlab-using-ant-colony#answer_1322164

  • Link

    Direct link to this answer

    https://support.mathworks.com/matlabcentral/answers/2027234-how-can-optimize-the-width-of-member-function-of-fuzzy-in-matlab-using-ant-colony#answer_1322164

Open in MATLAB Online

I can't find the Ant Colony Optimization algorithm in MATLAB, and I don't understand the limit that you are referring to. Perhaps you can try out the built-in tunefis() function.

% Data

x = (0:0.1:6)';

yData = x - cos(1.5*x) + sin(0.4*x);

% Settings for training the data using tuneFIS

options = genfisOptions('GridPartition');

options.NumMembershipFunctions = 5;

fisin = genfis(x, yData, options);

[in, out, rule] = getTunableSettings(fisin);

tuneopt = tunefisOptions("Method", "particleswarm", "OptimizationType", "learning");

tuneopt.MethodOptions.MaxIterations = 70;

fisout = tunefis(fisin, [in; out], x, yData, tuneopt);

Best Mean StallIteration f-count f(x) f(x) Iterations 0 100 1.483 10.19 0 1 200 1.074 8.592 0 2 300 1.074 4.906 1 3 400 1.074 3.893 2 4 500 0.9217 3.888 0 5 600 0.7918 3.596 0 6 700 0.5391 3.365 0 7 800 0.5391 3.247 1 8 900 0.5391 2.955 2 9 1000 0.5391 3.253 3 10 1100 0.5391 3.357 4 11 1200 0.5391 3.197 5 12 1300 0.4889 3.218 0 13 1400 0.4889 3.272 1 14 1500 0.4859 3.086 0 15 1600 0.4859 3.181 1 16 1700 0.4859 3.53 2 17 1800 0.4859 2.449 3 18 1900 0.335 2.058 0 19 2000 0.2147 1.788 0 20 2100 0.2147 1.753 1 21 2200 0.2147 1.603 2 22 2300 0.214 1.508 0 23 2400 0.2139 1.442 0 24 2500 0.2139 1.168 0 25 2600 0.1622 1.154 0 26 2700 0.1622 1.078 1 27 2800 0.138 0.8509 0 28 2900 0.138 0.7271 1 29 3000 0.1211 0.7111 0 30 3100 0.1147 0.7144 0 Best Mean StallIteration f-count f(x) f(x) Iterations 31 3200 0.09653 0.7112 0 32 3300 0.08175 0.5418 0 33 3400 0.07963 0.5149 0 34 3500 0.07963 0.6131 1 35 3600 0.07963 0.6316 2 36 3700 0.07963 0.717 3 37 3800 0.07483 0.7216 0 38 3900 0.07483 0.7817 1 39 4000 0.07483 0.8795 2 40 4100 0.07483 0.8815 3 41 4200 0.07483 0.8076 4 42 4300 0.07483 0.695 5 43 4400 0.07483 0.5549 6 44 4500 0.07393 0.429 0 45 4600 0.07344 0.4049 0 46 4700 0.07062 0.3504 0 47 4800 0.06587 0.3088 0 48 4900 0.06541 0.2963 0 49 5000 0.06338 0.3276 0 50 5100 0.06338 0.2624 1 51 5200 0.06149 0.2816 0 52 5300 0.06102 0.2454 0 53 5400 0.05833 0.2642 0 54 5500 0.05797 0.2327 0 55 5600 0.05697 0.2955 0 56 5700 0.05697 0.3332 1 57 5800 0.05613 0.3502 0 58 5900 0.05613 0.3916 1 59 6000 0.05613 0.3396 2 60 6100 0.05558 0.4118 0 Best Mean StallIteration f-count f(x) f(x) Iterations 61 6200 0.05558 0.4059 1 62 6300 0.05558 0.5066 2 63 6400 0.05558 0.5232 3 64 6500 0.05558 0.6319 4 65 6600 0.05558 0.548 5 66 6700 0.05558 0.4791 6 67 6800 0.05558 0.3187 7 68 6900 0.05558 0.283 8 69 7000 0.05416 0.2351 0 70 7100 0.05416 0.2129 1Optimization ended: number of iterations exceeded OPTIONS.MaxIterations.

plotfis(fisout)

how can optimize the width of member function of fuzzy in MATLAB us... (3)

fisout.Inputs(1).MembershipFunctions(1)

ans =

fismf with properties: Type: "gbellmf" Parameters: [1.1260 1.5498 3.9293] Name: "in1mf1"

plotmf(fisout, 'input', 1)

how can optimize the width of member function of fuzzy in MATLAB us... (4)

yPred = evalfis(fisout, x);

Error = rmse(yPred, yData)

Error = 0.0542

plot(x, yData, '.'), hold on

plot(x, yPred), grid on

xlabel('x'), ylabel('y')

legend('Data', 'Prediction', 'location', 'East')

how can optimize the width of member function of fuzzy in MATLAB us... (5)

0 Comments

Show -2 older commentsHide -2 older comments

Sign in to comment.

Sign in to answer this question.

See Also

Categories

Mathematics and OptimizationOptimization ToolboxLinear Programming and Mixed-Integer Linear ProgrammingSolver-Based Linear Programming

Find more on Solver-Based Linear Programming in Help Center and File Exchange

Tags

  • #fuzzy #ant colony

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.


how can optimize the width of member function of fuzzy in MATLAB us... (6)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • 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
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

how can optimize the width of member function of fuzzy in MATLAB us... (2024)

References

Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 5855

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.