Could a Wild Magic Surge be triggered by a Wild Magic Sorcerer using a Magic Initiate spell?

Under Wild Magic Surge it states:

Immediately after you cast a sorcerer spell of first level or higher, the DM can have you roll a d20.

Since Magic Initiate has you choose spells from a specific class, would a Wild Magic Sorcerer theoretically be able to Wild Magic Surge when casting those spells, assuming they chose from the sorcerer list?