Skip to content

Commit c5c998e

Browse files
mattyoreillyclaude
andcommitted
Remove all em dashes from docs, vignettes, and site
Plain hyphens throughout the prose; pkgdown's title separator post-processed in docs/ (regenerated on rebuild - re-run the replacement after pkgdown::build_site()). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 48a8b8f commit c5c998e

45 files changed

Lines changed: 413 additions & 407 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

R/atlas.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#' this many consecutive attempts without improvement.
1919
#' @param stopping_tolerance Stopping rule: an attempt only counts as an improvement
2020
#' if it beats the best validation metric so far by at least this relative
21-
#' fraction, between 0 and 1 e.g. `0.05` for 5%.
22-
#' @param exclude Columns the models must not use because they won't be
21+
#' fraction, between 0 and 1 - e.g. `0.05` for 5%.
22+
#' @param exclude Columns the models must not use - because they won't be
2323
#' available at prediction time in deployment, or they leak the outcome.
2424
#' They are removed from the data before the agent sees it. Predictors that
2525
#' survive are additionally screened with [atlas_leakage_screen()], and the
@@ -36,8 +36,8 @@
3636
#' @param max_fix_rounds How many automatic constraint-repair rounds to allow
3737
#' after the initial build.
3838
#' @param refine After the winning algorithm is found (and constraints pass),
39-
#' keep iterating on its feature selection and engineering one change per
40-
#' attempt, same validation scheme until the stopping rules trigger
39+
#' keep iterating on its feature selection and engineering - one change per
40+
#' attempt, same validation scheme - until the stopping rules trigger
4141
#' (`stopping_rounds` consecutive attempts without a relative gain of at least
4242
#' `stopping_tolerance`). The refined model lands in the results as
4343
#' `<winner>_refined`, alongside the original.
@@ -56,13 +56,13 @@
5656
#' @param autonomous Run with no human in the loop: the agent states its plan
5757
#' and proceeds instead of waiting for approval, and never asks questions.
5858
#' Combine with a generous `n_models`/`stopping_rounds` and `test_prop` for
59-
#' unattended experimentation runs e.g.
59+
#' unattended experimentation runs - e.g.
6060
#' `atlas(d, "y", autonomous = TRUE, n_models = 10, stopping_rounds = 8,
61-
#' test_prop = 0.2)` where the agent iterates keep/discard experiments
61+
#' test_prop = 0.2)` - where the agent iterates keep/discard experiments
6262
#' and the survivors are judged on the held-out test set at the end.
6363
#' @param test_prop Proportion of rows (0 to <1) to hold out as a final test
6464
#' set the agent never sees. After the run, Atlas itself evaluates every
65-
#' final model on it (RMSE for continuous outcomes, accuracy otherwise)
65+
#' final model on it (RMSE for continuous outcomes, accuracy otherwise) -
6666
#' a ranking the agent can't overfit. Reported as `test_leaderboard` in
6767
#' the results and saved to `test_leaderboard.csv` in the run directory.
6868
#' `0` (default) disables the split.

R/constraints.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' Constraints carry domain knowledge into the build: the description is put
44
#' in front of the agent as a hard requirement, and if `check` is supplied the
5-
#' constraint is *verified* every final model is tested after the build, and
5+
#' constraint is *verified* - every final model is tested after the build, and
66
#' violations are sent back to the agent to fix (see `max_fix_rounds` in
77
#' [atlas()]). Plain strings passed to `constraints` are shorthand for
88
#' `constraint(<string>)`: enforced via instructions only.
@@ -77,8 +77,8 @@ con_uses <- function(var) {
7777
#'
7878
#' Monotonicity is non-strict, so a model that does not use `var` at all
7979
#' passes trivially (a flat response is monotone). This makes the constraint
80-
#' conditional "if the model responds to `var`, the effect must be
81-
#' monotone" without forcing the variable in. Pair with [con_uses()] when
80+
#' conditional - "if the model responds to `var`, the effect must be
81+
#' monotone" - without forcing the variable in. Pair with [con_uses()] when
8282
#' the variable must also be used.
8383
#'
8484
#' @param var Column name (numeric) the response must be monotonic in.
@@ -180,7 +180,7 @@ atlas_leakage_screen <- function(data, outcome, threshold = 0.95,
180180
#' [con_uses()], "mpg should never increase with weight" becomes
181181
#' [con_monotone()], and anything else becomes a prompt-enforced
182182
#' [constraint()]. Returns the list for you to inspect (print it!) before
183-
#' passing to [atlas()] the parse is a judgment call, so review it.
183+
#' passing to [atlas()] - the parse is a judgment call, so review it.
184184
#'
185185
#' @param text The brief, in plain language. Sentences, bullets, whatever.
186186
#' @param data Optional data.frame the constraints are about; its column

R/session.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#' the console when it needs a decision (interactive sessions only).
99
#'
1010
#' @section Run directory contents:
11-
#' * `data.rds`, `meta.rds` inputs, so the session can be rebuilt cold
12-
#' * `code.R` / `code.rds` every code chunk the agent executed
13-
#' * `turns.rds` the full conversation
14-
#' * `report.md`, `leaderboard.csv`, `models.rds` final artifacts
11+
#' * `data.rds`, `meta.rds` - inputs, so the session can be rebuilt cold
12+
#' * `code.R` / `code.rds` - every code chunk the agent executed
13+
#' * `turns.rds` - the full conversation
14+
#' * `report.md`, `leaderboard.csv`, `models.rds` - final artifacts
1515
#'
1616
#' @examples
1717
#' \dontrun{
@@ -56,7 +56,7 @@ atlas_session <- R6::R6Class("atlas_session",
5656
#' `ellmer::chat_anthropic()`. Any ellmer provider works.
5757
#' @param dir Run directory for checkpoints and all output (reports,
5858
#' validation plots, model bundles). Defaults to a timestamped folder
59-
#' under `getOption("atlas.dir", ".atlas")` set
59+
#' under `getOption("atlas.dir", ".atlas")` - set
6060
#' `options(atlas.dir = "~/atlas-runs")` once to send every run to a
6161
#' location of your choosing, or pass `dir` explicitly per run.
6262
#' @param on_ask Optional handler for the agent's questions:
@@ -98,7 +98,7 @@ atlas_session <- R6::R6Class("atlas_session",
9898
#' own history. Set to `Inf` to disable.
9999
#' @param max_steps Hard budget: the maximum number of code executions
100100
#' the agent gets in this session. Unlike the stopping rules (which the
101-
#' agent applies itself), this is mechanically enforced past the
101+
#' agent applies itself), this is mechanically enforced - past the
102102
#' limit the `run_r_code` tool refuses to execute and instructs the
103103
#' agent to finalise from what it has. `Inf` (default) disables.
104104
#' @param max_runtime Hard budget: wall-clock seconds for this session
@@ -192,8 +192,8 @@ atlas_session <- R6::R6Class("atlas_session",
192192
#' @param verbose Show the agent's narration, code, and output live.
193193
#' @param max_fix_rounds How many constraint-repair rounds to allow.
194194
#' @param refine After the winning algorithm is found (and constraints
195-
#' pass), iterate on its feature selection and engineering one change
196-
#' per attempt, same validation scheme until the session's stopping
195+
#' pass), iterate on its feature selection and engineering - one change
196+
#' per attempt, same validation scheme - until the session's stopping
197197
#' rules trigger (`stopping_rounds` attempts without a `stopping_tolerance` gain).
198198
#' The refined model is added to the results alongside the original.
199199
#' @param validate Produce reviewable validation output (gain,
@@ -300,7 +300,7 @@ atlas_session <- R6::R6Class("atlas_session",
300300
#' @description Compact the conversation to save tokens: archive the
301301
#' transcript to the run directory, clear the context window, and
302302
#' re-orient the agent with a state briefing on the next message. The
303-
#' R environment (models, data) and code log are untouched they are
303+
#' R environment (models, data) and code log are untouched - they are
304304
#' the durable memory. Called automatically when the context exceeds
305305
#' `compact_at`; call it yourself before a long follow-up to start
306306
#' from a lean window.

README.Rmd

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Atlas builds models for you, and shows its work. Give it a data frame and a
1212
target; an LLM agent (via [ellmer](https://ellmer.tidyverse.org)) explores
1313
the data, proposes a modeling plan for your approval, then writes and runs R
1414
code to fit, compare, and refine candidate models. You get back fitted
15-
models ready for `predict()`, a leaderboard, a written report and, because
15+
models ready for `predict()`, a leaderboard, a written report - and, because
1616
the agent works by writing R, the complete script of everything it did.
1717

1818
Three ideas separate atlas from "ask a chatbot for model code":
@@ -24,7 +24,7 @@ Three ideas separate atlas from "ask a chatbot for model code":
2424

2525
* **Sessions are persistent.** Every code chunk and conversation turn is
2626
checkpointed to disk as it happens. A crash, a restart, or a deliberate
27-
interruption loses nothing resume and keep going.
27+
interruption loses nothing - resume and keep going.
2828

2929
* **Your data stays on your machine.** The LLM sees column names, types,
3030
and printed summaries, never the rows. All fitting happens locally in
@@ -43,7 +43,7 @@ pak::pkg_install("mattyoreilly/Atlas")
4343
You also need an API key for an LLM provider. atlas defaults to Anthropic:
4444
run `usethis::edit_r_environ()`, add a line `ANTHROPIC_API_KEY=sk-ant-...`,
4545
save, and restart R. Any tool-capable ellmer provider works via the `chat`
46-
argument OpenAI, Gemini, Bedrock, or a local model through Ollama.
46+
argument - OpenAI, Gemini, Bedrock, or a local model through Ollama.
4747

4848
## Usage
4949

@@ -54,14 +54,14 @@ res <- atlas(mtcars, outcome = "mpg", goal = "prioritise interpretability")
5454
```
5555

5656
The agent narrates as it works. It profiles the data (flagging suspected
57-
target leakage), proposes a plan model families chosen to match the
57+
target leakage), proposes a plan - model families chosen to match the
5858
outcome's distribution, a seeded validation scheme, any monotone effects it
59-
believes the domain implies and **waits for your approval in the
59+
believes the domain implies - and **waits for your approval in the
6060
console**. You can answer "yes", or redirect it: "only linear models, and
6161
don't use qsec". Then it builds up to `n_models` candidates, compares them
6262
on held-out data, refines the winner's features until improvement stalls,
63-
verifies any constraints, and with
64-
[modelblueprint](https://mattyoreilly.github.io/modelblueprint/) installed
63+
verifies any constraints, and - with
64+
[modelblueprint](https://mattyoreilly.github.io/modelblueprint/) installed -
6565
writes a full validation workup (gain, calibration, grouped residuals,
6666
one-ways, PDPs) to the run directory.
6767

@@ -76,18 +76,18 @@ res$session$tell("why did the refined model win?") # keep talking
7676

7777
Every run walks the same six stages, and you hold the pen at stage 2:
7878

79-
1. **Explore** dimensions, types, missingness, the outcome's
79+
1. **Explore** - dimensions, types, missingness, the outcome's
8080
distribution; automatic leakage screening.
81-
2. **Plan, then stop for you** candidate families matched to the
81+
2. **Plan, then stop for you** - candidate families matched to the
8282
outcome's distribution, a validation scheme, suggested monotone
8383
constraints. Approval is a conversation: whatever you type is folded
8484
into the plan.
85-
3. **Build** up to `n_models` candidates, compared on held-out data.
86-
4. **Refine** the winner's features are iterated one change at a time
85+
3. **Build** - up to `n_models` candidates, compared on held-out data.
86+
4. **Refine** - the winner's features are iterated one change at a time
8787
until the stopping rules call convergence.
88-
5. **Verify** machine-checked constraints run against every final model;
88+
5. **Verify** - machine-checked constraints run against every final model;
8989
violations trigger repair rounds.
90-
6. **Document** report, leaderboard, reproducible script, validation
90+
6. **Document** - report, leaderboard, reproducible script, validation
9191
plots, all in the run directory.
9292

9393
Two kinds of dial control how long this takes. The *statistical* stopping
@@ -114,13 +114,13 @@ res$constraints # one row per model x constraint: passed, detail
114114
```
115115

116116
Columns that won't exist at prediction time don't belong in the data at
117-
all `exclude` removes them before the agent ever sees it, and
117+
all - `exclude` removes them before the agent ever sees it, and
118118
`atlas_leakage_screen()` automatically flags predictors that alone explain
119119
almost all of the outcome. See `vignette("constraints")`.
120120

121121
## Unattended runs
122122

123-
For hands-off experimentation overnight, in a script, on a schedule
123+
For hands-off experimentation - overnight, in a script, on a schedule -
124124
set `autonomous = TRUE`: the agent states its plan and proceeds instead of
125125
waiting for approval, iterating keep/discard experiments under the stopping
126126
rules. Pair it with `test_prop` to hold out rows the agent **never sees**;
@@ -139,8 +139,8 @@ res$test_leaderboard # held-out performance, best first
139139
```
140140

141141
Long runs stay affordable: past a token budget (`compact_at`) the
142-
conversation is compacted transcript archived to disk, context cleared,
143-
agent re-oriented from session state at no extra LLM cost and every
142+
conversation is compacted - transcript archived to disk, context cleared,
143+
agent re-oriented from session state at no extra LLM cost - and every
144144
results object reports the session's total dollar `cost`. See
145145
`vignette("autonomous")`.
146146

@@ -162,26 +162,26 @@ Runs land in `.atlas/<timestamp>` by default; set
162162
## Limitations
163163

164164
* **Columns are the scaling limit, not rows.** Fitting is local, so a
165-
million rows just take the time they take but the agent reasons about
165+
million rows just take the time they take - but the agent reasons about
166166
variables by name, and past a few dozen columns that reasoning degrades.
167167
Pre-select features for wide data.
168168
* **Cost scales with agent steps**, not data size: more candidates, more
169169
repair rounds, more follow-ups mean more LLM calls. `print(res)` shows
170170
what a session cost.
171171
* **The statistical stopping rules are agent-applied.** For guarantees,
172-
use the mechanical budgets (`max_steps`, `max_runtime`) those are
172+
use the mechanical budgets (`max_steps`, `max_runtime`) - those are
173173
enforced by atlas, not the model.
174174
* **An agent is not a statistician.** atlas verifies what you tell it to
175175
verify; judgment about what the model is *for* stays with you. Read the
176176
report, check `res$code`, and look at the validation output.
177177

178178
## Learn more
179179

180-
* `vignette("atlas")` a full walkthrough: setup, the build lifecycle,
180+
* `vignette("atlas")` - a full walkthrough: setup, the build lifecycle,
181181
what you get back, what it costs
182-
* `vignette("constraints")` encoding domain knowledge that can't be
182+
* `vignette("constraints")` - encoding domain knowledge that can't be
183183
ignored
184-
* `vignette("sessions")` persistence, resuming, steering mid-build, and
184+
* `vignette("sessions")` - persistence, resuming, steering mid-build, and
185185
token stewardship
186-
* `vignette("autonomous")` unattended runs with hard budgets and a
186+
* `vignette("autonomous")` - unattended runs with hard budgets and a
187187
protected test set

0 commit comments

Comments
 (0)