Skip to content

Commit

Permalink
Merge pull request #272 from GeoDerp/patch-12
Browse files Browse the repository at this point in the history
mlregressor.md adjusted curl examples
  • Loading branch information
davidusb-geek authored May 10, 2024
2 parents d06b829 + ae0f28b commit 77e7286
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docs/mlregressor.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ runtimeparams = {

A correct `curl` call to launch a model fit can look like this:

```bash
curl -i -H "Content-Type:application/json" -X POST -d '{"csv_file": "heating_prediction.csv", "features": ["degreeday", "solar"], "target": "heating_hours"}' http://localhost:5000/action/regressor-model-fit
```
or
```bash
curl -i -H "Content-Type:application/json" -X POST -d '{"csv_file": "heating_prediction.csv", "features": ["degreeday", "solar"], "target": "hour", "regression_model": "RandomForestRegression", "model_type": "heating_hours_degreeday", "timestamp": "timestamp", "date_features": ["month", "day_of_week"], "new_values": [12.79, 4.766, 1, 2] }' http://localhost:5000/action/regressor-model-fit
```
Expand Down Expand Up @@ -108,9 +104,8 @@ runtimeparams = {
```

Pass the correct `model_type` like this:

```bash
curl -i -H "Content-Type:application/json" -X POST -d '{"model_type": "heating_hours_degreeday"}' http://localhost:5000/action/regressor-model-predict
curl -i -H "Content-Type:application/json" -X POST -d '{"new_values": [8.2, 7.23, 2, 6], "model_type": "heating_hours_degreeday" }' http://localhost:5000/action/regressor-model-predict
```
or
```bash
Expand Down Expand Up @@ -193,4 +188,4 @@ action:
{% set time = now() %}
{{time}},{{degreeday}},{{solar}},{{heating_hours}}
```
```

0 comments on commit 77e7286

Please sign in to comment.