Organic carbon (OC) and elemental carbon (EC) play important roles in various atmospheric processes and health effects. Predicting carbonaceous aerosols and identifying source contributions are important steps for further epidemiological study and formulating effective emission control policies. However, we are not aware of any study that examined predictions of OC and EC, and this work is also the first study that attempted to use machine learning and hyperparameter optimization method to predict concentrations of specific aerosol contaminants. This paper describes an investigation of the characteristics and sources of OC and EC in fine particulate matter (PM(2.5)) from 2005 to 2010 in the City of Taipei. Respective hourly average concentrations of OC and EC were 5.2 μg/m(3) and 1.6 μg/m(3). We observed obvious seasonal variation in OC but not in EC. Hourly and daily OC and EC concentrations were predicted using generalized additive model and grey wolf optimized multilayer perceptron model, which could explain up to about 80% of the total variation. Subsequent clustering suggests that traffic emission was the major contribution to OC, accounting for about 80% in the spring, 65% in the summer, and 90% in the fall and winter. In the Taipei area, local emissions were the dominant sources of OC and EC in all seasons, and long-range transport had a significant contribution to OC and in PM(2.5) in spring.