<s> import ee <EOL> from cmt . mapclient_qt import centerMap , addToMap <EOL> from histogram import RadarHistogram <EOL> '''<STR_LIT>''' <EOL> def __learning_threshold ( domain , algorithm ) : <EOL> training_domain = None <EOL> if domain . training_domain : <EOL> training_domain = domain . training_domain <EOL> elif domain . unflooded_domain : <EOL> training_domain = domain . unflooded_domain <EOL> if not training_domain : <EOL> raise Exception ( '<STR_LIT>' ) <EOL> classifier = ee . apply ( '<STR_LIT>' , { '<STR_LIT:image>' : training_domain . get_radar ( ) . image , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : training_domain . ground_truth , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : training_domain . bounds , <EOL> '<STR_LIT>' : <NUM_LIT:2> , <EOL> '<STR_LIT>' : algorithm } ) <EOL> classified = ee . call ( '<STR_LIT>' , domain . get_radar ( ) . image , classifier ) . select ( [ '<STR_LIT>' ] , [ '<STR_LIT>' ] ) ; <EOL> return classified ; <EOL> def decision_tree ( domain ) : <EOL> '''<STR_LIT>''' <EOL> return __learning_threshold ( domain , '<STR_LIT>' ) <EOL> def random_forests ( domain ) : <EOL> '''<STR_LIT>''' <EOL> return __learning_threshold ( domain , '<STR_LIT>' ) <EOL> def svm ( domain ) : <EOL> '''<STR_LIT>''' <EOL> return __learning_threshold ( domain , '<STR_LIT>' ) </s>
