Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CI runs these four, and a pull request needs them green:
```bash
uv run ruff check # lint
uv run ruff format --check # formatting
uv run pytest # 238 tests
uv run pytest # the full suite
uv run pytest --nbmake --nbmake-timeout=900 examples/ # notebooks execute
```

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/brand/clvkit-symbol-dark.svg">
<img src="docs/brand/clvkit-symbol-light.svg" height="72" alt="">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/clvkit-symbol-dark.svg">
<img src="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/clvkit-symbol-light.svg" height="72" alt="">
</picture>
&nbsp;&nbsp;
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/brand/clvkit-dark.svg">
<img src="docs/brand/clvkit-light.svg" height="64" alt="clvkit">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/clvkit-dark.svg">
<img src="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/clvkit-light.svg" height="64" alt="clvkit">
</picture>
</p>

Expand Down Expand Up @@ -123,8 +123,8 @@ one optional extra, `dask`, for logs too big to summarise in pandas. See

<table>
<tr>
<td width="50%"><img src="docs/brand/clv-scatter.png" alt="Scatter of every CDNOW customer by discounted expected transactions and expected spend, coloured by 52-week CLV, with equal-CLV curves overlaid."></td>
<td width="50%"><img src="docs/brand/probability-alive.png" alt="Scatter of P(alive) against weeks since last purchase for CDNOW customers, coloured by repeat-purchase count: heavy buyers gone quiet are judged dead faster than light ones."></td>
<td width="50%"><img src="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/clv-scatter.png" alt="Scatter of every CDNOW customer by discounted expected transactions and expected spend, coloured by 52-week CLV, with equal-CLV curves overlaid."></td>
<td width="50%"><img src="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/probability-alive.png" alt="Scatter of P(alive) against weeks since last purchase for CDNOW customers, coloured by repeat-purchase count: heavy buyers gone quiet are judged dead faster than light ones."></td>
</tr>
<tr>
<td align="center"><sub><code>CLV().fit(cb).predict(horizon=52)</code> — where lifetime value comes from: how often × how much, along equal-CLV curves.</sub></td>
Expand Down Expand Up @@ -287,7 +287,7 @@ Two honest caveats, both measured. The benchmark and its numbers are in
with workers in their own processes, in front of the same call.

<p align="center">
<img src="docs/brand/dask-crossover.png" width="820" alt="Wall-clock of CustomerBase.from_transactions against log size, pandas versus dask, on log-log axes. pandas is faster below about 4 million transactions, dask above it.">
<img src="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/dask-crossover.png" width="820" alt="Wall-clock of CustomerBase.from_transactions against log size, pandas versus dask, on log-log axes. pandas is faster below about 4 million transactions, dask above it.">
<br>
<sub>Summarising wall-clock vs. log size. The one flag (<code>engine="dask"</code>) only pays off past the ~4M-row crossover; below it pandas wins. Numbers from <a href="benchmarks/README.md">the benchmark</a>.</sub>
</p>
Expand Down Expand Up @@ -407,7 +407,7 @@ business that never observes anyone leaving, with no contractual assumption
borrowed.

<p align="center">
<img src="docs/brand/cohort-retention.png" width="820" alt="Cohort-retention heatmap on the Online Retail II log: a triangle of monthly retention rates, with the unobserved lower-right cells drawn in grey rather than zero.">
<img src="https://raw.githubusercontent.com/nasserboan/clvkit/main/docs/brand/cohort-retention.png" width="820" alt="Cohort-retention heatmap on the Online Retail II log: a triangle of monthly retention rates, with the unobserved lower-right cells drawn in grey rather than zero.">
<br>
<sub><code>CohortMatrix.from_transactions(log, period="M").plot()</code> on the Online Retail II log. The grey cells are periods a young cohort hasn't lived through yet; a hand-rolled pivot paints them as churn.</sub>
</p>
Expand Down
7 changes: 4 additions & 3 deletions docs/site/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{% extends "!layout.html" %}

{# The home page's H1 is already "clvkit", and Sphinx appends the site title as
a suffix, so its browser tab reads "clvkit — clvkit". Drop the suffix on the
root page only; every other page keeps "<page> — clvkit". #}
a suffix, so its browser tab would read "clvkit · clvkit". Drop the suffix on
the root page only. Every other page gets "<page> · clvkit" - the middot is
ours; Sphinx's stock titlesuffix hardcodes an em dash. #}
{%- block htmltitle %}
{%- if pagename == 'index' %}
<title>{{ title|striptags|e }}</title>
{%- else %}
{{ super() }}
<title>{{ title|striptags|e }} · {{ docstitle|e }}</title>
{%- endif %}
{%- endblock %}
Loading