首页 > 行业资讯 > 【预测模型】基于极端随机树实现数据回归预测和分类附matlab代码

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

时间:2022-06-10 来源: 浏览:

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

天天Matlab 天天Matlab
天天Matlab

TT_Matlab

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,完整matlab代码或者程序定制加qq1575304183。

收录于合集

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 % % % Copyright 2014 Riccardo Taormina % Ph.D. Student, Hong Kong Polytechnic University % % % 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代码问题可私信交流。

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

版权:如无特殊注明,文章转载自网络,侵权请联系cnmhg168#163.com删除!文件均为网友上传,仅供研究和学习使用,务必24小时内删除。
相关推荐