cut_attrs: Select Attributes by Score Depending on the Cutoff

View source: R/cut_attrs.R

cut_attrsR Documentation

Select Attributes by Score Depending on the Cutoff

Description

Select attributes by their score/rank/weights, depending on the cutoff that may be specified by the percentage of the highest ranked attributes or by the number of the highest ranked attributes.

Usage

cut_attrs(attrs, k = 0.5)

Arguments

attrs

A data.frame with attributes' importance.

k

A numeric. For k >= 1 it takes floor(k) and then it indicates how many attributes to take with the highest attribute rank (chooses k best attributes). For 0 < k < 1 it stands for the percent of top attributes to take (chooses best k * 100% of attributes).

Author(s)

Damian Skrzypiec damian.j.skrzypiec@gmail.com and Zygmunt Zawadzki zygmunt@zstat.pl

Examples


x <- information_gain(Species ~ ., iris)
cut_attrs(attrs = x)
to_formula(cut_attrs(attrs = x), "Species")
cut_attrs(attrs = x, k = 1)

FSelectorRcpp documentation built on April 28, 2023, 5:07 p.m.