First of all I am not sure I can even tell the difference between a sweet potato and a yam, aren't they the same thing? I just read an article from self.com about the difference between the two and I was shocked! The sweet potato which is related to the morning glory, is lower in calories, has a lower glycemic load and is much higher in beta carotene compared to the yam which belongs to the lily family. As the sweet potato is considered to be moderately anti- inflammatory a serving of yams is moderately inflammatory. Although the yam does have a few redeeming qualities like higher levels of vitamin C and folate the sweet potato is a better bet, nutritionally.
But don't panic as the US tends to use the terms "yam" and "sweet potato" interchangeably and the odds are that anything you bought from an American market was probably from the sweet potato family. To find a true yam you'll probably have to go to an international market that carries a lot of African or Caribbean foods. True Yams are quite larger than sweet potatoes and can be up to the length of someones arm, as they are usually cut into smaller chunks.