• 基于极限学习机 (ELM) 进行正弦波预测(Matlab代码实现)


     💥💥💞💞欢迎来到本博客❤️❤️💥💥

    🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

    ⛳️座右铭:行百里者,半于九十。

    目录

    💥1 概述

    📚2 运行结果

    🎉3 参考文献

    🌈4 Matlab代码实现

    💥1 概述

    极限学机(Extreme Learning Machine,ELM )神经网络模型与其他方法相比,极限学习机只需设置隐层神经元的数目,通过求解方程β得到唯一的最优解。ELM神经网络模型如图1所示。         
                         

    📚2 运行结果

     部分代码:

    %%%%%%%%%%% Load training dataset
    train_data=TrainingData_File;
    T=train_data(:,1)';
    P=train_data(:,2:size(train_data,2))';
    clear train_data;                                   %   Release raw training data array

    %%%%%%%%%%% Load testing dataset
    test_data=TestingData_File;
    TV.T=test_data(:,1)';
    TV.P=test_data(:,2:size(test_data,2))';
    clear test_data;                                    %   Release raw testing data array

    NumberofTrainingData=size(P,2);
    NumberofTestingData=size(TV.P,2);
    NumberofInputNeurons=size(P,1);

    if Elm_Type~=REGRESSION
        %%%%%%%%%%%% Preprocessing the data of classification
        sorted_target=sort(cat(2,T,TV.T),2);
        label=zeros(1,1);                               %   Find and save in 'label' class label from training and testing data sets
        label(1,1)=sorted_target(1,1);
        j=1;
        for i = 2:(NumberofTrainingData+NumberofTestingData)
            if sorted_target(1,i) ~= label(1,j)
                j=j+1;
                label(1,j) = sorted_target(1,i);
            end
        end
        number_class=j;
        NumberofOutputNeurons=number_class;
           
        %%%%%%%%%% Processing the targets of training
        temp_T=zeros(NumberofOutputNeurons, NumberofTrainingData);
        for i = 1:NumberofTrainingData
            for j = 1:number_class
                if label(1,j) == T(1,i)
                    break; 
                end
            end
            temp_T(j,i)=1;
        end
        T=temp_T*2-1;

        %%%%%%%%%% Processing the targets of testing
        temp_TV_T=zeros(NumberofOutputNeurons, NumberofTestingData);
        for i = 1:NumberofTestingData
            for j = 1:number_class
                if label(1,j) == TV.T(1,i)
                    break; 
                end
            end
            temp_TV_T(j,i)=1;
        end
        TV.T=temp_TV_T*2-1;

    end                                                 %   end if of Elm_Type

    %%%%%%%%%%% Calculate weights & biases
    start_time_train=cputime;

    %%%%%%%%%%% Random generate input weights InputWeight (w_i) and biases BiasofHiddenNeurons (b_i) of hidden neurons
    InputWeight=rand(NumberofHiddenNeurons,NumberofInputNeurons)*2-1;
    BiasofHiddenNeurons=rand(NumberofHiddenNeurons,1);
    tempH=InputWeight*P;
    clear P;                                            %   Release input of training data 
    ind=ones(1,NumberofTrainingData);
    BiasMatrix=BiasofHiddenNeurons(:,ind);              %   Extend the bias matrix BiasofHiddenNeurons to match the demention of H
    tempH=tempH+BiasMatrix;

    🎉3 参考文献

    部分理论来源于网络,如有侵权请联系删除。

    [1]田艳丰,王顺,王哲,刘洋,邢作霞.基于粒子群算法改进极限学习机的风电功率短期预测[J].电器与能效管理技术,2022(3):39-4476

    [2]商立群,李洪波,侯亚东,黄辰浩,张建涛.基于特征选择和优化极限学习机的短期电力负荷预测[J].西安交通大学学报,2022,56(4):165-175

    [3]Apdullah YAYIK (2022). Sine wave learning with Extreme Learning Machine (MWE) 

    🌈4 Matlab代码实现

  • 相关阅读:
    java毕业设计病人追踪治疗信息系统mybatis+源码+调试部署+系统+数据库+lw
    Java面试题之final关键字、常量全面详解
    Java遍历目录下的所有文件
    git版本回退
    KT148A语音芯片的下载板子导入F1A声音下载操作多次只成功一次都没有声音
    OC-范畴
    Spring Boot 使用 Passay 库的自定义密码验证器
    【Go语言实战】(25) 分布式算法 MapReduce
    神经网络深度学习(四)特征处理
    Element-UI 快速入门指南
  • 原文地址:https://blog.csdn.net/weixin_46039719/article/details/127831006