AFEAtureSelectionToolboxforC/C++&MATLAB/OCTAVE,v2.0.0.
FEASTprovidesimplementationsofcommonmutualinformationbasedfilterfeatureselectionalgorithms,andanimplementationofRELIEF.Allfunctionsexpectdiscreteinputs(exceptRELIEF,whichdoesnotdependontheMIToolbox),andtheyreturntheselectedfeatureindices.Theseimplementationsweredevelopedtohelpourresearchintothesimilaritiesbetweenthesealgorithms,andourresultsarepresentedinthefollowingpaper:
ConditionalLikelihoodMaximisation:AUnifyingFrameworkforInformationTheoreticFeatureSelectionG.Brown,A.Pocock,M.-J.Zhao,M.LujanJournalofMachineLearningResearch,13:27-66(2012)TheweightedfeatureselectionalgorithmsaredescribedinChapter7of:
FeatureSelectionviaJointLikelihoodA.PocockPhDThesis,UniversityofManchester,2012Ifyouusetheseimplementationsforacademicresearchpleasecitetherelevantpaperabove.AllFEASTcodeislicensedundertheBSD3-ClauseLicense.
Containsimplementationsof:mim,mrmr,mifs,cmim,jmi,disr,cife,icap,condred,cmi,relief,fcbf,betagamma
Andweightedimplementationsof:mim,cmim,jmi,disr,cmi
Referencesforthesealgorithmsareprovidedintheaccompanyingfeast.bibfile(inBibTeXformat).
FEASTworksondiscreteinputs,andallcontinuousvaluesmustbediscretisedbeforeusewithFEAST.Inourexperimentswe'vefoundthatusing10equalwidthbinsissuitableformanyproblems,thoughthisisdatasetsizedependent.FEASTproducesunreliableresultswhenusedwithcontinuousinputs,runsslowlyandusesmuchmorememorythanusual.Thediscreteinputsshouldhavesmallcardinality,FEASTwilltreatvalues{1,10,100}thesamewayittreats{1,2,3}andthelatterwillbebothfasteranduselessmemory.
MATLABExample(using"data"asourfeaturematrix,and"labels"astheclasslabelvector):
>>size(data)ans=(569,30)%%denoting569examples,and30features>>selectedIndices=feast('jmi',5,data,labels)%%selectingthetop5featuresusingthejmialgorithmselectedIndices=282182723>>selectedIndices=feast('mrmr',10,data,labels)%%selectingthetop10featuresusingthemrmralgorithmselectedIndices=28242282721294725>>selectedIndices=feast('mifs',5,data,labels,0.7)%%selectingthetop5featuresusingthemifsalgorithmwithbeta=0.7selectedIndices=2824222029ThelibraryiswritteninANSICforcompatibilitywiththeMATLABmexcompiler,exceptforMIM,FCBFandRELIEF,whicharewritteninMATLAB/OCTAVEscript.ThereisadifferentimplementationofMIMavailableforuseintheClibrary.
MIToolboxv3.0.0isrequiredtocompilethesealgorithms,andtheseimplementationssupercedetheexampleimplementationsgiveninthatpackage(theyhavemorerobustbehaviourwhenusedwithunexpectedinputs).
MIToolboxcanbefoundat:https://www.github.com/Craigacp/MIToolbox/
TheClibraryexpectsallmatricesincolumn-majorformat(i.e.Fortranstyle).Thisisfortworeasons,a)MATLABgeneratesFortran-stylearrays,andb)featureselectioniteratesovercolumnsratherthanrows,unlikemostotherMLprocesses.
Compilationinstructions:
MATLAB/OCTAVErunCompileFEAST.minthematlabfolder.LinuxCsharedlibraryrunmakex86ormakex64fora32-bitor64-bitlibrary.WindowsCdll(expectsprebuiltlibMIToolbox.dll)installMinGWfromhttps://sourceforge.net/projects/mingw-w64/addMinGWbinariesfolderstoPATH,e.g.mingw/bin,mingw/msys/binrunmakex64_win.Java(requiresJava8)runmakex64,sudomakeinstalltobuildandinstalltheClibrary.thenmakejavatobuildtheJNIwrapper.thenrunmvnpackageinthejavadirectorytobuildthejarfile.Note:theJavacodeshouldworkonallplatformsandfutureversionsofJava,buttheincludedMakefileonlyworksonUbuntu&Java8.UpdateHistory
07/01/2017-v2.0.0-Addedweightedfeatureselection,majorrefactoringofthecodetoimprovespeedandportability.FEASTfunctionsnowreturntheinternalscoresassignedbyeachcriteriaaswell.AddedaJavaAPIviaJNI.FEASTv2isapproximately30%fasterwhencalledfromMatlab.12/03/2016-v1.1.4-FixedanissuewhereMatlabwouldsegfaultifallfeatureshadzeroMIwiththelabel.12/10/2014-v1.1.2-UpdateddocumentationtonotethatFEASTexpectscolumn-majormatrices.11/06/2014-v1.1.1-FixedanissuewhereMIMwasn'tcompiledintolibFSToolbox.22/02/2014-v1.1.0-Bugfixesinmemoryallocation,addedaCimplementationofMIM,movedtheselectedfeatureincrementintothemexcode.12/02/2013-v1.0.1-Bugfixfor32-bitWindowsMATLAB'slcc.08/11/2011-v1.0.0-PublicReleasetocomplementtheJMLRpublication.
评论