This file contains hidden or 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
| def random_sampling(da, | |
| n, | |
| sampling='stratified_random', | |
| manual_class_ratios=None, | |
| out_fname=None | |
| ): | |
| """ | |
| Creates randomly sampled points for post-classification | |
| accuracy assessment. |
This file contains hidden or 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
| from datacube.utils.geometry import assign_crs | |
| import datacube | |
| import numpy as np | |
| import sys | |
| import xarray as xr | |
| sys.path.append('../Scripts') | |
| from deafrica_bandindices import calculate_indices | |
| from deafrica_temporal_statistics import temporal_statistics | |
| from deafrica_classificationtools import HiddenPrints |
This file contains hidden or 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
| import datacube | |
| import matplotlib.pyplot as plt | |
| from matplotlib.pyplot import cm | |
| from matplotlib.patches import Patch | |
| import numpy as np | |
| import sys | |
| import xarray as xr | |
| sys.path.append('../Scripts') | |
| from deafrica_datahandling import load_ard |
NewerOlder