Active implantable medical device comprises ventricular pacing unit for delivering stimulation pulses of low energy to be applied to electrode implanted in the right and/or left ventricular cavity of a patient, unit for testing ventricular capture and detecting the onset of ventricular contraction resulting from delivery of stimulation pulse, and unit for analyzing endocardial acceleration (EA) signal for determining presence and absence of ventricular capture. Active implantable medical device comprises (a) ventricular pacing unit for delivering stimulation pulses of low energy to be applied to electrode implanted in the right and/or left ventricular cavity of a patient, (b) unit for testing ventricular capture and detecting the onset of ventricular contraction resulting from delivery of stimulation pulse, comprising acceleration sensor having as an output an endocardial acceleration (EA) signal representative of patient's endocardiac acceleration, and (c) unit for analyzing EA signal for determining presence and absence of ventricular capture, where the unit for analyzing the EA signal comprises unit for isolating at least one EA component of endocardial acceleration in EA signal corresponding to first major noise of the heart, and at least one EA component describing the continuous variation of the EA signal in bounded temporal window corresponding to fraction of cardiac cycle, extracting at least one EA component and n indicators, and forming vector EA. The device further comprises classifier unit for using during preliminary phase, acquiring several EA signals at stimulation energy level high enough to cause capture and forming corresponding several first reference EA vectors, obtaining several EA signals in spontaneous rhythm of the patient in the absence of ventricular pacing and forming corresponding several second reference EA vectors and from the obtained first and second vectors, and partitioning n-dimensional space of the EA vectors into two subspaces co