How can one fuzzify a Support Vector Regression (SVR) model?

5 Ansichten (letzte 30 Tage)
nastaran moosavi
nastaran moosavi am 25 Nov. 2020
Beantwortet: Sam Chak am 24 Apr. 2025
Dear all,
I have a SVR model. I want to fuzzify it. I mean I want to fuzzify this model and change it to a 'Fuzzy SVR' system. Could anyone help me how I can do it?
Many Thanks,

Antworten (1)

Sam Chak
Sam Chak am 24 Apr. 2025
If the data from the Support Vector Regression (SVR) model is available, it is possible to train an Adaptive Neuro-Fuzzy Inference System (ANFIS) model.
%% SVR data
x = linspace(-1, 1, 2001)';
y = asinh(50*x);
mdl = fitrsvm(x, y, 'Standardize', true, 'KernelFunction', 'gaussian', 'KernelScale', 'auto');
yfit= predict(mdl, x);
figure
plot(x, yfit), grid on
xlabel('Input'), ylabel('Output'), title('Data from SVR')
%% create initial FIS
genOpt = genfisOptions('GridPartition');
genOpt.NumMembershipFunctions = 4;
genOpt.InputMembershipFunctionType = 'gauss2mf';
genOpt.OutputMembershipFunctionType = 'constant';
inFIS = genfis(x, yfit, genOpt);
%% train ANFIS
opt = anfisOptions('InitialFIS', inFIS, 'EpochNumber', 50);
opt.DisplayANFISInformation = 0;
opt.DisplayErrorValues = 0;
opt.DisplayStepSize = 0;
opt.DisplayFinalResults = 0;
outFIS = anfis([x yfit],opt);
figure
plotrule(outFIS)
%% plot result
figure
plot(x, [yfit, evalfis(outFIS, x)]), grid on
xlabel('Input'), ylabel('Output'),
title('Compare SVR Data with Trained ANFIS Output')
legend('SVR Data', 'Trained ANFIS Output', 'location', 'southeast')

Kategorien

Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by