Entrance task #1916: factor graph model for multi-label classification example

I have closed the previous PR and included the comments in a single commit in this version.