Random-Forest-Classify
所属分类:人工智能/神经网络/深度学习
开发工具:Visual C++
文件大小:161KB
下载次数:50
上传日期:2013-11-20 21:13:06
上 传 者:
红尘里一迷途小书童
说明: 随机森林分类器,用Opencv与C混合编程实现,程序包含如何分类及训练,对初学者有一定的帮助
(Random Forest classifier, using Opencv with C mixed programming, the program includes how to classify and training, there is some help for beginners
)
文件列表:
Random Forest Classify\classRF_predict.m (2166, 2009-05-17)
Random Forest Classify\classRF_train.m (14829, 2009-05-17)
Random Forest Classify\Compile_Check (856, 2009-04-25)
Random Forest Classify\compile_linux.m (557, 2009-05-17)
Random Forest Classify\compile_windows.m (1718, 2010-02-06)
Random Forest Classify\data\twonorm.mat (48856, 2009-04-25)
Random Forest Classify\data\X_twonorm.txt (96300, 2009-04-25)
Random Forest Classify\data\Y_twonorm.txt (600, 2009-04-25)
Random Forest Classify\Makefile (2693, 2009-05-17)
Random Forest Classify\Makefile.windows (2523, 2009-05-17)
Random Forest Classify\mexClassRF_predict.mexw32 (20992, 2010-02-06)
Random Forest Classify\mexClassRF_predict.mexw64 (26624, 2010-02-06)
Random Forest Classify\mexClassRF_train.mexw32 (32256, 2010-02-06)
Random Forest Classify\mexClassRF_train.mexw64 (46080, 2010-02-06)
Random Forest Classify\precompiled_rfsub\win32\rfsub.o (6848, 2009-04-25)
Random Forest Classify\precompiled_rfsub\win64\rfsub.o (9840, 2009-04-25)
Random Forest Classify\rfsub.o (9840, 2009-04-25)
Random Forest Classify\src\classRF.cpp (33889, 2009-05-17)
Random Forest Classify\src\classTree.cpp (8947, 2009-05-17)
Random Forest Classify\src\cokus.cpp (7678, 2009-04-25)
Random Forest Classify\src\cokus_test.cpp (1189, 2009-04-25)
Random Forest Classify\src\mex_ClassificationRF_predict.cpp (5225, 2009-05-17)
Random Forest Classify\src\mex_ClassificationRF_train.cpp (8545, 2009-05-17)
Random Forest Classify\src\qsort.c (4676, 2009-04-25)
Random Forest Classify\src\rf.h (5186, 2009-05-17)
Random Forest Classify\src\rfsub.f (15851, 2009-04-25)
Random Forest Classify\src\rfutils.cpp (9609, 2009-05-17)
Random Forest Classify\src\twonorm_C_wrapper.cpp (9865, 2009-05-17)
Random Forest Classify\test_ClassRF_extensively.m (604, 2009-05-17)
Random Forest Classify\tutorial_ClassRF.m (10403, 2009-05-17)
Random Forest Classify\twonorm_C_devcpp.dev (1783, 2009-04-25)
Random Forest Classify\Version_History.txt (1470, 2010-02-06)
Random Forest Classify\precompiled_rfsub\linux64 (0, 2012-11-16)
Random Forest Classify\precompiled_rfsub\win32 (0, 2012-11-16)
Random Forest Classify\precompiled_rfsub\win64 (0, 2012-11-16)
Random Forest Classify\data (0, 2012-11-16)
Random Forest Classify\precompiled_rfsub (0, 2012-11-16)
Random Forest Classify\src (0, 2012-11-16)
Random Forest Classify\tempbuild (0, 2012-11-16)
... ...
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/*** 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.
近期下载者:
相关文件:
收藏者: