View source: R/FakeDataGenerator.R
FakeDataGenerator | R Documentation |
Create fake data for examples
FakeDataGenerator(
Correlation = 0.7,
N = 1000L,
ID = 5L,
FactorCount = 2L,
AddDate = TRUE,
AddComment = FALSE,
AddWeightsColumn = FALSE,
ZIP = 5L,
TimeSeries = FALSE,
TimeSeriesTimeAgg = "day",
ChainLadderData = FALSE,
Classification = FALSE,
MultiClass = FALSE
)
Correlation |
Set the correlation value for simulated data |
N |
Number of records |
ID |
Number of IDcols to include |
FactorCount |
Number of factor type columns to create |
AddDate |
Set to TRUE to include a date column |
AddComment |
Set to TRUE to add a comment column |
ZIP |
Zero Inflation Model target variable creation. Select from 0 to 5 to create that number of distinctly distributed data, stratifed from small to large |
TimeSeries |
For testing AutoBanditSarima |
TimeSeriesTimeAgg |
Choose from "1min", "5min", "10min", "15min", "30min", "hour", "day", "week", "month", "quarter", "year", |
ChainLadderData |
Set to TRUE to return Chain Ladder Data for using AutoMLChainLadderTrainer |
Classification |
Set to TRUE to build classification data |
MultiClass |
Set to TRUE to build MultiClass data |
Adrian Antico
## Not run:
# Create dummy data to test regression, classification, and multiclass models.
# I don't care too much about actual relationships but I can test out on the
# regression problem since those variables will be correlated. The binary and
# multiclass won't however since they were created separately.
# Regression
data <- AutoQuant::FakeDataGenerator(
Correlation = 0.77,
N = 1000000L,
ID = 4L,
FactorCount = 5L,
AddDate = TRUE,
AddComment = TRUE,
AddWeightsColumn = TRUE,
ZIP = 0L,
TimeSeries = FALSE,
TimeSeriesTimeAgg = "day",
ChainLadderData = FALSE,
Classification = FALSE,
MultiClass = FALSE)
# Classification
data2 <- AutoQuant::FakeDataGenerator(
Correlation = 0.77,
N = 1000000L,
ID = 4L,
FactorCount = 5L,
AddDate = TRUE,
AddComment = TRUE,
AddWeightsColumn = TRUE,
ZIP = 0L,
TimeSeries = FALSE,
TimeSeriesTimeAgg = "day",
ChainLadderData = FALSE,
Classification = TRUE,
MultiClass = FALSE)
# MultiClass
data3 <- AutoQuant::FakeDataGenerator(
Correlation = 0.77,
N = 1000000L,
ID = 4L,
FactorCount = 5L,
AddDate = TRUE,
AddComment = TRUE,
AddWeightsColumn = TRUE,
ZIP = 0L,
TimeSeries = FALSE,
TimeSeriesTimeAgg = "day",
ChainLadderData = FALSE,
Classification = FALSE,
MultiClass = TRUE)
data.table::setnames(data, 'Adrian', 'RegressionTarget')
data.table::setnames(data2, 'Adrian', 'BinaryTarget')
data.table::setnames(data3, 'Adrian', 'MultiClassTarget')
data <- cbind(data, data2$BinaryTarget, data3$MultiClassTarget)
data.table::setnames(data, c('V2','V3'), c('BinaryTarget','MultiClassTarget'))
data.table::setcolorder(data, c(1, c(ncol(data)-1,ncol(data),2:(ncol(data)-2))))
# Load to warehouse
AutoQuant::PostGRE_RemoveCreateAppend(
data = data,
Append = TRUE,
TableName = "App_QA_BigData",
CloseConnection = TRUE,
CreateSchema = NULL,
Host = "localhost",
DBName = "AutoQuant",
User = "postgres",
Port = 5432,
Password = "",
Temporary = FALSE,
Connection = NULL)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.