【预测模型】基于极端随机树实现数据回归预测和分类附matlab代码

1 简介

2 部分代码

function [ensemble,output,scores,depths] = buildAnEnsemble(M,K,nmin,data,problemType,inputType,sampleWeights)%% Builds an ensemble of Extra-Trees for regression or classification% datasets%  % Inputs : % M             = number of trees in the ensemble% K             = number of attributes randomly selected at each node% nmin          = minimum sample size for splitting a node% data          = calibration dataset (targets are in the last column) % problemType   = specify problem type (1 for regression, zero for classification)% inputType     = binary vector indicating feature type(0:categorical,1:numerical)% sampleWeights = weights of the samples (used for IterativeInputSelection)% only include input type for classification problems% %% Outputs : % ensemble  = the ensemble, which is a M-long array of Extra-Tree structs  %             (see buildAnExtraTree for the details regarding each field)   % output    = predictions of the ensemble on the training data set %%%% Copyright 2015 Ahmad Alsahaf% Research fellow, Politecnico di Milano% ahmadalsahaf@gmail.com%% Copyright 2014 Riccardo Taormina % Ph.D. Student, Hong Kong Polytechnic University  % riccardo.taormina@gmail.com %% Please refer to README.txt for bibliographical references on Extra-Trees!%% This file is part of MATLAB_ExtraTrees%%     MATLAB_ExtraTrees is free software: you can redistribute it and/or modify%     it under the terms of the GNU General Public License as published by%     the Free Software Foundation, either version 3 of the License, or%     (at your option) any later version.% %     MATLAB_ExtraTrees is distributed in the hope that it will be useful,%     but WITHOUT ANY WARRANTY; without even the implied warranty of%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%     GNU General Public License for more details.% %     You should have received a copy of the GNU General Public License%     along with MATLAB_ExtraTrees_classification.  If not, see <http://www.gnu.org/licenses/>.if problemType == 0    [ensemble,output,scores,depths] = buildAnEnsemble_r(M,K,nmin,data);    else    [ensemble,output,scores,depths] = buildAnEnsemble_c(M,K,nmin,data,inputType,sampleWeights);%     [ensemble,output,scores,depths] = buildAnEnsemble_c(M,K,nmin,data,sampleWeights);end

3 仿真结果

4 参考文献

[1]金康荣, 於东军. 基于加权朴素贝叶斯分类器和极端随机树的蛋白质接触图预测[J]. 南京航空航天大学学报, 2018, 50(5):10.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

matlab科研助手

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

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

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

打赏作者

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

抵扣说明:

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

余额充值