openavmkit.value_studies
Assessment-quality studies on any value field, written to disk.
The assessment_quality notebook runs ratio, vertical-equity and
horizontal-equity studies on a value field (typically the assessor's current
market value) one model group at a time and displays the results. This module
runs the same studies for every model group plus the whole jurisdiction, for one
or more value fields, and writes the results as JSON so that reports and other
front ends can use them without re-running anything.
No modeling is required: the studies only need sales, model groups and the value
field(s). Horizontal equity additionally needs the equity clusters marked in the
clean stage (he_id); without them it is skipped.
Sales are scored on raw sale_price within the ratio-study window
(analysis.ratio_study.look_back_years before the valuation date), matching
the formal ratio study.
run_value_field_studies
run_value_field_studies(sup, settings, fields, *, location=None, start_date=None, end_date=None, confidence_interval=0.9, max_trim=0.05, outpath='out/studies', sale_field='sale_price', trim_outliers=False, iqr_factor=1.5, trim_share=0.1, median_ci='bootstrap', standards=None, classes=None, region=None)
Run ratio and equity studies on value fields for every model group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sup
|
SalesUniversePair
|
Sales and universe, after the clean stage (or at least after model groups are tagged). |
required |
settings
|
dict
|
Settings dictionary. |
required |
fields
|
list[str]
|
Universe value fields to study, e.g. |
required |
location
|
str
|
Location field for the grouped vertical-equity quantiles. Defaults to the
first entry of |
None
|
start_date
|
date - like
|
Sales window. Defaults to the ratio-study look-back window ending at the valuation date. |
None
|
end_date
|
date - like
|
Sales window. Defaults to the ratio-study look-back window ending at the valuation date. |
None
|
confidence_interval
|
float
|
Confidence level for bootstrap intervals. Defaults to 0.90. |
0.9
|
max_trim
|
float
|
Maximum share of ratios trimmed for the trimmed statistics. Defaults to 0.05. |
0.05
|
outpath
|
str or None
|
Folder to write |
'out/studies'
|
sale_field
|
str
|
The price the values are compared with: |
'sale_price'
|
trim_outliers
|
bool
|
Also study each model group without its outlying ratios (outside |
False
|
iqr_factor
|
float
|
1.5 (outliers, the IAAO's usual) or 3.0 (extreme outliers only). |
1.5
|
trim_share
|
float
|
The most of a group trimmed (default 0.10; the exposure draft's Appendix C.5: no more than 10% under 30 sales, 20% in the most extreme cases; 5 to 10% for larger samples). |
0.1
|
median_ci
|
str
|
|
'bootstrap'
|
standards
|
dict
|
Targets to judge each study against ( |
None
|
classes
|
dict
|
Model group -> class ( |
None
|
region
|
str
|
A location field (a neighborhood, say): adds |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
|
Source code in openavmkit/value_studies.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |