relativities-examples/example-auto.zip. Its premium
is for a twelve-month term. It refuses a vehicle over 30,000 miles a year.
Load a rater
- To load a local bundle, pass a
PathtoRater.load. - To load a catalog rater, pass its ID as a string, with
EFFECTIVE_API_KEYset.
bundle_id.
Bundles and exact rating describes the checks.
Pin a revision
To load a numbered release, passrevision= a whole number. To rerun a rating exactly, pass
revision= the bundle_id.
bundle_id loads offline with local_files_only=True.
Download a rater to a folder
To keep a rater next to your work, callRater.download
with a path. Then load it from that path.
- A path that ends in
.zipgets the bundle archive. Any other path gets a folder with the rater’s RSL source, its tables and, for a program, itsprogram/folder. - The bundle is verified first. Then it goes to a new path or an empty folder, and the call
raises
FileExistsErrorfor any other path. revision=pins the download, as it does forRater.load.
List the fields a rater accepts
rater.inputs lists each field a submission can give, one row per field. rater.outputs lists
the outcomes that rate returns. Both use the type names of a book’s Schema.
path names the field as explain does, with [] for each list. values gives the allowed
values or range, and the default when the rater has one. input_schema is the same contract as
JSON Schema.
Rate one submission or a list
- To rate one submission, pass a dict.
- To rate several submissions, pass a list. Each row ID is the list position.
Policy.
Rate a dataset
To keep your own IDs on the results, build aDataset with a key column. Then rate the dataset,
as the first example does.
- The
keycolumn stays on every result row. The rater receives the other columns. - A
NaN,NoneorNaTcell leaves its field out of the rater’s input. - A date becomes ISO 8601 text.
Read the results in pandas
Callto_pandas() for one row per submission, with float64 outcomes.
refused with the rule’s code and message. Its premium is NaN, so the mean
skips it. Results lists every column and status.
Report the two successes and one refusal with that mean. It describes the successfully rated population on this rater’s coverage basis.
Read exact values
To read exactDecimal values, use results.rows.
Release the raters
Close each rater to release its runtime.with Rater.load(...) as rater: closes the rater at the end of the block.