基于PSO算法的增量ELM算法【Matlab源码】

Fitness Function

lfunction fit  = fitness(x,P,NumberofInputNeurons,NumberofTrainingData,E) % FITNESS FUNCTION FOR pso
    InputWeight=x(1,NumberofInputNeurons); %  w = rand(1,noofin)
    BiasofHiddenNeurons=x(NumberofInputNeurons+1);
    ind=ones(1,NumberofTrainingData);
    BiasMatrix=BiasofHiddenNeurons(:,ind);% bias
    H=(1 ./ (1 + exp(-(InputWeight*P+BiasMatrix)))); % H =  (1 / 1 + exp  (w *P + bias)
    %clear p;
    tempH = pinv(H'); % Temph =  H^-1
    B= tempH * E'; % Beta = H^-1 * E
    E = E - (H'*B)';% E = E - H*beta
    fit=sqrt(mse(E));
end

Results:
Sonar(Classification)
• Training Accuracy: 85.60%
• Training Time: 541.5938s
• Testing Accuracy: 63.10%
• Testing Time: 0.007s

Wine Quality(Regrassion)
• Training RMSE:0.4930
• Training Time: 359.7500s
• Testing RMSE: 0.4837
• Testing Time: 0.0005s

获取完整代码和文档请阅读全文

隐藏内容 需要支付:¥10

未经允许不得转载!基于PSO算法的增量ELM算法【Matlab源码】