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.
![avatar](https://profile-avatar.csdnimg.cn/3165706ad4e540aeb062dd5ebcf069a7_abc991835105.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
神经网络机器学习智能算法画图绘图
- 粉丝: 2859
- 资源: 660
最新资源
- 滑动平均算法调整功率波动:满足并网标准的1min和10min最大波动分析,滑动平均算法下的功率波动分析:1min与10min波动计算及并网国标满足策略,功率波动求1min和10min波动,滑动平均算法
- 电子工程中Twin T带阻滤波器的设计与实现
- pycharm安装教程.md
- 基于H6光伏逆变器仿真模型:精确控制与量产程序相统一的代码研究,H6光伏逆变器仿真模型:基于量产程序一致的代码控制的高效能源转换策略,H6光伏逆变器仿真模型 和量产程序一致的代码控制 ,H6光伏逆变器
- pycharm安装教程.md
- pycharm安装教程.md
- 松下FP-X模拟量控制程序:用于空调冷冻泵AFPX控制,含TC2模拟量输入与DA2模拟量输出调控变频冷冻泵转速,支持手动与自动控制模式,松下FP-X模拟量控制程序:用于空调冷冻泵AFPX控制及TC2输
- pycharm安装教程.md
- 三台松下PLC控制16轴精准定位程序:固态硬盘组装范例,新颖写法,注释清晰易懂,适合PLC并联与定位学习栗子,三台松下PLC控制16轴精准定位程序:用于固态硬盘组装,手动与自动模式切换,报景与空机运行
- 松下FP-XH Pro7包膜机结构化编程佳作:清晰操作轴,自动与手动模式范例展示,松下FP-XH包膜机结构化编程范例:清晰条例,易学易用,自动分块编写,展示Pro7编程与定位模块实践,松下FP-XH用
- pycharm安装教程.md
- 豆包本地安装包-windows环境
- 新建 Microsoft Word 文档.docx
- 服务器备份软件介绍与推荐
- 基于Matlab2014的分布式光伏接入电网Simulink仿真研究:MPPT控制与双闭环并网策略模型图及结果展示,基于Matlab2014的分布式光伏接入电网Simulink仿真研究:MPPT控制与
- 福布斯亿万富翁收入来源数据集.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)