knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Assume we have
testxgb_base which is a xgboost modeldata with name my_pred.csvphv_pred(test,xgb_base,dir='data',output_name='my_pred.csv')
The official target metric on the site is not usual, thus here is the function I wrap the metric into.
Assume you finish your model and get four coloumn in dataset dataset,
id is the id of the phv machinet is time to record every y and x variablesp is the real power, in this contest, it is the target we want to predict.phat is the predicted power, we want it to approach the real one.library(add2evaluation) data(dataset) library(lubridate) library(psych) library(tidyverse) dataset %>% describe() phv_metric( id = dataset$short_name ,t = dataset$t ,y = dataset$p ,yhat = dataset$phat )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.