FSelector

更新时间:2023-07-07 05:22:16 阅读: 评论:0

Package‘FSelector’
August29,2013
Type Package
Title Selecting attributes
Version0.19
Date2013-02-28
Author Piotr Romanski
Maintainer Lars Kotthoff<larsko@4c.ucc.ie>
Description This package provides functions for lecting attributes
from a given datat.Attribute subt lection is the process
of identifying and removing as much of the irrelevant and redundant information as possible. Licen GPL-2
Imports randomForest,RWeka,digest
Suggests mlbench,rpart
LazyLoad yes
NeedsCompilation no
Repository CRAN
Date/Publication2013-02-2814:10:21
R topics documented:
FSelector-package (2)
as.simple.formula (3)
best.first.arch (3)
cfs (5)
chi.squared (6)
consistency (7)
correlation (8)
cutoff (9)this复数
1
2FSelector-package entropy.bad (10)
以权谋私
exhaustive.arch (11)
greedy.arch (12)回收期
hill.climbing.arch (14)
oneR (15)
random.forest.importance (16)
relief (17)
Index19 FSelector-package Package for lecting attributes
Description
Package containing functions for lecting attributes from a given datat and a destination attribute. Details
Package:FSelector
Type:Package
ncrVersion:0.19
Date:2013-02-28
Licen:GPL
LazyLoad:yes
This package contains:
•-Algorithms forfiltering attributes:cfs,chi.squared,information.gain,gain.ratio,symmetri-
cal.lation,oneR,relief,consistency,random.forest.importance •-Algorithms for wrapping classifiers and arch attribute subt space:best.first.arch,back-
ward.arch,forward.arch,hill.climbing.arch
•-Algorithm for choosing a subt of attributes bad on attributes’weights:cutoff.k,cut-
off.k.percent,cutoff.biggest.diff
•-Algorithm for creating formulas:as.simple.formula
Author(s)
Piotr Romanski
Maintainer:Lars Kotthoff<larsko@4c.ucc.ie>
as.simple.formula3 as.simple.formula Converting to formulas
Description
Converts character vector of atrributes’names and destination attribute’s name to a simple formula. Usage
as.simple.formula(attributes,class)
Arguments
attributes character vector of attributes’names
class name of destination attribute
Value
A simple formula like"class~attr1+attr2"
Author(s)
Piotr Romanski
Examples
data(iris)
result<-cfs(Species~.,iris)
f<-as.simple.formula(result,"Species")
best.first.arch Best-first arch
Description
The algorithm for arching atrribute subt space.
活着的读后感Usage
best.first.arch(attributes,eval.fun,max.backtracks=5)
Arguments
attributes a character vector of all attributes to arch in
eval.fun a function taking asfirst parameter a character vector of all attributes and return-ing a numeric indicating how important a given subt is
max.backtracks an integer indicating a maximum allowed number of backtracks,default is5
4best.first.arch Details
The algorithm is similar to forward.arch besides the fact that is choos the best node from all already evaluated ones and evaluates it.The lection of the best node is repeated approximately max.brackets times in ca no better node found.
Value
A character vector of lected attributes.
Author(s)
Piotr Romanski
See Also
forward.arch,backward.arch,hill.climbing.arch,exhaustive.arch
Examples
library(rpart)
星际穿越影评data(iris)
evaluator<-function(subt){
#k-fold cross validation
k<-5
splits<-runif(nrow(iris))
results=sapply(1:k,function(i){
test.idx<-(splits>=(i-1)/k)&(splits<i/k)
刘邦杀韩信train.idx<-!test.idx
test<-iris[test.idx,,drop=FALSE]
train<-iris[train.idx,,drop=FALSE]
tree<-rpart(as.simple.formula(subt,"Species"),train)
error.rate=sum(test$Species!=predict(tree,test,type="c"))/nrow(test)
return(1-error.rate)
})
print(subt)
print(mean(results))
孙组词语return(mean(results))
}
subt<-best.first.arch(names(iris)[-5],evaluator)
f<-as.simple.formula(subt,"Species")
print(f)
cfs5 cfs CFSfilter
Description
The algorithmfinds attribute subt using correlation and entropy measures for continous and dis-crete data.
Usage
cfs(formula,data)
Arguments
formula a symbolic description of a model
data data to process
Details
The alorithm makes u of best.first.arch for arching the attribute subt space.
Value
a character vector containing chon attributes
Author(s)
Piotr Romanski
See Also
best.first.arch
Examples
data(iris)
subt<-cfs(Species~.,iris)
f<-as.simple.formula(subt,"Species")
print(f)

本文发布于:2023-07-07 05:22:16,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1071217.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:穿越   读后感   星际   活着   影评
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图