Competitive learning neural networks for pattern clustering