Unstructured Data
Study guides: Exam PA, DISC-DA, Exam ACIA-CAPSTONE
Unstructured Data is information with no predefined data model, such as free text, images, audio and video. It cannot be stored as rows of observations and columns of typed variables until features are extracted from it, which is what makes it structured.
| Kind | Shape | How it enters a model |
|---|---|---|
| Structured | A fixed schema of records and fields, such as a policy table (Tidy Data) | Directly, as columns |
| Semi-structured | Tags that label its pieces (JSON, XML, an email's header fields), but no single table | Parsed by its labels and flattened into rows |
| Unstructured | No predefined data model | Only after features are extracted |
A text field sitting in a database column is still unstructured. The table has a schema, its contents do not. Every unstructured source ends as one or more columns of a structured table, and that conversion is the work.
In an insurer, the unstructured sources are:
- Text: adjuster and underwriter notes, medical reports and demand letters.
- Images: vehicle-damage and roof photos, satellite and aerial imagery.
- Audio: call-centre recordings.
- Video: dashcam footage.
Telematics feeds are usually semi-structured, time-stamped records in JSON, and become structured once summarized per trip or per policy.
How would each source for this claims-triage model enter the model? A project to predict which new auto claims will exceed $50,000 has access to: (1) the policy administration table, (2) first-notice-of-loss free-text descriptions, (3) photos uploaded by the claimant, (4) telematics crash-event records in JSON, and (5) recorded calls with the claimant.
Answer
- (1) is structured. Its fixed fields (vehicle age, coverage, limit) join directly on policy number.
- (2) is unstructured text. A document-term matrix (words like "ambulance", "airbag", "rollover") with tf-idf weights is built, reduced and added as features.
- (3) is unstructured images. An image model, typically a neural network scoring damage severity, produces a score that becomes one structured column.
- (4) is semi-structured. The JSON is parsed and each event summarized: speed at impact, peak deceleration, airbag deployment flag.
- (5) is unstructured audio. It is transcribed to text and treated as source (2), which is expensive and subject to consent and privacy rules, so its value should be weighed before it is used.
Treating semi-structured data as unstructured JSON and XML carry labelled fields that can be parsed mechanically. An answer that prescribes text mining for a JSON feed has misread it.
The document-term matrix
Text is tokenized, lower-cased, stripped of stop words and often stemmed before counting. For n text records (claim notes, underwriter comments, complaint emails) and a vocabulary of p terms, the document-term matrix is
\mathbf{X} = \left[x_{ij}\right]_{n \times p}
x_{ij}is the number of times termjappears in documenti.
It is a structured table with one row per document and one column per term. Raw counts favour the most frequent words ("the", "vehicle"), which are the least informative. The tf-idf weight of term j in document i, high for a term frequent in this document and rare across documents, is
w_{ij} = \frac{x_{ij}}{\sum_{l=1}^{p} x_{il}} \cdot \ln\frac{n}{\text{df}_j}
\text{df}_jis the number of documents containing termj.
Conventions vary (raw count or proportion, the log's base), so state the one used.
What are the tf-idf weights of "attorney" and "vehicle" in note #17? An insurer has 1,000 bodily-injury claim notes. The term "attorney" appears in 50 of them and "vehicle" in 800. Note #17 is 40 terms long and contains "attorney" twice and "vehicle" three times. Use natural logs and term frequency as a proportion of the note's length.
Answer
- For "attorney",
w = (2/40) \cdot \ln(1{,}000/50) = 0.050 \times 2.9957 = 0.1498.- For "vehicle",
w = (3/40) \cdot \ln(1{,}000/800) = 0.075 \times 0.2231 = 0.0167.- "Attorney" carries about 9 times the weight of "vehicle", although it appears less often in the note.
- Almost every auto claim mentions a vehicle but few mention a lawyer, so "attorney" is the word that distinguishes this claim, a natural feature for a litigation-propensity model.
Other feature extraction
Images become pixel arrays fed to a Neural Network. The features extracted from text or images are wide and sparse (High-Dimensional Data), so they are usually reduced or penalized, by Principal Components Analysis or the lasso, before or while they enter a supervised model.
Quality and governance
Unstructured sources are typed by people under no schema, so misspellings, abbreviations, copied boilerplate and personal or health information are common. Data Quality review and privacy controls (data governance) weigh more heavily than for a policy table.