In this study, photocatalytic activities of polyaniline-modified TiO 2 and ZnO were examined by photodegradation of Sunfix red S3B reactive dye under visible light. The nanocomposites have been synthesized by in situ oxidative polymerization method. Structural, morphological, and optical characteristics of the prepared photocatalysts were analyzed by Fourier transform infrared spectroscopy and scanning electron microscopy techniques. The results showed that photocatalytic activities of the synthesized nanocomposites have increased due to increasing density of electrons in TiO 2 and ZnO. Irradiation tests were performed to investigate the impacts of photocatalyst amount, initial dye concentration, and irradiation period on photodegradation efficiency. Strength and direction of the relationships between the experimental conditions and the obtained photocatalytic efficiencies were also examined by bivariate correlation analysis. Photocatalyst amount was found to be the most effective factor in the process with correlation coefficients of 0.76 and 0.77 for PANI/TiO 2 and PANI/ZnO, respectively. In the final stage of the work, artificial neural networks were applied to predict the photodegradation efficiencies of the synthesized nanocomposites, individually. The chosen network architecture provided good prediction performances for both of the nanocomposite types.