模糊choquet积分介绍

如果有4个投入,则这4个投入的二进制编码可以设置为,
%1 0 0 0 x1
%0 1 0 0 x2
%1 1 0 0 x12
%0 0 1 0 x3
%1 0 1 0 x13
%0 1 1 0 x23
%1 1 1 0 x123
%0 0 0 1 x4
%1 0 0 1 x14
%0 1 0 1 x24
%1 1 0 1 x124
%0 0 1 1 x34
%1 0 1 1 x134
%0 1 1 1 x234
%1 1 1 1 x1234

clear all;
%number of inputs
N = 4;
% g = [ x1  x2  x12 x3  x13 x23 x123 x4  x14 x24 x124 x34 x134 x234 x1234 ]
g =   [ 0.1 0.2 0.2 0.3 0.3 0.3 0.3  0.4 0.4 0.4 0.4  0.4 0.4  0.4  1 ];

%计算h(x1)=0.2, h(x2)=0.3, h(x3)=0.7 and h(x4)=0.2的choquet积分

choquet_integral([0.2 0.3 0.7 0.2],g)

function [res] = choquet_integral(inputs,FM)
	% for discrete (finite X), first sort our inputs
	[SortVal, SortInd] = sort( inputs,2,'descend'); 
	% append 0 for difference form below
	SortVal = [SortVal zeros(size(inputs,1),1)]; 
	% get the correct indices
	i = cumsum(2.^(SortInd-1),2);
	% compute the integral	
	res = sum(FM(i).*(SortVal(:,1:end-1)-SortVal(:,2:end)),2);
end 
%使用OWA算子计算模糊集结
[g] = fi_owa(ones(1,4)./4)'
choquet_integral( [0.2 0.3 0.7 0.2] , g )

function [FMbinary] = fi_owa( weights )
	% how many inputs? (N)
	nInputs = length(weights);
	% how many variables to make?
	vars = 1:2.^nInputs-1;
	% do our decimal to binary 
	varsBin = de2bi(vars, nInputs);
	% get the number of layers
	layers = sum(varsBin,2);
	% compute the resultant binary encoded fuzzy measure
	FMbinary = arrayfun(@(x) sum(weights(1:x)), layers); 
end 

function [res] = choquet_integral(inputs,FM)
	% for discrete (finite X), first sort our inputs
	[SortVal, SortInd] = sort(inputs,2,'descend'); 
	% append 0 for difference form below
	SortVal = [SortVal zeros(size(inputs,1),1)]; 
	% get the correct indices
	i = cumsum(2.^(SortInd-1),2);
	% compute the integral	
	res = sum(FM(i).*(SortVal(:,1:end-1)-SortVal(:,2:end)),2);
end 
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计量小虫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值