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
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.
没有合适的资源?快使用搜索试试~ 我知道了~
机器学及其matlab实现—从基础到实践.zip
共113个文件
m:17个
rar:16个
pdf:15个
1星 需积分: 49 57 下载量 112 浏览量
2019-08-08
09:30:34
上传
评论 2
收藏 28.13MB ZIP 举报
温馨提示
机器学及其matlab实现—从基础到实践;
资源推荐
资源详情
资源评论
收起资源包目录
机器学及其matlab实现—从基础到实践.zip (113个子文件)
qsort.c 5KB
qsort.c 5KB
Compile_Check 856B
Compile_Check_kcachegrind 611B
Compile_Check_memcheck 623B
reg_RF.cpp 39KB
classRF.cpp 33KB
mex_regressionRF_train.cpp 12KB
diabetes_C_wrapper.cpp 11KB
twonorm_C_wrapper.cpp 10KB
rfutils.cpp 9KB
classTree.cpp 9KB
mex_ClassificationRF_train.cpp 8KB
cokus.cpp 7KB
cokus.cpp 7KB
mex_ClassificationRF_predict.cpp 5KB
mex_regressionRF_predict.cpp 4KB
cokus_test.cpp 1KB
cokus_test.cpp 1KB
data.csv 204B
twonorm_C_devcpp.dev 2KB
diabetes_C_devc.dev 1KB
picture1.eps 101KB
rfsub.f 15KB
rf.h 5KB
reg_RF.h 560B
Example_1.html 25KB
main.html 16KB
main.html 16KB
classRF_train.m 14KB
regRF_train.m 13KB
tutorial_ClassRF.m 10KB
tutorial_RegRF.m 9KB
Example_1.m 4KB
main.m 3KB
main.m 3KB
classRF_predict.m 2KB
compile_windows.m 2KB
test_RegRF_extensively.m 1KB
regRF_predict.m 986B
compile_linux.m 952B
compile_windows.m 801B
test_ClassRF_extensively.m 604B
compile_linux.m 557B
myFunction.m 248B
myScript.m 227B
Makefile 3KB
Makefile 2KB
diabetes.mat 259KB
data.mat 84KB
data.mat 84KB
twonorm.mat 48KB
data.mat 35KB
mexClassRF_train.mexw64 43KB
mexClassRF_predict.mexw64 26KB
rfsub.o 10KB
rfsub.o 10KB
rfsub.o 7KB
MATLAB揭秘.pdf 7.23MB
Class_3.pdf 879KB
Class_1.pdf 762KB
Class_2.pdf 674KB
Class_11.pdf 664KB
Class_8.pdf 622KB
Class_4.pdf 612KB
Class_13.pdf 605KB
Class_9.pdf 578KB
Class_5.pdf 574KB
Class_10.pdf 570KB
Class_6.pdf 541KB
Class_7.pdf 529KB
Class_12.pdf 471KB
TutorialForFarutoUltimate3.0.pdf 217KB
main_01.png 38KB
main_04.png 32KB
main_03.png 28KB
main_01.png 9KB
main_02.png 5KB
main_02.png 5KB
main.png 4KB
main.png 2KB
References.rar 7.81MB
Class_10_Code.rar 1.73MB
Class_8_Code.rar 970KB
Class_6_Code.rar 521KB
Class_4_Code.rar 213KB
Class_7_Code.rar 201KB
Class_3_Code.rar 181KB
Class_9_Code.rar 135KB
Class_12_Code.rar 132KB
Class_1_Code.rar 73KB
Class_13_Code.rar 44KB
Class_11_Code.rar 26KB
Class_2_Code.rar 14KB
Homework_Dataset.rar 7KB
Class_5_Code.rar 6KB
Homework_Dataset.rar 2KB
MacOS_precompiled-WITHOUT_SOURCE-v0.02.tar 350KB
X_diabetes.txt 108KB
X_twonorm.txt 94KB
共 113 条
- 1
- 2
资源评论
- 这世界比瞳孔还漆黑2020-05-11没有用,没有视频教程。隔壁家的pan有
qq_31508371
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- IRF7103ITRPBF-VB一款2个N-Channel沟道SOP8的MOSFET晶体管参数介绍与应用说明
- Fine Report-JS跑马灯及日期频度和控件公式展示
- Go 进阶实战 100 题.pdf
- IRF7102TRPBF-VB一款2个N-Channel沟道SOP8的MOSFET晶体管参数介绍与应用说明
- 电子通信设计资料无线你我他-认识红外线接口
- Python3实现基数排序(源代码)
- IRF5803D2TRPBF-VB一款2个P-Channel沟道SOP8的MOSFET晶体管参数介绍与应用说明
- newrelic的2024 年 Java 生态系统状
- 学生通讯录管理系统.py
- IM4953G-VB一款2个P-Channel沟道SOP8的MOSFET晶体管参数介绍与应用说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功