Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mlbench.xor

Continuous XOR Benchmark Problem


Description

The inputs of the XOR problem are uniformly distributed on the d-dimensional cube with corners {+-1}. Each pair of opposite corners form one class, hence the total number of classes is 2^(d-1)

Usage

mlbench.xor(n, d=2)

Arguments

n

number of patterns to create

d

dimension of the XOR problem

Value

Returns an object of class "mlbench.xor" with components

x

input values

classes

factor vector of length n with target classes

Examples

# 2d example
p<-mlbench.xor(300,2)
plot(p)
#
# 3d example
p<-mlbench.xor(300,3)
plot(p)

mlbench

Machine Learning Benchmark Problems

v2.1-3
GPL-2
Authors
Friedrich Leisch and Evgenia Dimitriadou.
Initial release
2021-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.