High-throughput density-functional calculations of solids are extremely time consuming. As an alternative, we here propose a machine learning approach for the fast prediction of solid-state properties. To achieve this, LSDA calculations are used as training set. We focus on predicting metallic vs. insulating behavior, and on predicting the value of the density of electronic states at the Fermi energy. We find that conventional representations of the input data, such as the Coulomb matrix, are not suitable for the training of learning machines in the case of periodic solids. We propose a novel crystal structure representation for which learning and competitive prediction accuracies become possible within an unrestricted class of spd systems. Due to magnetic phenomena learning on d systems is found more difficult than in pure sp systems.