Weighting vectors for machine learning: numerical harmonic analysis applied to boundary detection