Smooth Chain Graph Model of type II: a learning procedure