{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# KNN Resampler" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This notebook shows how KNN Resampler is used to create synthetic data. There are three methods available in `synloc` package. This notebook demonstrates two methods: `LocalCov` and `LocalGaussianCopula`. The first one draw synthetic values from multivariate normal distribution and the second one draws from the gaussian copula." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from synloc import LocalCov, LocalGaussianCopula, sample_trivariate_xyz" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Data" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | x | \n", "y | \n", "z | \n", "
---|---|---|---|
0 | \n", "0.001029 | \n", "1.443241e-02 | \n", "1.030596 | \n", "
1 | \n", "0.000010 | \n", "7.651150e-08 | \n", "-0.402560 | \n", "
2 | \n", "0.002199 | \n", "8.689394e-01 | \n", "9.819810 | \n", "
3 | \n", "0.999379 | \n", "1.780679e-01 | \n", "1.473825 | \n", "
4 | \n", "0.064769 | \n", "9.160882e-01 | \n", "9.113435 | \n", "