ltr 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ARCHITECTURE.md +92 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE +21 -0
- data/README.md +186 -0
- data/docs/AGENTS.md +67 -0
- data/docs/aggregation-engines.md +80 -0
- data/docs/config.md +516 -0
- data/docs/data-contracts.md +94 -0
- data/docs/data-splits.md +34 -0
- data/docs/dataset-builder-steps.md +13 -0
- data/docs/dataset-csv.md +73 -0
- data/docs/dataset-enrichers.md +62 -0
- data/docs/errors.md +33 -0
- data/docs/feature-selection.md +108 -0
- data/docs/features.md +202 -0
- data/docs/glossary.md +56 -0
- data/docs/host-integration.md +128 -0
- data/docs/host-run-pipelines.md +48 -0
- data/docs/index.md +50 -0
- data/docs/inference.md +164 -0
- data/docs/label-transformers.md +242 -0
- data/docs/labels-from-behavior.md +94 -0
- data/docs/learning-to-rank.md +119 -0
- data/docs/metrics.md +166 -0
- data/docs/model-files.md +73 -0
- data/docs/optimization.md +72 -0
- data/docs/public-api.md +67 -0
- data/docs/rake-tasks.md +82 -0
- data/docs/relevance-grades.md +80 -0
- data/docs/run-locally.md +584 -0
- data/docs/run-on-aws.md +647 -0
- data/docs/training-objective.md +110 -0
- data/docs/ubi-documents.md +75 -0
- data/docs/ubi-logging.md +125 -0
- data/lib/ltr/README.md +28 -0
- data/lib/ltr/configuration/README.md +12 -0
- data/lib/ltr/configuration/config_loader.rb +326 -0
- data/lib/ltr/configuration/config_validator.rb +476 -0
- data/lib/ltr/configuration/configuration.rb +84 -0
- data/lib/ltr/configuration/example_config.yml +182 -0
- data/lib/ltr/data/README.md +20 -0
- data/lib/ltr/data/csv/README.md +9 -0
- data/lib/ltr/data/csv/typed_columns.rb +101 -0
- data/lib/ltr/data/csv.rb +126 -0
- data/lib/ltr/data/dataframe.rb +80 -0
- data/lib/ltr/data/dataset_loader.rb +29 -0
- data/lib/ltr/data/row_store.rb +188 -0
- data/lib/ltr/data/split_cache.rb +30 -0
- data/lib/ltr/data/splits.rb +86 -0
- data/lib/ltr/dataset_aggregation/README.md +32 -0
- data/lib/ltr/dataset_aggregation/aggregated_sqlite_loader.rb +64 -0
- data/lib/ltr/dataset_aggregation/cascade_actions.rb +58 -0
- data/lib/ltr/dataset_aggregation/column_name.rb +47 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/README.md +15 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/context.rb +159 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/README.md +16 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/behavioural_feature_builder.rb +77 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/dataset_filters.rb +29 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/label_creator.rb +125 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/negative_downsampler.rb +52 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/query_aggregator.rb +163 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/split_assigner.rb +76 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/ubi_joiner.rb +137 -0
- data/lib/ltr/dataset_aggregation/dataset_builder/steps/user_query_aggregator.rb +68 -0
- data/lib/ltr/dataset_aggregation/dataset_builder.rb +82 -0
- data/lib/ltr/dataset_aggregation/dataset_enricher.rb +168 -0
- data/lib/ltr/dataset_aggregation/dataset_finalizer.rb +116 -0
- data/lib/ltr/dataset_aggregation/dataset_pipeline.rb +113 -0
- data/lib/ltr/dataset_aggregation/dataset_saver.rb +79 -0
- data/lib/ltr/dataset_aggregation/derived_features.rb +45 -0
- data/lib/ltr/dataset_aggregation/display_positions.rb +25 -0
- data/lib/ltr/dataset_aggregation/dropped_events.rb +29 -0
- data/lib/ltr/dataset_aggregation/labels/README.md +18 -0
- data/lib/ltr/dataset_aggregation/labels/identity_label_transformer.rb +11 -0
- data/lib/ltr/dataset_aggregation/labels/label_transformer.rb +61 -0
- data/lib/ltr/dataset_aggregation/labels/log_plus_one_label_transformer.rb +18 -0
- data/lib/ltr/dataset_aggregation/labels/per_query_k_means_label_transformer.rb +141 -0
- data/lib/ltr/dataset_aggregation/labels/per_query_label_transformer.rb +52 -0
- data/lib/ltr/dataset_aggregation/labels/per_query_min_max_label_transformer.rb +27 -0
- data/lib/ltr/dataset_aggregation/labels/quantile_label_transformer.rb +73 -0
- data/lib/ltr/dataset_aggregation/labels/sqrt_label_transformer.rb +18 -0
- data/lib/ltr/dataset_aggregation/missing_hit_ids.rb +20 -0
- data/lib/ltr/dataset_aggregation/negative_rank.rb +15 -0
- data/lib/ltr/dataset_aggregation/sql/aggregate.sqlite.sql.erb +209 -0
- data/lib/ltr/dataset_aggregation/sqlite_aggregator.rb +167 -0
- data/lib/ltr/dataset_aggregation/sqlite_event_stager.rb +79 -0
- data/lib/ltr/dataset_aggregation/sqlite_query_stager.rb +148 -0
- data/lib/ltr/dataset_aggregation/sqlite_staging.rb +180 -0
- data/lib/ltr/dataset_aggregation/sqlite_ubi_data_loader.rb +91 -0
- data/lib/ltr/dataset_aggregation/ubi_data_loader.rb +138 -0
- data/lib/ltr/dataset_aggregation/ubi_data_loader_base.rb +147 -0
- data/lib/ltr/dataset_aggregation/ubi_query_fields.rb +54 -0
- data/lib/ltr/deploy/README.md +21 -0
- data/lib/ltr/deploy/artifacts/code/inference.py +371 -0
- data/lib/ltr/deploy/artifacts/code/requirements.txt +1 -0
- data/lib/ltr/deploy/feature_extractor.rb +94 -0
- data/lib/ltr/deploy/feature_store_deployer.rb +88 -0
- data/lib/ltr/deploy/local_deployer.rb +61 -0
- data/lib/ltr/deploy/model_packager.rb +90 -0
- data/lib/ltr/deploy/sagemaker_deployer.rb +85 -0
- data/lib/ltr/deploy/sagemaker_endpoint.rb +199 -0
- data/lib/ltr/deploy/ssm_feature_source.rb +35 -0
- data/lib/ltr/errors/README.md +16 -0
- data/lib/ltr/errors/configuration_error.rb +5 -0
- data/lib/ltr/errors/deploy_error.rb +5 -0
- data/lib/ltr/errors/error.rb +5 -0
- data/lib/ltr/errors/invalid_dataset_error.rb +5 -0
- data/lib/ltr/errors/missing_dependency_error.rb +5 -0
- data/lib/ltr/errors/sqlite_error.rb +14 -0
- data/lib/ltr/features/README.md +19 -0
- data/lib/ltr/features/encoders/README.md +10 -0
- data/lib/ltr/features/encoders/enriched_column_encoder.rb +77 -0
- data/lib/ltr/features/encoders/feature_encoder.rb +61 -0
- data/lib/ltr/features/feature_engineering.rb +194 -0
- data/lib/ltr/features/feature_transformer.rb +92 -0
- data/lib/ltr/features/float32_range.rb +20 -0
- data/lib/ltr/features/transform_steps.rb +34 -0
- data/lib/ltr/features/transform_store.rb +123 -0
- data/lib/ltr/inference/README.md +11 -0
- data/lib/ltr/inference/base.rb +52 -0
- data/lib/ltr/inference/local_reranker.rb +147 -0
- data/lib/ltr/inference/sagemaker_client.rb +62 -0
- data/lib/ltr/metrics/README.md +12 -0
- data/lib/ltr/metrics/metric_scores.rb +67 -0
- data/lib/ltr/metrics/metrics.rb +139 -0
- data/lib/ltr/optimize/README.md +25 -0
- data/lib/ltr/optimize/bayesian_optimizer.rb +212 -0
- data/lib/ltr/optimize/candidate_selector.rb +97 -0
- data/lib/ltr/optimize/cholesky_decomposition.rb +81 -0
- data/lib/ltr/optimize/expected_improvement.rb +33 -0
- data/lib/ltr/optimize/feature_selection/README.md +15 -0
- data/lib/ltr/optimize/feature_selection/greedy_backward.rb +38 -0
- data/lib/ltr/optimize/feature_selection/importance_ranked.rb +23 -0
- data/lib/ltr/optimize/feature_selection/rfe.rb +22 -0
- data/lib/ltr/optimize/feature_selection/strategy.rb +112 -0
- data/lib/ltr/optimize/feature_selection/trial.rb +39 -0
- data/lib/ltr/optimize/gaussian_process.rb +125 -0
- data/lib/ltr/optimize/optimization_dataset.rb +16 -0
- data/lib/ltr/optimize/optimize_features.rb +129 -0
- data/lib/ltr/optimize/optimize_hyperparameters.rb +165 -0
- data/lib/ltr/optimize/optimize_pipeline.rb +105 -0
- data/lib/ltr/optimize/search_space.rb +165 -0
- data/lib/ltr/optimize/update_config.rb +196 -0
- data/lib/ltr/ssm/README.md +11 -0
- data/lib/ltr/ssm/loader.rb +61 -0
- data/lib/ltr/ssm/parameter_paths.rb +19 -0
- data/lib/ltr/ssm/saver.rb +76 -0
- data/lib/ltr/support/README.md +13 -0
- data/lib/ltr/support/callable.rb +10 -0
- data/lib/ltr/support/optional_dependency.rb +31 -0
- data/lib/ltr/support/pipeline_result.rb +22 -0
- data/lib/ltr/support/pipeline_task.rb +81 -0
- data/lib/ltr/support/version.rb +7 -0
- data/lib/ltr/tasks/ltr.rake +24 -0
- data/lib/ltr/train/README.md +19 -0
- data/lib/ltr/train/deploy_gate.rb +77 -0
- data/lib/ltr/train/deploy_metric.rb +63 -0
- data/lib/ltr/train/eval_logger.rb +16 -0
- data/lib/ltr/train/evaluation_cache.rb +101 -0
- data/lib/ltr/train/modelling_pipeline.rb +82 -0
- data/lib/ltr/train/optimization_split_report.rb +54 -0
- data/lib/ltr/train/utils.rb +35 -0
- data/lib/ltr/train/xgb_evaluator.rb +96 -0
- data/lib/ltr/train/xgb_trainer.rb +154 -0
- data/lib/ltr/ubi.rb +86 -0
- data/lib/ltr.rb +61 -0
- data/scripts/seed_ubi.rb +75 -0
- metadata +346 -0
data/docs/rake-tasks.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Rake tasks
|
|
2
|
+
|
|
3
|
+
Use these tasks to run the pipelines by hand or on a schedule.
|
|
4
|
+
|
|
5
|
+
| Task | Runs |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `ltr:aggregate` | the dataset aggregation pipeline |
|
|
8
|
+
| `ltr:optimize` | feature selection and the hyperparameter search. See [Optimization](optimization.md) |
|
|
9
|
+
| `ltr:train` | the training pipeline, then the SageMaker deploy when its gate passes, and the local deploy when `deploy.local` is `true` and the same minimum is met |
|
|
10
|
+
|
|
11
|
+
## Run the tasks in order
|
|
12
|
+
|
|
13
|
+
Run `ltr:aggregate`, then `ltr:optimize`, then `ltr:train`. Each task reads what the one before it wrote. See [How it works](../README.md#how-it-works).
|
|
14
|
+
|
|
15
|
+
`ltr:train` does not run `ltr:optimize`. `ltr:optimize` writes the chosen features and hyperparameters into the config file. If you run `ltr:train` first, it trains on what the config lists now. That is `search_time_features`, the features `feature_engineering` derives from them, `feature_store.features`, and `model.hyperparameters`. Those are your starting values, not the chosen ones. The model still trains, but it may use more features than the optimizer would keep.
|
|
16
|
+
|
|
17
|
+
If the config already has `optimized_features` from an earlier `ltr:optimize` run, `ltr:train` uses that earlier list instead. It is not your starting values.
|
|
18
|
+
|
|
19
|
+
When `ssm.enabled` is `true`, `ltr:train` reads the features and hyperparameters from SSM, not from the config file. On a fresh setup nothing is in SSM until `ltr:optimize` has written it. So `ltr:train` fails with `Aws::SSM::Errors::ParameterNotFound`.
|
|
20
|
+
|
|
21
|
+
## Load the tasks
|
|
22
|
+
|
|
23
|
+
Load the task file from the host app's `Rakefile` or from a `lib/tasks/*.rake` file. `load` searches `$LOAD_PATH`, so you don't need the gem's path:
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
load "ltr/tasks/ltr.rake"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
When the Rakefile defines an `:environment` task, as Rails does, each task runs it first. So in a Rails app the host's initializers and enrichers are loaded before the pipeline starts.
|
|
30
|
+
|
|
31
|
+
## Pass the config paths
|
|
32
|
+
|
|
33
|
+
Each task takes two arguments, `base_config` and `override_config`. The environment variable `LTR_CONFIG` can also hold the base path.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# one config
|
|
37
|
+
bin/rails "ltr:train[config/ltr/catalog.yml]"
|
|
38
|
+
# one config, from the env
|
|
39
|
+
LTR_CONFIG=config/ltr/catalog.yml bin/rails ltr:train
|
|
40
|
+
# env base + override
|
|
41
|
+
LTR_CONFIG=config/ltr/base.yml bin/rails "ltr:train[config/ltr/catalog.yml]"
|
|
42
|
+
# base + override
|
|
43
|
+
bin/rails "ltr:train[config/ltr/base.yml,config/ltr/catalog.yml]"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
| Arguments | `LTR_CONFIG` | Base | Override |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| one | unset | the argument | none |
|
|
49
|
+
| none | set | `LTR_CONFIG` | none |
|
|
50
|
+
| one | set | `LTR_CONFIG` | the argument |
|
|
51
|
+
| two | ignored | first argument | second argument |
|
|
52
|
+
| none | unset | raises `ArgumentError` | |
|
|
53
|
+
|
|
54
|
+
A blank argument counts as absent. When `LTR_CONFIG` is set, a single argument becomes the override, so unset `LTR_CONFIG` to run on one file.
|
|
55
|
+
|
|
56
|
+
A relative path is joined to `Ltr.config.root`, which defaults to the current directory. The gem's own `example_config.yml` is never loaded unless you pass its path.
|
|
57
|
+
|
|
58
|
+
A config with no override has to be complete on its own. An override is deep-merged over the base. See [How a file is loaded](config.md#how-a-file-is-loaded).
|
|
59
|
+
|
|
60
|
+
`ltr:optimize` rewrites the override file when there is one, else the base file. [What gets written back](optimization.md#what-gets-written-back) lists the sections it rewrites.
|
|
61
|
+
|
|
62
|
+
## What each task logs
|
|
63
|
+
|
|
64
|
+
Each task logs through `Ltr.config.logger`. See [Host integration](host-integration.md) for its default. The task's own lines start with the task name, such as `ltr:train`. The pipeline's progress lines between them have no prefix. The first task line names the base and override config paths. After the run, each task logs a summary:
|
|
65
|
+
|
|
66
|
+
| Task | Summary lines |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `ltr:aggregate` | the row count and the dataset path |
|
|
69
|
+
| `ltr:optimize` | the chosen search-time features, the chosen feature-store features and the hyperparameters |
|
|
70
|
+
| `ltr:train` | the evaluation metrics, then the outcome and reason of the SageMaker deploy and of the local deploy |
|
|
71
|
+
|
|
72
|
+
## When a task fails
|
|
73
|
+
|
|
74
|
+
A task exits non-zero when the pipeline raises. It also fails before the pipeline starts in this case:
|
|
75
|
+
|
|
76
|
+
| Cause | Error |
|
|
77
|
+
|---|---|
|
|
78
|
+
| No config path is given | `ArgumentError` |
|
|
79
|
+
|
|
80
|
+
A config that fails to load also stops the task. See [How a file is loaded](config.md#how-a-file-is-loaded) and [Errors](errors.md).
|
|
81
|
+
|
|
82
|
+
For a full schedule on AWS, see [Retrain on a schedule](run-on-aws.md#retrain-on-a-schedule). The tasks call `Ltr::PipelineTask`, which is internal. See [Internal](public-api.md#internal).
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Relevance grades
|
|
2
|
+
|
|
3
|
+
This page explains how the gem decides which documents count as relevant for mean average precision (`map`), mean reciprocal rank (`mrr`), `precision` and `recall`. These four metrics need a yes-or-no answer for each document, and a document is relevant when its label is at least the relevance grade. `ndcg` uses the labels as numbers and ignores the grade. After reading the page, you will be able to set the grade in the config and tell when two scores can be compared. [Metrics](metrics.md) has the formulas.
|
|
4
|
+
|
|
5
|
+
## Glossary
|
|
6
|
+
|
|
7
|
+
| Term | Meaning |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Data split | One of `train`, `val` and `test`. Every row for a `user_query` goes into the same split. |
|
|
10
|
+
| `label` | The target value for training the model. |
|
|
11
|
+
| Label transformer | The class in `label_transformer.class` that turns `raw_label` into `label`. |
|
|
12
|
+
| Negative | A document with 0 impressions in every session of its query group. It is kept only when `dataset_builder.cascade_cutoff` is `false`. Its `raw_label` and `label` are 0. |
|
|
13
|
+
| Relevance grade | The `label` at or above which a document counts as relevant for `map`, `mrr`, `precision` and `recall`. It comes from `evaluation.min_relevance_grade`, or from `evaluation.min_relevance_percentile`. `ndcg` does not use it. |
|
|
14
|
+
| Shipped | The value in `lib/ltr/configuration/example_config.yml`. It can differ from the value the code uses when the key is missing. |
|
|
15
|
+
|
|
16
|
+
The full list is in the [glossary](glossary.md).
|
|
17
|
+
|
|
18
|
+
## Setting the grade
|
|
19
|
+
|
|
20
|
+
Two config keys set the grade, and the table gives the rule for each one.
|
|
21
|
+
|
|
22
|
+
| Key | Default | Shipped value | Rule |
|
|
23
|
+
|---|---|---|---|
|
|
24
|
+
| `evaluation.min_relevance_grade` | None | Not set | A fixed label value. A document is relevant when its label is at least this value. |
|
|
25
|
+
| `evaluation.min_relevance_percentile` | None | `60` | A number above 0 and below 100, which the gem turns into a grade from the labels of the split it scores. Any other value raises `Ltr::ConfigurationError` when the config loads. |
|
|
26
|
+
|
|
27
|
+
The table shows which grade the gem uses for each mix of the two keys.
|
|
28
|
+
|
|
29
|
+
| Keys set | Grade the gem uses |
|
|
30
|
+
|---|---|
|
|
31
|
+
| Both keys | `evaluation.min_relevance_grade` |
|
|
32
|
+
| Only `evaluation.min_relevance_percentile` | A grade worked out from the labels of the scored split, as the next section shows |
|
|
33
|
+
| Neither key | None. Scoring raises `ArgumentError`. `ltr:optimize` raises it too, even when `optimization.metric_to_optimize` is an `ndcg` metric. |
|
|
34
|
+
| Code that calls `Ltr::Metrics::MetricScores` directly | The `min_relevance_grade:` argument, which defaults to 1 |
|
|
35
|
+
|
|
36
|
+
A percentile suits labels whose scale can change. The shipped label transformer, `Ltr::DatasetAggregation::SqrtLabelTransformer`, gives labels that are continuous decimals. Their scale depends on `dataset_builder.conversion_rate_targets` and on the [label transformer](label-transformers.md), so a fixed grade such as 0.5 marks a different share of documents as relevant after either one changes. A percentile picks the grade from the labels themselves, so the relevant share stays tied to the share it asks for.
|
|
37
|
+
|
|
38
|
+
## How a percentile becomes a grade
|
|
39
|
+
|
|
40
|
+
The gem takes the labels of every document in the scored split, across all queries. With `dataset_builder.cascade_cutoff: false`, these include the label-0 negatives. The percentile $`p`$ is `evaluation.min_relevance_percentile`. The gem checks each distinct label value from lowest to highest, and the grade is the first value whose share of labels at or above it is at most $`(100 - p) / 100`$.
|
|
41
|
+
|
|
42
|
+
```math
|
|
43
|
+
\mathrm{grade} = \min \left\{ v : s(v) \le \frac{100 - p}{100} \right\}
|
|
44
|
+
\qquad
|
|
45
|
+
s(v) = \frac{\text{number of labels} \ge v}{N}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- $`v`$ is one distinct label value in the split.
|
|
49
|
+
- $`s(v)`$ is the share of the split's labels that are at or above $`v`$.
|
|
50
|
+
- $`N`$ is the number of documents in the split.
|
|
51
|
+
- $`p`$ is `evaluation.min_relevance_percentile`.
|
|
52
|
+
|
|
53
|
+
The grade is the lowest label that marks no more than the requested share of documents as relevant. With the shipped `60`, the requested share is $`(100 - 60) / 100 = 0.40`$, so at most 40% of the documents count as relevant.
|
|
54
|
+
|
|
55
|
+
In the example below, a split has ten made-up labels: three at 0.0, one at 0.1, three at 0.3, then 0.5, 0.7 and 0.9. The table checks each label value in turn with the shipped percentile of 60, and stops at the first value that fits.
|
|
56
|
+
|
|
57
|
+
| Label value | Documents at or above | Share at or above | At most 0.40? |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| 0.0 | 10 | 1.00 | No |
|
|
60
|
+
| 0.1 | 7 | 0.70 | No |
|
|
61
|
+
| 0.3 | 6 | 0.60 | No |
|
|
62
|
+
| 0.5 | 3 | 0.30 | Yes, so the grade is 0.5 |
|
|
63
|
+
|
|
64
|
+
A share of 0.40 of ten documents is 4 documents. Equal labels always fall on the same side of the grade, and the fourth-highest label, 0.3, ties with two others. So no grade makes exactly 4 of these documents relevant. The grade can't be 0.3, because 60% of the labels are at or above 0.3. So the grade is 0.5, and only 30% of the documents count as relevant.
|
|
65
|
+
|
|
66
|
+
The relevant share stays at or below the requested share in every case but one. When the highest label alone covers more than the requested share, no value fits, and the grade is the highest label. For example, with five made-up labels at 0.0 and five at 0.9, the grade is 0.9 and 50% of the documents count as relevant.
|
|
67
|
+
|
|
68
|
+
The gem logs each grade it picks in a line such as `Resolved min_relevance_percentile 60 to a label threshold of 0.5 (30.0% of 10 test documents relevant)`.
|
|
69
|
+
|
|
70
|
+
## Which split sets the grade
|
|
71
|
+
|
|
72
|
+
The gem works out the grade once for each scored split, from all the queries in it, and not once for each query. The table lists the split that sets the grade for each run. [Data splits](data-splits.md#which-split-each-stage-reads) lists the split each stage reads.
|
|
73
|
+
|
|
74
|
+
| Run | Split that sets the grade |
|
|
75
|
+
|---|---|
|
|
76
|
+
| The metrics that `ltr:train` reports | `evaluation.split` |
|
|
77
|
+
| The extra scores that `ltr:train` logs for `optimization.split`, when it differs from `evaluation.split` | `optimization.split` |
|
|
78
|
+
| Every `ltr:optimize` trial | `optimization.split` |
|
|
79
|
+
|
|
80
|
+
Each split gets its own grade, so the same label can count as relevant in one split and not in another. So don't compare `map`, `mrr`, `precision` or `recall` between two splits, such as validation against test. A fixed `evaluation.min_relevance_grade` is the same in every split, and `ndcg` ignores the grade, so those scores can be compared.
|