-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Processes for Random Forest #306
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
761b147
New processes for random forest #295
m-mohr 379cf98
Classification Random Forest draft (based on regression draft)
clausmichele 0661d07
Merge branch 'draft' into issue-295
m-mohr 788b8d5
Update proposals
m-mohr 2746734
Add seed parameter, make training parameter use fractions instead of …
m-mohr 555b693
Merge remote-tracking branch 'origin/draft' into issue-295
m-mohr 21848e8
Add references to RF processes to load_ml_model
m-mohr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"id": "fit_class_random_forest", | ||
"summary": "Train a random forest classification model", | ||
"description": "Executes the fit of a random forest classification based on the user input of target and predictors. The Random Forest classification model is based on the approach by Breiman (2001).", | ||
"categories": [ | ||
"machine learning" | ||
], | ||
"experimental": true, | ||
"parameters": [ | ||
{ | ||
"name": "predictors", | ||
"description": "The predictors for the classification model as a vector data cube. Aggregated to the features (vectors) of the target input variable.", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "vector-cube" | ||
} | ||
}, | ||
{ | ||
"name": "target", | ||
"description": "The training sites for the classification model as a vector data cube. This is associated with the target variable for the Random Forest model. The geometry has to associated with a value to predict (e.g. fractional forest canopy cover).", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "vector-cube" | ||
} | ||
}, | ||
{ | ||
"name": "training", | ||
"description": "The amount of training data to be used in the classification, given as a fraction. The sampling will be chosen randomly through the data object. The remaining data will be used as test data for the validation.", | ||
"schema": { | ||
"type": "number", | ||
"exclusiveMinimum": 0, | ||
"maximum": 1 | ||
} | ||
}, | ||
{ | ||
"name": "num_trees", | ||
"description": "The number of trees build within the Random Forest classification.", | ||
"optional": true, | ||
"default": 100, | ||
"schema": { | ||
"type": "integer", | ||
"minimum": 1 | ||
} | ||
}, | ||
{ | ||
"name": "mtry", | ||
"description": "Specifies how many split variables will be used at a node. Default value is `null`, which corresponds to the number of predictors divided by 3.", | ||
"optional": true, | ||
"default": null, | ||
"schema": [ | ||
{ | ||
"type": "integer", | ||
"minimum": 1 | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "seed", | ||
"description": "A randomization seed to use for the random sampling in training. If not given or `null`, no seed is used and results may differ on subsequent use.", | ||
"optional": true, | ||
"default": null, | ||
"schema": { | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
} | ||
} | ||
], | ||
"returns": { | ||
"description": "A model object that can be saved with ``save_ml_model()`` and restored with ``load_ml_model()``.", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "ml-model" | ||
} | ||
}, | ||
"links": [ | ||
{ | ||
"href": "https://doi.org/10.1023/A:1010933404324", | ||
"title": "Breiman (2001): Random Forests", | ||
"type": "text/html", | ||
"rel": "about" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"id": "fit_regr_random_forest", | ||
"summary": "Train a random forest regression model", | ||
"description": "Executes the fit of a random forest regression based on the user input of target and predictors. The Random Forest regression model is based on the approach by Breiman (2001).", | ||
"categories": [ | ||
"machine learning" | ||
], | ||
"experimental": true, | ||
"parameters": [ | ||
{ | ||
"name": "predictors", | ||
"description": "The predictors for the regression model as a vector data cube. Aggregated to the features (vectors) of the target input variable.", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "vector-cube" | ||
} | ||
}, | ||
{ | ||
"name": "target", | ||
"description": "The training sites for the regression model as a vector data cube. This is associated with the target variable for the Random Forest model. The geometry has to associated with a value to predict (e.g. fractional forest canopy cover).", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "vector-cube" | ||
} | ||
}, | ||
{ | ||
"name": "training", | ||
"description": "The amount of training data to be used in the regression, given as a fraction. The sampling will be randomly through the data object. The remaining data will be used as test data for the validation.", | ||
"schema": { | ||
"type": "number", | ||
"exclusiveMinimum": 0, | ||
"maximum": 1 | ||
} | ||
}, | ||
{ | ||
"name": "num_trees", | ||
"description": "The number of trees build within the Random Forest regression.", | ||
"optional": true, | ||
"default": 100, | ||
"schema": { | ||
"type": "integer", | ||
"minimum": 1 | ||
} | ||
}, | ||
{ | ||
"name": "mtry", | ||
"description": "Specifies how many split variables will be used at a node. Default value is `null`, which corresponds to the number of predictors divided by 3.", | ||
"optional": true, | ||
"default": null, | ||
"schema": [ | ||
{ | ||
"type": "integer", | ||
"minimum": 1 | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "seed", | ||
"description": "A randomization seed to use for the random sampling in training. If not given or `null`, no seed is used and results may differ on subsequent use.", | ||
"optional": true, | ||
"default": null, | ||
"schema": { | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
} | ||
} | ||
], | ||
"returns": { | ||
"description": "A model object that can be saved with ``save_ml_model()`` and restored with ``load_ml_model()``.", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "ml-model" | ||
} | ||
}, | ||
"links": [ | ||
{ | ||
"href": "https://doi.org/10.1023/A:1010933404324", | ||
"title": "Breiman (2001): Random Forests", | ||
"type": "text/html", | ||
"rel": "about" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"id": "predict_random_forest", | ||
"summary": "Predict values from a Random Forest model", | ||
"description": "Applies a Random Forest machine learning model to an array and predict a value for it.", | ||
"categories": [ | ||
"machine learning", | ||
"reducer" | ||
], | ||
"experimental": true, | ||
"parameters": [ | ||
{ | ||
"name": "data", | ||
"description": "An array of numbers.", | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": [ | ||
"number", | ||
"null" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "model", | ||
"description": "A model object that can be trained with the processes ``fit_regr_random_forest()`` (regression) and ``fit_class_random_forest()`` (classification).", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "ml-model" | ||
} | ||
} | ||
], | ||
"returns": { | ||
"description": "The predicted value. Returns `null` if any of the given values in the array is a no-data value.", | ||
"schema": { | ||
"type": [ | ||
"number", | ||
"null" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,5 @@ gdalwarp | |
Lanczos | ||
sinc | ||
interpolants | ||
Hyndman | ||
Breiman | ||
Hyndman |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeoPySpark -> max_bins
scikit-learn -> max_features