Dynamic creation of NNAlgorithm with Factories