Skip to content

Commit

Permalink
Add docs for feature definition file format
Browse files Browse the repository at this point in the history
  • Loading branch information
russcam committed Nov 19, 2024
1 parent ee03ffe commit b72b60f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Feature Definition File Format

The feature definition file defines the features used in the
ranking model. The file format is as follows:

```text
<line> .=. <featureid> <description>
<featureid> .=. <positive integer>
<description> .=. <string>
```

where

- `<featureid>`

The feature's unique identifier.

> [!NOTE]
> Feature identifiers should match the identifiers referenced in the training data file.
- `<description>`

A short description or explanation of the feature.

A feature file can contain comments by starting a line with `#`.

## Example

The following example has five features:

```text
# Movies data set features - revision 1
1 BM25 score for the title field
2 BM25 score for the untokenized title field
3 BM25 score for the actors field
4 BM25 score for the untokenized actors field
5 Popularity score derived from click data
```
4 changes: 3 additions & 1 deletion docs/Docs/documentation/file-formats/toc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
- name: Training File
href: training-file-format.md
- name: Relevance Judgment File
href: relevance-judgment-file-format.md
href: relevance-judgment-file-format.md
- name: Feature Definition File
href: feature-definition-file-format.md
- name: Ranking File
href: ranking-file-format.md

0 comments on commit b72b60f

Please sign in to comment.