Skip to main content
A program rates only the facts its rater accepts. When your book lacks a fact the rater requires, each submission the rater would accept stops as invalid_inputs:
thin is the example book with its licence dates dropped. To rate it, write each missing fact as a scenario, and rate the study with the program:

Find the facts the book lacks

Each invalid_inputs row’s reason names the rater field it lacks, then the book column that field comes from. Count the rows by that column:
prepare derives years_licensed from each driver’s first_licensed_date, so that column is the fact to supply. A program traces book columns from its example book. A reason that ends at the rater field counts as NaN, so read the field at the start of that reason. A refused row names the carrier rule that declines it, in reason_code. program.rater.inputs marks each field the rater requires. An optional field means what its RSL says: a filed default, such as 12,000 annual miles, or an absent coverage.

Write each assumption as a scenario

Each scenario holds one assumption. Several values of one assumption bracket its effect on the premium.

Rate the study

baseline is the book as reported, so it keeps its unrated rows. In each scenario, 281 submissions stay unrated: 186 have a driver with a blank birth date, so the scenario leaves drivers.first_licensed_date blank, and 95 have a vehicle with a blank garaging ZIP (vehicles.garaging_postal_code).

Compare the assumptions

dropna keeps the policies that every scenario rates, so each total compares the same policies. premium is each policy’s annual premium. A later licence age gives fewer years licensed, so the premium rises. The assumption moves the book’s total by 9.5% from age 16 to age 21.

Check an assumption against reported facts

To check an assumption, rate the policies whose facts you hold, and compare the totals:
On these synthetic policies, a licence at age 21 gives the reported total within 0.04%. A single assumption hides the spread between drivers. Create a study fills blank facts in draws instead.