Open soxofaan opened 2 years ago
attempt to do review of Demo UC9.ipynb through a github issue:
Demo UC9.ipynb
[ ] avoid doing star imports (it's practically always a bad idea):
from openeo_classification.landuse_classification import *
[ ] avoid long lines like these:
train_test_split, algorithm, nrtrees, mtry, fusion_technique, aoi, strat_layer, start_date, end_date, nr_targets, nr_spp = getStartingWidgets() ml_model = X.fit_class_random_forest(target=json.loads(y.to_json()), training=train_test_split.value, num_trees=nrtrees.value, mtry=mtry.value) cube = features.filter_spatial(gpd.GeoDataFrame.from_features(json.loads(list(aoi.value.values())[0]["content"]))["geometry"][0])
some notebook viewers (e.g. github) don't support horizontal scrolling, so you can't see the whole line
[ ] functions (like the ones in openeo_classification.landuse_classification) should have a "snake_case" name instead of camel/dromedaris case:
openeo_classification.landuse_classification
target_classes = getTargetClasses(nr_targets) ... y = getReferenceSet(aoi, nr_spp, target_classes) ... def getStrata():
should be
target_classes = get_target_classes(nr_targets) ... y = get_reference_set(aoi, nr_spp, target_classes) ... def get_strata():
attempt to do review of
Demo UC9.ipynb
through a github issue:[ ] avoid doing star imports (it's practically always a bad idea):
[ ] avoid long lines like these:
some notebook viewers (e.g. github) don't support horizontal scrolling, so you can't see the whole line
[ ] functions (like the ones in
openeo_classification.landuse_classification
) should have a "snake_case" name instead of camel/dromedaris case:should be