In this paper, we propose a model that can explain the mechanism of self and non-self discrimination. Infants gradually develop their abilities for self–other cognition through interaction with the environment. Predictive learning has been widely used to explain the mechanism of infants’ development. We hypothesized that infants’ cognitive abilities are developed through predictive learning and the uncertainty estimation of their sensory-motor inputs. We chose a stochastic continuous time recurrent neural network, which is a dynamical neural network model, to predict uncertainties as variances. From the perspective of cognitive developmental robotics, a predictive learning experiment with a robot was performed. The results indicate that training made the robot predict the regions related to its body more easily. We confirmed that self and non-self cognitive abilities might be acquired through predictive learning with uncertainty estimation.