The Preisach operator and its variants have been successfully used in the modeling of hysteresis observed in ferromagnetic, magnetostrictive, and piezoelectric materials. However, in designing with these "smart" materials, one has to determine a density function for the Preisach operator by using the input-output behavior of the material at hand. In this paper, we describe a method for numerically determining an approximation of the density function when there is not enough experimental data to uniquely solve for the actual density function by Mayergoyz's method. We present theoretical justification for our method by establishing links to regularization methods for ill-posed problems. We also present numerical results where we estimate an approximate density function from data published in the literature for a magnetostrictive actuator and two electroactive polymers.