grayExamples: Examples belonging to both classes

Description Usage Arguments Value Author(s) Examples

View source: R/grayExamples.R

Description

A subset of data with examples having identical values on all attributes (excluding the class attribute also called the decision attribute which is different and has two permited values: positive and negative)

Usage

1
grayExamples(attribute, D)

Arguments

attribute

a matrix or data.frame containing attributes

D

the decision vector

Value

1

a list of pairs of identical examples on all atributes

Author(s)

Waldemar W. Koczkodaj, Alicja Wolny-Dominiak

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#generate data

a=c(); attribute=c()
for (i in 1:3){
a <-sample(c(1,2,3), 100, replace=TRUE)
attribute <-cbind(attribute, a)
attribute=data.frame(attribute)
}
colnames(attribute)=c("a1", "a2", "a3")
names(attribute)

decision=sample(c(0,1), 100, replace=TRUE)

#check examples
grayExamples(attribute, decision)

RatingScaleReduction documentation built on Jan. 21, 2021, 5:06 p.m.