This is a follow-on question to How can one create a binary image from a FeatureCollection in Google Earth Engine?
The corresponding minimal example can be found here: https://code.earthengine.google.com/3cbd9c722f8ceca84281327cecd8cdb8
I don't quite get how a raster image containing class labels for every pixel can be used to select training samples using GEE's in-built function ee.Image.stratifiedSample(). In the minimal example, the following error occurs: "FeatureCollection (Error) Remote request too large (134217728 > 83886080) for output: [< Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >, < Object >]."
Although my question and the minimal example refer to a simply binary classifer (which could theoretically also be modelled as a one-class problem, as I am only interested in the foreground), the problem should be directly transferable to classical multi-class classification problems.
Maybe I am also misunderstanding the concept of ee.Image.stratifiedSample()? This possibly also relates to my other question What's the difference between sample, sampleRegions, and stratifiedSample in Google Earth Engine?