affect customer / remove customer up product conditionally
This commit is contained in:
33
test.ipynb
33
test.ipynb
@@ -2,24 +2,35 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"1"
|
||||
]
|
||||
},
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"85\n",
|
||||
"63\n",
|
||||
"51\n",
|
||||
"26\n",
|
||||
"30\n",
|
||||
"4\n",
|
||||
"7\n",
|
||||
"1\n",
|
||||
"17\n",
|
||||
"81\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import numpy as np\n",
|
||||
"\n",
|
||||
"np.random.randint(0.5, 3.5)"
|
||||
"np.random.randint(0.5, 3.5)\n",
|
||||
"p_remove = 1\n",
|
||||
"np.random.choice([True, False], p=[p_remove, 1-p_remove])\n",
|
||||
"rng = np.random.default_rng(0)\n",
|
||||
"for _ in range(10):\n",
|
||||
" print(rng.integers(0,100))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -46,7 +57,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
"version": "3.9.13"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
|
||||
Reference in New Issue
Block a user