P-type transparent conducting materials (p-TCMs) are important components of optoelectronic devices including solar cells, photodetectors, displays, and flexible sensors. Cu-Zn-S (CZS) thin films prepared by chemical bath deposition (CBD) can have both high transparency in the visible range (>80%) as well as excellent hole conductivity (>1000 S cm-1). However, the interplay between the deposition parameters in the CBD process (metal and sulfur precursor concentrations, temperature, pH, complexing agents, etc.) creates a multi-dimensional parameter space such that optimization for a specific application is challenging and time consuming. Here, we show that strategic design of experiment (DOE) combined with machine learning (ML) allows for efficient optimization of p-TCM performance. The approach is guided by a figure of merit (FOM) calculated from the film conductivity and optical transmission in the desired spectral range. A specific example is shown using two steps of optimization using a selected subset of 4 experimental CBD factors. The machine learning model is based on support vector regression (SVR) employing a radial basis function (RBF) as the kernel function. 10-fold cross-validation was performed to mitigate overfitting. After the first round of optimization, predicted areas in the parameter space with maximal FOMs were selected for a second round of optimization. Films with optimal FOMs were incorporated into heterojunction solar cells and transparent photodiodes. The optimization approach shown here will be generally applicable to any materials synthesis process with multiple parameters.