mex/standalone interface to Andy Liaw et al.'s C code (used in R package randomForest)
Added by Abhishek Jaiantilal ( abhishek.jaiantilal@colorado.edu )
License: GPLv2
Version: 0.02
Added Binaries for Windows 32/64 bit
Commented out compile_windows.m, if you feel upto it, remove the comments and recompile
CLASSIFICATION BASED RANDOMFOREST
****A tutorial for matlab now in tutorial_ClassRF.m****
Ways to generate Mex's and Standalone files
rfsub.o is compiled using fortran from rfsub.f. In case cywin or a fortran
compiler is not present just copy the appropriate (depending on OS)
rfsub.o from precompiled_rfsub directory to the current directory
___STANDALONE____ (not exactly standalone but an interface via C)
An example for a C file using the twonorm dataset for classification
is shown in src/twonorm_C_wrapper.cpp
This is a standalone version that needs to set right parameters in CPP file.
Compiling in windows:
Method 1: use cygwin and make: go to current directory and run 'make twonorm -f Makefile.windows'
in cygwin command prompt. Need to have gcc/g++ and g77 (in cygwin)
installed. Also the custom makefile differs from the linux version which has -lgfortran
whereas the windows version doesn't. Will generate twonorm_test.exe
Method 2: use DevC++ (download from http://www.bloodshed.net/devcpp.html ).
Open the twonorm_C_devc.dev file which is a project file which has the sources
etc set. Just compile and run. Will generate twonorm_C_devcpp.exe
Compiling in linux:
Method 1: use linux and make: go to this directory and run 'make diabetes'
in command prompt. Need to have gcc/g++ and fortran installed. Will generate diabetes_test.
run as ./diabetes_test
___MATLAB___
generates Mex files that can be called in Matlab directly.
Compiling in windows:
Use the compile_windows.m and run in windows. It will compile and generate
appropriate mex files. Need Visual C++ or some other compiler
(VC++ express edition also works). Won't work with Matlab's inbuilt compiler (lcc)
Compiling in linux:
Use the compile_linux.m and run in windows. It will compile and generate
appropriate mex files.
Using the Mex interface:
There are 2 functions classRF_train and classRF_predict as given below.
See the sample file test_ClassRF_extensively.m
%function Y_hat = classRF_predict(X,model)
%requires 2 arguments
%X: data matrix
%model: generated via classRF_train function
%function model = classRF_train(X,Y,ntree,mtry, extra_options)
%requires 2 arguments and the rest 2 are optional
%X: data matrix
%Y: target values
%ntree (optional): number of trees (default is 500)
%mtry (default is max(floor(D/3),1) D=number of features in X)
%there are about 14 odd options for extra_options. Refer to tutorial_ClassRF.m to examine them
Version History:
v0.02 (May-15-09):Updated so that classification package now has about 95% of the total options
that the R-package gives. Woohoo. Tracing of what happening behind screen works better.
v0.01 (Mar-22-09): very basic interface for mex/standalone to Liaw et al's
randomForest Package supports only ntree and mtry changing for time being.
没有合适的资源?快使用搜索试试~ 我知道了~
粒子群优化RF多分类,天鹰算法优化RF多分类,BP神经网络多分类,RF多分类,PSO-RF多分类,AO-RF多分类
共43个文件
m:22个
xls:4个
mat:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 61 浏览量
2023-08-18
07:30:08
上传
评论 1
收藏 549KB RAR 举报
温馨提示
基于MATLAB编程,用粒子群优化RF多分类,天鹰算法优化RF多分类,BP神经网络多分类,RF多分类,代码完整,包含数据,有注释,方便扩展应用 1,如有疑问,不会运行,可以私信, 2,需要创新,或者修改可以扫描二维码联系博主, 3,本科及本科以上可以下载应用或者扩展, 4,内容不完全匹配要求或需求,可以联系博主扩展。
资源推荐
资源详情
资源评论
收起资源包目录
代码2.rar (43个子文件)
rfsub.o 10KB
classRF_train.m 15KB
train+test
变量数据
输出变量Y-train.xls 31KB
输入变量X-train.xls 132KB
测试数据
测试数据X-test.xls 67KB
测试数据Y-test.xlsx 11KB
compile_linux.m 557B
initialization.m 398B
main01.m 3KB
pso_rf.m 5KB
maydatapso.mat 195KB
mexClassRF_predict.mexw32 21KB
test_ClassRF_extensively.m 604B
Makefile 3KB
R_2.m 316B
funv.m 74B
pso_rf.asv 5KB
tutorial_ClassRF.m 10KB
README.txt 3KB
MSE_RMSE_MBE_MAE_MAPE.m 443B
classRF_predict.m 2KB
datapca.mat 89KB
mainbp.m 2KB
funz.m 231B
AO.m 3KB
twonorm_C_devcpp.dev 2KB
Makefile.windows 2KB
mexClassRF_predict.mexw64 26KB
fun2.m 1018B
main01.asv 3KB
maydata.mat 63KB
Compile_Check 856B
mexClassRF_train.mexw64 45KB
compile_windows.m 2KB
mexClassRF_train.mexw32 32KB
func_plot.m 2KB
fun.m 932B
Get_F.m 158B
Version_History.txt 1KB
main02.m 2KB
aorf.m 2KB
funx.m 58B
测试数据.xls 19KB
共 43 条
- 1
资源评论
神经网络机器学习智能算法画图绘图
- 粉丝: 2794
- 资源: 659
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功