# Allstate Purchase Prediction Challenge — Data

来源：https://www.kaggle.com/competitions/allstate-purchase-prediction-challenge/data

本地 Meta Kaggle 快照；不是本次实时页面。

# Dataset Description

<h3>Files</h3>
<p>The training and test sets contain transaction history for customers that ended up purchasing a policy. For each customer_ID, you are given their quote history. In the training set you have the entire quote history, the last row of which contains the coverage options they purchased. In the test set, you have only a partial history of the quotes and do not have the purchased coverage options. These are truncated to certain lengths to simulate making predictions with less history (higher uncertainty) or more history (lower uncertainty).</p>
<p>For each customer_ID in the test set, you must predict the seven coverage options they end up purchasing.</p>
<h3>What is a customer?</h3>
<p>Each customer has many shopping points, where a shopping point is defined by a customer with certain characteristics viewing a product and its associated cost at a particular time.</p>
<ul>
<li>Some customer characteristics may change over time (e.g. as the customer changes or provides new information), and the cost depends on both the product and the customer characteristics.</li>
<li>A customer may represent a collection of people, as policies can cover more than one person.</li>
<li>A customer may purchase a product that was not viewed!</li>
</ul>
<h3>Product Options</h3>
<p>Each product has 7 customizable options selected by customers, each with 2, 3, or 4 ordinal values possible:</p>
<p><img alt="Product Options" src="https://storage.googleapis.com/kaggle-media/competitions/kaggle/3788/media/product_options.png" width="240" height="185" /></p>
<p>A product is simply a vector with length 7 whose values are chosen from each of the options listed above. The cost of a product is a function of both the product options and customer characteristics.</p>
<h3>Variable Descriptions</h3>
<p><strong>customer_ID</strong> - A unique identifier for the customer<br /><strong>shopping_pt</strong> - Unique identifier for the shopping point of a given customer<br /><strong>record_type</strong> - 0=shopping point, 1=purchase point<br /><strong>day</strong> - Day of the week (0-6, 0=Monday)<br /><strong>time</strong> - Time of day (HH:MM)<br /><strong>state</strong> - State where shopping point occurred<br /><strong>location</strong> - Location ID where shopping point occurred<br /><strong>group_size</strong> - How many people will be covered under the policy (1, 2, 3 or 4)<br /><strong>homeowner</strong> - Whether the customer owns a home or not (0=no, 1=yes)<br /><strong>car_age</strong> - Age of the customer’s car<br /><strong>car_value</strong> - How valuable was the customer’s car when new<br /><strong>risk_factor</strong> - An ordinal assessment of how risky the customer is (1, 2, 3, 4)<br /><strong>age_oldest</strong> - Age of the oldest person in customer's group<br /><strong>age_youngest </strong>- Age of the youngest person in customer’s group<br /><strong>married_couple</strong> - Does the customer group contain a married couple (0=no, 1=yes)<br /><strong>C_previous</strong> - What the customer formerly had or currently has for product option C (0=nothing, 1, 2, 3,4)<br /><strong>duration_previous</strong> -  how long (in years) the customer was covered by their previous issuer<br /><strong>A,B,C,D,E,F,G</strong> - the coverage options<br /><strong>cost</strong> - cost of the quoted coverage options</p>