1.3 KiB
1.3 KiB
Linear regression growth prediction
The objective of this calculation is to derive the expected length and depth of anomalies at a particular date in the future (the target_date) for each matched anomaly in the pipeline.
Input
Arguments
org_id: as string which should be a validuuidfor the organizationproject_id: the id of the data project where the pipeline data is foundpipeline_id: anarrayofstringswhich should each be a valid uuid representing a pipeline.target_date: astringrepresenting the date for which the corrosion growth rate should be predicted.
Creating the function on the platform
To create this function on the platform using the cli set up the port forwarding as shown in README.
Then run the following command to create the function.
cargo run functions create \
-f functions/acr_linear_regression \
-d "Run the linear regression prediction calculation" \
-i org_id=string \
-i project_id=string \
-i target_date=string \
-i pipeline_id=array
Testing the function locally
You can run and test the function locally by running
cargo run
Then you can check it work with curl as follows
curl localhost:8080 -d $(jq '. | tojson' functions/acr_linear_regression/example_input.json)