【预测模型】基于极端随机树实现数据回归预测和分类附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代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
-
2023年血糖新标准公布,不是3.9-6.1,快来看看你的血糖正常吗? 2023-02-07
-
2023年各省最新电价一览!8省中午执行谷段电价! 2023-01-03
-
GB 55009-2021《燃气工程项目规范》(含条文说明),2022年1月1日起实施 2021-11-07
-
PPT导出高分辨率图片的四种方法 2022-09-22
-
2023年最新!国家电网27家省级电力公司负责人大盘点 2023-03-14
-
全国消防救援总队主官及简历(2023.2) 2023-02-10
-
盘点 l 中国石油大庆油田现任领导班子 2023-02-28
-
我们的前辈!历届全国工程勘察设计大师完整名单! 2022-11-18
-
关于某送变电公司“4·22”人身死亡事故的快报 2022-04-26
