In this paper, the possibilities of developing machine learning based data-driven models for the short-term prediction of indoor temperature within prediction horizons ranging from 1 hour up to 12 hours are systematically investigated. The study was based on a TRNSYS emulation of a residential building heated by a heat pump, combined with measured weather data for a typical winter season in Ljubljana, Slovenia. Autoregressive models with exogenous inputs (ARX), neural network models (NN), and extreme learning machine models (ELM) are considered. The results confirm the finding that nonlinear models, particularly the NN model trained by regularization, consistently outperform linear models in both fitting and generalization performance, so they are the recommended choice as predictive models. The availability of future weather data considerably improved the predictive performance of all the tested models. Besides data about the future outdoor temperature, also data about future expected solar radiation significantly improve predictions of temperature in buildings. The linear models required embedding dimensions of 24 hours for accurate predictions, whereas the nonlinear models were not very sensitive to the use of past data. Nonlinear models required about three months of training data to reach good predictive performance, whereas the linear models converged to accurate predictions within six weeks. The RMSE prediction errors, averaged over all the data sets and all the prediction horizons, are within the range between 0.155°C for the linear ARX model (in the case of no future available weather data), and 0.065°C for the neural network model (in the case of available future weather data).