library(lunarLearningAlgorithms)
library(testthat)
context("minnaert")
testthat::test_that("minnaert computes expected output",{
hard_incidence <- as.numeric(c(84.106289446623, 55.328513822534, 38.106289446623, 45.345737285, 24.324, 30.324))
hard_emission <- as.numeric(c(38.288719431206, 0.13392142633291, 4.573728543534, 23.737285372, 54.345, 14.4))
hard_phase <- as.numeric(c(120.59515694473, 55.329415379509, 100.1339214473, 154.9728542, 55.57, 47.00))
hard_test_i <- c(45.345, 30.324, .0323163)
hard_test_e <- c(33.372, 54.345, 14.4)
hard_test_p <- c(54.942, 21.57, 22.00)
makeshiftX.mat <- as.matrix(data.frame(hard_incidence, hard_emission, hard_phase))
makeshiftY.vec <- as.numeric(c(0.0607816, 0.078306 , 0.098325, 0.052368, .0163620, 0.0757853))
makeshiftTestX.mat <- as.matrix(data.frame(hard_test_i, hard_test_e, hard_test_p))
predictions <- minnaertPredict(makeshiftX.mat, makeshiftY.vec, makeshiftTestX.mat, nrow(makeshiftTestX.mat))
# analyse the results
testthat::expect_equal(1, 1)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.