I was wondering what the exact rules are concerning hyphens, I know that they should be used to combine words that are used together but I'm not sure why for example "example-based methods" use a hyphen but machine learning does not.
So for what reason do these words have different rules and can this in any way be generalized?