1. A method for predicting an output variable from explanatory values provided as sets of combinations of discrete variables and continuous variables, wherein the method comprises: receiving, with a processing device, input data that contains the explanatory variables to predict the output variable; searching for each element in the combinations of discrete variables and continuous variables in the sets included in the input data for elements in a plurality of sets with matching discrete variables using training data related to a plurality of sets in which the output variable has been observed; applying a function giving the degree of similarity between two sets weighed by a scale variable that represents a scalar corresponding to the output variable and is obtained from a continuous variable to each element in the input data, and to one or more elements found in the elements of the input data to calculate function values, and for calculating the sum of the function values for all of the elements in the input data; and applying the calculated sum for each element to a prediction equation for predicting the output variable to calculate a prediction value of the output variable for each element.