Documentation > Explore > Samplings

These two methods perform well in terms of input space exploration (which is normal as they were built for that), however, they are superior to uniform or grid samplings, while sharing the same intrinsic limitations. There is no special way of handling stochasticity of the model, out of standard replications.

These methods are not expensive

## Specific methods for high dimension spaces ðŸ”—

High dimension spaces must be handled via specific methods of the literature, otherwise, cartesian products would be too memory consuming. OpenMOLE includes two of these methods:**Sobol Sequence**and

**Latin Hypercube Sampling**, which can be passed as an argument to the

`DirectSampling`

task:
### Methods' score ðŸ”—

These two methods perform well in terms of input space exploration (which is normal as they were built for that), however, they are superior to uniform or grid samplings, while sharing the same intrinsic limitations. There is no special way of handling stochasticity of the model, out of standard replications.

These methods are not expensive

*per se*, it depends on the magnitude of the input space you want to be covered.

## Latin Hypercube Sampling ðŸ”—

The Latin Hypercube Sampling is a statistical method for generating a near-random sample of parameter values from a multidimensional distribution. The syntax of the LHS sampling in OpenMOLE is the following:```
val i = Val[Double]
val j = Val[Double]
val values = Val[Array[Double]]
val my_LHS_sampling =
LHS(
100, // Number of points of the LHS
i in (0.0, 10.0),
j in (0.0, 5.0),
values in Vector((0.0, 1.0), (0.0, 10.0), (5.0, 9.0)) // Generate part of the LHS sampling inside the array of values
)
```

### Use in the DirectSampling method ðŸ”—

Once a sampling is defined, you can just add it to a`DirectSampling`

method (see here for the description of this method), under the `sampling`

argument.
For example, supposing you have already declared inputs, outputs, and a model task called `myModel`

, the sampling could be used like this:
```
val myExploration = DirectSampling(
evaluation = myModel ,
sampling = my_lhs_sampling
)
myExploration hook display
```

## Sobol Sequence ðŸ”—

A Sobol sequence is a quasi-random low-discrepancy sequence. The syntax of the Sobol sequence sampling in OpenMOLE is the following:```
val i = Val[Double]
val j = Val[Double]
val values = Val[Array[Double]]
val my_sobol_sampling =
SobolSampling(
100, // Number of points
i in (0.0, 10.0),
j in (0.0, 5.0),
values in Vector((0.0, 1.0), (0.0, 10.0), (5.0, 9.0)) // Generate part of the Sobol sampling inside the array of values
)
```

### Use in the DirectSampling method ðŸ”—

Once a sampling is defined, you can just add it to a`DirectSampling`

method (see here for the description of this method), under the `sampling`

argument.
For example, supposing you have already declared inputs, outputs, and a model task called `myModel`

, the sampling could be used like this:
```
val myExploration = DirectSampling(
evaluation = myModel ,
sampling = my_sobol_sampling
)
myExploration hook display
```