The decision-making process in diagnostics can be mitigated if an abstinence option is provided in a machine learning algorithm. This option may reduce false prediction possibility. Design of such an algorithm is associated with two difficulties: How to train a program to have some doubts and how to overcome those doubts? This paper deals with pneumonia detection task using a chest X-ray images dataset. Cropping an image into fragments, then classification of these cropped images into "normal", "pneumonia"and "abstain"classes, and then making a general diagnosis based on partial diagnosis for all image fragments allow accuracy improvement compared to the diagnosis of the whole image classified into the "normal"and "pneumonia"classes.