The Analog Ensemble (AnEn) technique is a technique that has been shown effective on several weather problems. Unlike previous weather analogs that are sought within a large spatial domain and an extended temporal window, AnEn strictly confines space and time, and independently generates results at each grid point within a short time window. AnEn can find similar forecasts that lead to accurate and calibrated ensemble forecasts. The central core of the AnEn technique is a similarity metric that sorts historical forecasts with respect to a new target prediction. A commonly used metric is a Euclidean distance function which computes the distance between a target and a historical set of forecasts using a weighted difference of all multivariate parameters, normalized by the standard deviation of the historical set. A significant difficulty using this metric is the definition of the weights for all the parameters. Generally, the AnEn methodology starts with a feature selection task, where a subset of parameters are selected, and then weights are identified using heuristics or an optimization process. While this method has been proven effective, it is expedient and error inducing. AnEn is, in fact, characterized by a systematic bias when applied to extreme events, and this bias can potentially be hard to compensate if only a limited set of historical forecasts is available. This paper proposes a novel definition of weather analogs through a Machine Learning (ML) based similarity metric. The similarity metric uses neural networks that are trained and instantiated to search for weather analogs. This new metric allows incorporating all variables without requiring a prior feature selection and weight optimization. Experiments are presented on the application of this new metric to forecast wind speed and solar irradiance. Results show that the ML metric generally outperforms the original metric. The ML metric has a better capability to correct for larger errors and to take advantage of a larger search repository. Spatial predictions using a learned metric also show the ability to define effective latent features that are transferable to other locations. ∗Corresponding author. weiming@psu.edu. 205 Walker Building, University Park, PA, 16802. http: