CBR systems are normally used to assist experts in the resolution of problems. During the last few years researchers have been working in the development of techniques to automate the reasoning stages identified in this methodology. This paper presents a Maximum Likelihood Hebbian Learning-based method that automates the organisation of cases and the retrieval stage of casebased reasoning systems. The proposed methodology has been derived as an extension of the Principal Component Analysis, and groups similar cases, identifying clusters automatically in a data set in an unsupervised mode. The method has been successfully used to completely automate the reasoning process of an oceanographic forecasting system and to improve its performance.