Do you want to gain weight by choosing a group class or practicing your own equipment?
The combination of the two is better. Practicing equipment will make your muscles line up. Group class is equivalent to aerobic exercise, which can reduce fat. Every time you train, you can practice equipment first and then have a small group class, otherwise you won't have the strength, and fitness will help shape. If you want to gain weight, you must increase your appetite or add meals two or three times a day.