1. A pattern recognition device comprising: a receiver configured to receive a time-series signal; a signal processor configured to calculate a feature of the time-series signal for each frame; a first recognizer configured to recognize which of a leaf class and a single class of a first class group the time-series signal belongs to for each frame on the basis of the feature and output a recognition result, the first class group including a first target class represented by a tree structure and a first non-target class not represented by a tree structure, the first target class including a plurality of leaf classes assigned to, respectively, a plurality of leaves and a node class assigned to a node, the first non-target class including the single class; a detector configured to detect a segment including a plurality of frames on the basis of the recognition result, a sum of probabilities of the leaf classes to each of which each of the plurality of frames belongs being larger than a threshold; a second recognizer configured to recognize which of a plurality of second target classes of a second class group the segment belongs to on the basis of the recognition results for the frames within the segment detected by the detector, wherein the time-series signal is a sound signal; and a display device configured to display the final recognition result provided by the second recognizer.