Stay organized with collectionsSave and categorize content based on your preferences.
Usemodel.predictProperties()to make predictions on anee.FeatureCollection. Each Feature is a data point, and each property is a
model input feature The inputs and outputs can be scalar string values,
scalar boolean values, or numeric values of any shape, from scalars to
multidimensional arrays. The outputs of the model are represented as new
properties in the output table.
Input and Outputs
To control the inputs and outputs of the model use the following arguments:
inputProperties
Set input properties to the list of properties you explicitly want to send do
your hosted model.
inputTypeOverride
inputTypeOverrideis a dictionary of property names with specific type and
dimension information provided. This might be necessary because many Earth
Engine algorithms create outputs with dynamic types that cannot be inferred
until runtime.
For example we may compute a value "slope" by mapping theee.Terrain.slopefunction over a collection we may need to specify the output type of "slope" in
our inference inputs like so:
TIP: You may occasionally encounter the error message that a property "cannot be
converted to a tensor". The likely solution is to use a type override to force
the input to a given type.
outputProperties
A map from output property names to a dictionary of output property info. Valid
property info fields are 'type' and 'dimensions'. 'type' should be aee.PixelTypedescribing the output property, and 'dimensions' is an optional
integer with the number of dimensions for that property if it is an array. For
example, given an 1D array property "p" specify the following output
property:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-01 UTC."],[[["\u003cp\u003eUse \u003ccode\u003emodel.predictProperties()\u003c/code\u003e to generate predictions on an \u003ccode\u003eee.FeatureCollection\u003c/code\u003e where each Feature represents a data point and each property is a model input feature.\u003c/p\u003e\n"],["\u003cp\u003eControl model inputs and outputs with \u003ccode\u003einputProperties\u003c/code\u003e, \u003ccode\u003einputTypeOverride\u003c/code\u003e, and \u003ccode\u003eoutputProperties\u003c/code\u003e arguments within \u003ccode\u003emodel.predictProperties()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003einputTypeOverride\u003c/code\u003e helps define specific type and dimension information for properties, particularly those with dynamic types derived from Earth Engine algorithms.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eoutputProperties\u003c/code\u003e defines the type and dimensions of expected model outputs, including specifying array properties using \u003ccode\u003eee.PixelType\u003c/code\u003e and \u003ccode\u003edimensions\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Property Predictions\n\nUse `model.predictProperties()` to make predictions on an\n`ee.FeatureCollection`. Each Feature is a data point, and each property is a\nmodel input feature The inputs and outputs can be scalar string values,\nscalar boolean values, or numeric values of any shape, from scalars to\nmultidimensional arrays. The outputs of the model are represented as new\nproperties in the output table.\n\nInput and Outputs\n-----------------\n\nTo control the inputs and outputs of the model use the following arguments:\n\n### `inputProperties`\n\nSet input properties to the list of properties you explicitly want to send do\nyour hosted model.\n\n#### `inputTypeOverride`\n\n`inputTypeOverride` is a dictionary of property names with specific type and\ndimension information provided. This might be necessary because many Earth\nEngine algorithms create outputs with dynamic types that cannot be inferred\nuntil runtime.\n\nFor example we may compute a value \"slope\" by mapping the `ee.Terrain.slope`\nfunction over a collection we may need to specify the output type of \"slope\" in\nour inference inputs like so: \n\n inputTypeOverride = {\n \"slope\": {\n \"type\": \"PixelType\",\n \"precision\": \"float\",\n \"dimensions\": 0,\n \"min\": -100.0,\n \"max\": 100.0\n }\n }\n\nTIP: You may occasionally encounter the error message that a property \"cannot be\nconverted to a tensor\". The likely solution is to use a type override to force\nthe input to a given type.\n\n### `outputProperties`\n\nA map from output property names to a dictionary of output property info. Valid\nproperty info fields are 'type' and 'dimensions'. 'type' should be a\n`ee.PixelType` describing the output property, and 'dimensions' is an optional\ninteger with the number of dimensions for that property if it is an array. For\nexample, given an 1D array property \"p\" specify the following output\nproperty: \n\n outputProperties = {\n \"p\": {\n \"type\": ee.PixelType.int8(),\n \"dimensions\": 1\n }\n }"]]