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

h2o.dct

Compute DCT of an H2OFrame


Description

Compute the Discrete Cosine Transform of every row in the H2OFrame

Usage

h2o.dct(data, destination_frame, dimensions, inverse = FALSE)

Arguments

data

An H2OFrame object representing the dataset to transform

destination_frame

A frame ID for the result

dimensions

An array containing the 3 integer values for height, width, depth of each sample. The product of HxWxD must total up to less than the number of columns. For 1D, use c(L,1,1), for 2D, use C(N,M,1).

inverse

Whether to perform the inverse transform

Value

Returns an H2OFrame object.

Examples

## Not run: 
  library(h2o)
  h2o.init()
  df <- h2o.createFrame(rows = 1000, cols = 8 * 16 * 24,
                        categorical_fraction = 0, integer_fraction = 0, missing_fraction = 0)
  df1 <- h2o.dct(data = df, dimensions = c(8 * 16 * 24, 1, 1))
  df2 <- h2o.dct(data = df1, dimensions = c(8 * 16 * 24, 1, 1), inverse = TRUE)
  max(abs(df1 - df2))

  df1 <- h2o.dct(data = df, dimensions = c(8 * 16, 24, 1))
  df2 <- h2o.dct(data = df1, dimensions = c(8 * 16, 24, 1), inverse = TRUE)
  max(abs(df1 - df2))

  df1 <- h2o.dct(data = df, dimensions = c(8, 16, 24))
  df2 <- h2o.dct(data = df1, dimensions = c(8, 16, 24), inverse = TRUE)
  max(abs(df1 - df2))

## End(Not run)

h2o

R Interface for the 'H2O' Scalable Machine Learning Platform

v3.32.1.2
Apache License (== 2.0)
Authors
Erin LeDell [aut, cre], Navdeep Gill [aut], Spencer Aiello [aut], Anqi Fu [aut], Arno Candel [aut], Cliff Click [aut], Tom Kraljevic [aut], Tomas Nykodym [aut], Patrick Aboyoun [aut], Michal Kurka [aut], Michal Malohlava [aut], Ludi Rehak [ctb], Eric Eckstrand [ctb], Brandon Hill [ctb], Sebastian Vidrio [ctb], Surekha Jadhawani [ctb], Amy Wang [ctb], Raymond Peck [ctb], Wendy Wong [ctb], Jan Gorecki [ctb], Matt Dowle [ctb], Yuan Tang [ctb], Lauren DiPerna [ctb], Tomas Fryda [ctb], H2O.ai [cph, fnd]
Initial release
2021-04-29

We don't support your browser anymore

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