Metric-Based Approaches for Semi-Supervised Regression and Classification