計算這個智力題:
在這個乘法算式里,每一個字母代表著0-9中的一個數,不同字母代表不同數。
A B C D E F G H
* A J
---------------------
E J A H F D G K C
B D F H A J E C
---------------------
C C C C C C C C C
請問,C 代表哪個數字?
PRINCIPLE: The UVE algorithm detects and eliminates from a PLS model (including from 1 to A components) those variables that do not carry any relevant information to model Y. The criterion used to trace the un-informative variables is the reliability of the regression coefficients: c_j=mean(b_j)/std(b_j), obtained by jackknifing. The cutoff level, below which c_j is considered to be too small, indicating that the variable j should be removed, is estimated using a matrix of random variables.The predictive power of PLS models built on the retained variables only is evaluated over all 1-a dimensions =(yielding RMSECVnew).
function [U,center,result,w,obj_fcn]= fenlei(data)
[data_n,in_n] = size(data)
m= 2 % Exponent for U
max_iter = 100 % Max. iteration
min_impro =1e-5 % Min. improvement
c=3
[center, U, obj_fcn] = fcm(data, c)
for i=1:max_iter
if F(U)>0.98
break
else
w_new=eye(in_n,in_n)
center1=sum(center)/c
a=center1(1)./center1
deta=center-center1(ones(c,1),:)
w=sqrt(sum(deta.^2)).*a
for j=1:in_n
w_new(j,j)=w(j)
end
data1=data*w_new
[center, U, obj_fcn] = fcm(data1, c)
center=center./w(ones(c,1),:)
obj_fcn=obj_fcn/sum(w.^2)
end
end
display(i)
result=zeros(1,data_n) U_=max(U)
for i=1:data_n
for j=1:c
if U(j,i)==U_(i)
result(i)=j continue
end
end
end
function [U,V,num_it]=fcm(U0,X)
% MATLAB (Version 4.1) Source Code (Routine fcm was written by Richard J.
% Hathaway on June 21, 1994.) The fuzzification constant
% m = 2, and the stopping criterion for successive partitions is epsilon =??????.
%*******Modified 9/15/04 to have epsilon = 0.00001 and fix univariate bug********
% Purpose:The function fcm attempts to find a useful clustering of the
% objects represented by the object data in X using the initial partition in U0.