1. An apparatus for medical diagnostic imaging assistance with a detection function for automatically detecting a lesion on a target case image, comprising: memory that stores first feature information representing a feature of a lesion mask or a non-lesion mask as first learning data per mask; a sampling unit that samples more than one of said first learning data, and generates a plurality of different subsets of learning data; a machine-learning unit that generates a first discrimination condition corresponding to each of the plurality of different subsets by carrying out a machine-learning process on the plurality of different subsets; and a statistical processing unit that carries out a statistical processing step under the first discrimination condition to generate a second discrimination condition, wherein category information indicating a category used for medical or statistical classification is added to the first learning data stored in the memory, wherein the sampling unit samples the first learning data and generates the plurality of different subsets of learning data based on the category information, and wherein a number of samples of the first learning data sampled by the sampling unit is determined based on the category information.