/* Fuzzy regression mixed with FCM */ new; cls; x={1,2,3,5,6,8,9}; y={2,3,2,4,3,5,6}; alpha=0.5; /* 0<=alpha<=1 */ nc=2; w=2; n=rows(x); xx1=ones(n,1)~x; m=10; lambda=100; ngen=10000; dim=n*(nc-1); s=rndu(dim,1); range=zeros(1,dim)|ones(1,dim); ntimes=10; yhats=wfregmcMOCMAESm(alpha,nc,w,y,xx1,m,lambda,ngen,s,range,dim,ntimes,&f); library pgraph; graphset; _plctrl=-1|zeros(nc,1); _pltype=6; xy(x,y~yhats); /* ** fregfcm.txt - Fuzzy regression mixed with FCM. ** (C) Copyright 2011 Yosuke Amijima. All Rights Reserved. ** ** Purpose: Estimates fuzzy regression coefficients considering weighted FCM in terms of common membership matrix. ** We mix fuzzy regression with fuzzy c-means with the ratio of alpha and 1-alpha. ** ** Format: yhats=wfregmcMOCMAESm(alpha,nc,w,y,xx1,m,lambda,ngen,s,range,dim,ntimes,&f); ** ** Input: alpha scalar, weight or ratio of fuzzy regression over fuzzy c-means (0<=alpha<=1) ** ** nc scalar, number of cluster (2,3,...,nc) ** ** w scalar, parameter of power (1