build_matrix: Build a 28x28 matrix from the two coordinate vectors x and y...

View source: R/utils_helpers.R

build_matrixR Documentation

Build a 28x28 matrix from the two coordinate vectors x and y corresponding to the two axis of the Yes and No boxes.

Description

First round the vectors and then output binary matrix indicating which points are drawn (the pixels)

Usage

build_matrix(x, y)

Arguments

x

numeric vector with domain [1,28] / corresponding to the x axis of the box

y

numeric vector with domain [1,28] / corresponding to the y axis of the box

Value

a 28x28 matrix of 0 and 1

Author(s)

Emanuel Sommer

Examples

build_matrix(c(1, 1, 3.3, 5, 27.9), c(1, 1, 7.000012, 5.555, 28))

EmanuelSommer/YesNoDetect documentation built on March 30, 2023, 7:03 a.m.