To calibrate an optical transition edge sensor (TES), for each pulse of a light source (e.g. pulsed laser), one must determine the ratio of the expected number of photons that deposit energy in the TES and the expected number of photons created by the laser. The pulse height spectrum produced by many energy deposits in the TES has features corresponding to different numbers of deposited photons. I model the number of photons that deposit energy per laser pulse as a realization of a Poisson random variable. Based on a mixture model method, I determine the expected number of photons that deposit energy per laser pulse from the weights associated with selected features. From training data, I select the optimal set of features according to an uncertainty minimization criterion. I then determine the expected number of photons that deposit energy per pulse and its associated uncertainty from test data that is independent of the training data. My uncertainty budget accounts for random measurement errors, systematic effects due to mismodeling of feature shapes in the mixture model, and possible imperfections in the feature set selection method.