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

5 次查看(过去 30 天)
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,

回答(1 个)

Sam Chak
Sam Chak 2025-4-24
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')

类别

Help CenterFile Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by