Skip to content
leesideas edited this page Apr 10, 2026 · 29 revisions

Description

Input features

Field name Type Example Description Used for Importance
property_sub_type string 'SingleFamilyResidence' Building structure type of home. Accepted values are 'Apartment', 'SingleFamilyResidence', 'Townhouse', 'Duplex', 'Terraced', 'Cabin', 'Farm' All Necessary
occupant_type string 'Owner' Ownership type of home. Accepted values are 'Owner', 'TenantOwnership' All Necessary
living_area decimal 75 Living area of home in square meters All Necessary
lot_size_area int 1000 Lot area in square meters All houses Low
secondary_area int 40 Secondary area of home in square meters All houses Medium
rooms_total decimal 4 Number of rooms in home Apartment Low
association_fee int 3500 Monthly co-operation member fee occupant_type = TenantOwnership Medium
year_built int 1950 Building construction year All High
latitude decimal 59.405589 Latitude of current residence All Necessary
longitude decimal 18.323536 Longitude of current residence All Necessary
valuation_date string '2024-01-14' Usually left empty. Specifies the date on which the valuation occurs. Note that the transactions that the valuations are based on are timestamped on the purchase contract date. All Optional

Note on Importance

A general measurement of the importance of the variable for the valuation model. Note that something with "low" importance can still be very important in some cases. Our recommendation is to include all information. Some examples:

  • House type (=property_sub_type) if you are doing a valuation on a single family house in an area with mostly townhouses
  • Lot size if you are doing a valuation on a home with a much smaller or larger lot size than the neighbours
  • Secondary area if some of the houses in the area have cellars and some don't.

Note on property_sub_type

We follow the RESO standard to the largest possible extent. However, the Swedish house types "kedjehus" ('chain house') and "radhus" ('row house') are not separated in the RESO standard. We use 'Terraced' for "kedjehus" and 'Townhouse' for "radhus". The difference is that for a "kedjehus" there is a building, usually a garage, between the houses that is connecting them.

Notes on occupant_type

For apartments, you can assume that the occupant_type is 'TenantOwnership'. The model does not perform valuations on apartments with ownership and it does not handle rental apartments. If you would try to do a valuation on a rental apartment, it would be treated as tenant ownership.

For 'SingleFamilyResidence' and 'Duplex', you can assume that occupant_type is "Owner". However, there are some rare cases where these types of houses are tenant ownerships.

At the moment, we treat houses on land leaseholds as "Owner". In general, the model will overestimate the valuations of land leaseholds. This error will likely be small due to low lease amounts in Sweden.

About the model

The model is non-parametric. It is not based on linear or exponential relationships with the input data and the valuations. Such relationships might be derived from the model, but they are not a part of the model. Sometimes the value will be higher if the lot size is smaller, for instance if there are houses in the area with small lot size with other qualities that increase the value. A small lot size might also mean that the micro-area is very attractive, so people have built a lot of houses there. The data is used to find and weigh other transactions that are used for reference. It has proven to be a very good way to do it, even if the results in some cases will be counter-intuitive. If the users are allowed to change the data on their home and re-run the valuation, sometimes they will get unexpected results.

You can use this FAQ for end users (swedish): https://www.realai.se/om-bostadsvarderingar/

Data validation

This is our recommended settings. Note that homes with extreme values are likely to not get a valuation. The min and max values in the table below are meant to avoid typing mistakes and entering information that the API cannot handle.

Parameter min max
living_area 15 600
lot_size_area 50 30000
secondary_area 0 500
rooms_total 1 20
association_fee 0 25 000
year_built 1500 'current year'
  • Note: All values are integers! Decimals are not allowed at the moment.
  • Note: Do NOT use "0" as missing value! 0 is a valid value for association fee and secondary area. Use Null or do not send the parameter.

Model Usage

SDK

import realai 
import pandas as pd

realai_client = realai.Client()
# Login
realai_client.authenticate("USER","PASSWORD")

# Perform inference and get the predicted value
result = realai_client.avm(input_features={
					  "property_sub_type": "SingleFamilyResidence",
					  "living_area": 150,
					  "lot_size_area": 32,
					  "secondary_area": None,
					  "rooms_total": 3,
					  "valuation_date": "2022-04-01",
					  "latitude": 59.405589084302875,
					  "longitude": 18.32353631202982,
					  "occupant_type": "Owner",
					  "association_fee": None,
					  "year_built": 1992
				   })


# Print the predicted value
print("Predicted Value of Home:", result['pred'])

Raw version

curl --location --request POST  'https://api.modelmarket.io/v1/models/normal/realai/avm' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data '{"property_sub_type":"SingleFamilyResidence",
      "living_area":150.0,
      "lot_size_area":32,
      "secondary_area":null,
      "rooms_total":3,
      "valuation_date":"2022-04-01",
      "latitude":59.405589084302875,
      "longitude":18.32353631202982,
      "occupant_type":"Owner",
      "association_fee":null,
      "year_built":1992}'

Clone this wiki locally