# Input data

## Data format

The data format of input should be numerical only in the form of data frame, for example:

```{r, include = TRUE}
MaxWiK::Data.2D$X[1:4, ]
str(MaxWiK::Data.2D$X)
```

If you need use a matrix, please, transform it into the data frame first. If some columns have non-numerical type, please, transform them into numerical type using factors.

## Specificity of the data

The method is mostly appropriate for specific data which has sparse regions of interest. The package dataset `Data.2D` has an example where the lack of data points at the region of the interest (blue cross):

```{r, echo=FALSE, include = TRUE, fig.height=4, fig.width=4 }
library(ggplot2)
df = MaxWiK::Data.2D$X; th = MaxWiK::Data.2D$sampling$theme.ggplot
obs = MaxWiK::Data.2D$observation$x0
ggplot(data = df, mapping = aes( x = par.sim.X1, y = par.sim.X2) ) +
    geom_point(size = 0.3) + th + 
    annotate('point', x= obs[1], y = obs[2] , colour="blue", shape = 4, size = 4)
```

## Input for Approximate Bayesian Computation and metasampling algorithm

Inputs for Approximate Bayesian Computation (ABC) and metasampling algorithm have the same part. That includes parameters dataset, dataset of summary statistics of simulations, summary statistics of observation, and hyperparameters like $t$, $\psi$ and Matrix_Voronoi. To reproduce the results of ABC, it is necessary to use the same hyperparameters including Matrix_Voronoi where the Voronoi sites for each tree are determined.

## Input for sampling algorithm

Two functions are used for sampling: sampler_MaxWiK() and sampler_MaxWiK_parallel() which have the input part as for metasampling. All the arguments are described in the manual but the most important are as follow:

-   model - the function of simulation;

-   arg0 - list of constant arguments for the model function.

To run algorithm properly, a user has to check the simulation first like:

> do.call( what = model, args = c( arg0, list( x = c(5, 7) ) ) )

where $x$ is the variable.

## Input for predictor

Input of the function MaxWiK.predictor() is the same as for metasampling algorithm, for details, please, see manual.
