Recently, artificial Intelligence (AI) and machine learning are unlocking the potentials with accelerated prediction of material properties for novel material discovery and design. Electronic density of states (DOS) is a key factor in condensed matter physics that determines the properties of metals. First-principles density-functional theory (DFT) calculations have typically been used to obtain the DOS despite their considerable computation cost. Herein, we report a fast machine-learning method for predicting the DOS patterns of multi-component alloy systems based on a principal component analysis. Within this framework, we input only three features based on the composition and atomic structure: the d-orbital occupation ratio, coordination number, and mixing factor. While the DFT method scales as O(N3), where N is the number of electrons in the system size, our pattern learning method takes only 1 minute on a single CPU core irrespective of N and therefore can scale as O(1). Furthermore, our method provides an accuracy of 91~98 % compared to DFT calculations. This reveals that our learning method will be an alternative that can break the trade-off relationship between accuracy and speed that is well known in the field of electronic structure calculations.