Inverse Schema
Inverse objects represent steps in the inverse solution and/or optimization process.
Schema
{
"id": 123,
"created_at": "2025-01-31T10:00:00.000Z",
"updated_at": "2025-01-31T10:00:00.000Z",
"disabled_at": null,
"loaded_at": "2025-01-31T10:00:01.000Z",
"satisfied_at": null,
"stopped_at": null,
"exhausted_at": null,
"iteration": 1,
"l1_norm": 0.001,
"suggest_time": 125000000,
"compute_time": 50000000,
"input": [1.0, 2.0, 3.0],
"output": [4.0, 5.0, 6.0],
"results": [
// Result objects
]
}
Fields
id
integer
Yes
Unique identifier
created_at
string
Yes
Creation timestamp
updated_at
string
Yes
Last update timestamp
disabled_at
string
No
Disable timestamp
loaded_at
string
No
When output was loaded
satisfied_at
string
No
When all objectives satisfied
stopped_at
string
No
When manually stopped
exhausted_at
string
No
When max iterations reached
iteration
integer
Yes
Current iteration number
l1_norm
float
Yes
Current L1 norm error
suggest_time
integer
Yes
Suggestion time (nanoseconds)
compute_time
integer
Yes
Computation time (nanoseconds)
input
array[float]
Yes
Input parameter values
output
array[float]
No
Output values (if loaded)
results
array[Result]
No
Individual objective results
Stop Reasons
The stop reason can be determined from timestamps:
Running
0
No stop timestamps set
Satisfied
1
satisfied_at is set
Stopped
2
stopped_at is set
Exhausted
3
exhausted_at is set
Priority order if multiple set:
satisfied_at
stopped_at
exhausted_at
Input/Output Arrays
input array length must match project input_count
output array length must match objective count
all values must be valid floats/integers
arrays must not contain null values
Performance Metrics
suggest_time: Time to generate next inputs
compute_time: Time to evaluate outputs
Higher times may indicate:
Complex objective landscape
Numerical instability
Resource constraints
Results Array
Contains Result objects matching objective count:
One Result per objective
Result.number matches objective index
Results track satisfaction status
Null until output is loaded
All results must be satisfied for inverse.satisfied_at to be set
Usage Notes
Check stopReason using helper methods:
if inverse.should_stop(): reason = inverse.get_stop_reason()
Examine results for detailed status:
for result in inverse.results: print(f"Objective {result.number}: {'✓' if result.satisfied else '✗'}")
Monitor performance:
print(f"Suggestion took {inverse.suggest_time/1000000:.2f}ms") print(f"Computation took {inverse.compute_time/1000000:.2f}ms")
Track convergence:
print(f"Current L1 norm: {inverse.l1_norm}")
Last updated