functions for blob training + classification

initially achieved; waiting for testing and tuning