Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 8, 2024
1 parent b5875f5 commit b8d2706
Show file tree
Hide file tree
Showing 98 changed files with 3,821 additions and 3,419 deletions.
Binary file modified Python/_images/articles_AGBModelVisualisation_31_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
329 changes: 199 additions & 130 deletions Python/_images/articles_pdstoolsv3_16_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 39 additions & 16 deletions Python/_images/articles_pdstoolsv3_6_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 42 additions & 19 deletions Python/_images/articles_pdstoolsv3_8_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Python/_sources/articles/thompsonsampling.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
"\n",
"# Convergence of the Thompson Sampled propensities\n",
"s = thompsonSamplingSimulation['positives']\n",
"thompsonSamplingSimulation2 = thompsonSamplingSimulation.hstack(s.cut(breaks=np.array(range(int(s.min()), int(s.max())+20, 20))-1, series=False).select(bin='category'))\n",
"thompsonSamplingSimulation2 = thompsonSamplingSimulation.hstack([s.cut(breaks=np.array(range(int(s.min()), int(s.max())+20, 20))-1).rename(\"bin\")])\n",
"s = thompsonSamplingSimulation2.group_by(\"p\", \"bin\").agg(\n",
" n=pl.count(),\n",
" n=pl.len(),\n",
" n90=(((pl.col(\"sampled_propensity\") - pl.col(\"p\")) / pl.col(\"p\")) < 0.1).sum(),\n",
" positives=pl.min(\"positives\"),\n",
").with_columns(pct=pl.col('n90')/pl.col('n')).sort('p', 'bin').with_columns(pl.col('p').cast(pl.Utf8).cast(pl.Categorical))\n",
Expand Down Expand Up @@ -194,7 +194,7 @@
" pl.lit(1.0),\n",
" (\n",
" pl.lit(ncust)\n",
" / pl.col(\"impressions\").where(pl.col(\"week\") == w).sum()\n",
" / pl.col(\"impressions\").filter(pl.col(\"week\") == w).sum()\n",
" ),\n",
" ]\n",
" )\n",
Expand Down
Loading

0 comments on commit b8d2706

Please sign in to comment.