From 1ff65d118c6ce1ffaef2e1dc94bf6c70d09bac99 Mon Sep 17 00:00:00 2001 From: kmarkert Date: Mon, 19 Apr 2021 16:14:49 -0500 Subject: [PATCH] added doc strings for histogram matching funciton --- hydrafloods/ml.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hydrafloods/ml.py b/hydrafloods/ml.py index 10ef16d..e8c624b 100644 --- a/hydrafloods/ml.py +++ b/hydrafloods/ml.py @@ -647,6 +647,18 @@ def apply_image_pca(img, eigen_vecs, names, center=None): def hist_matching(samples, predictor, target, n_estimators=50): + """Trains classifiers to perform histogram matching + + args: + samples (ee.FeatureCollection): feature collection with samples for histogram matching + predictor (str): column name of values to transform + target (str): column name of values to match + n_estimators (int, optional): number of trees to create random forest models from. default = 50 + + returns: + list[ee.Classifier]: list of classifiers with first element being the val to proba and second being proba to val classifiers + + """ def get_cdf(fc,column): def array_to_features(l):