=====================================
Simple Random Sample with Replacement
=====================================
:doc:`/WorkProcessClassifiers/GlobalAlgorithm/index` - :doc:`/WorkProcessClassifiers/OneDimensionalAlgorithm/index`

*Simple Random Sample with Replacement* algorithm is a random process that samples all data values with equal probability. A data value in the original data set is randomly chosen and moved to the output data set. Different from the *Simple Random Sample without Replacement* algorithm, the randomly chosen value is placed back in the original data set after it is chosen so that it can be drawn again.

.. rubric:: Input Parameters

+--------------------+--------------------------------------------+----------------------------------------+------------------------------------------------+---------+
| Parameter          | Type                                       | Constraint                             | Description                                    | Remarks |
+====================+============================================+========================================+================================================+=========+
| :math:`Y`          | :math:`Y \in \mathbb R^N`                  | :math:`N \in \mathbb{N}`               | Input data vector of length :math:`N`          |         |
+--------------------+--------------------------------------------+----------------------------------------+------------------------------------------------+---------+
| :math:`s`          | :math:`s \in \mathbb N`                    | :math:`s \leq N`                       |                                                |         |
+--------------------+--------------------------------------------+----------------------------------------+------------------------------------------------+---------+

.. rubric:: Output Parameters

+----------------------------+----------------------------------------------------+--------------------------------+-------------------------------------------------+---------+
| Parameter                  | Type                                               | Constraint                     | Description                                     | Remarks |
+============================+====================================================+================================+=================================================+=========+
| :math:`\hat{Y}`            | :math:`\hat{Y} \in \mathbb R^s`                    | :math:`s \leq N`               | Output data vector of length :math:`s`          |         |
+----------------------------+----------------------------------------------------+--------------------------------+-------------------------------------------------+---------+

.. rubric:: Tool Support

* :doc:`/Tools/MatlabTool/index`

  For details refer to the online documentation of the function\ `'randsample' <http://www.mathworks.de/help/toolbox/stats/randsample.html>`__.

.. rubric:: Single Steps using the Algorithm

* :doc:`/DataPreprocessing/DataReduction/NumerosityReduction/DataReductionWithSimpleRandomSampleWithReplacement/index`

.. rubric:: References

- J.\  Han, M. Kamber and J. Pei, Data Mining - Concepts and Techniques, 3rd ed., Amsterdam: Morgan Kaufmann Publishers, 2012.