Electrospinning is a manufacturing technique that can produce microfibers and nanofibers from polymeric solutions. It has a broad range of applications in areas such as tissue engineering, flexible electronics, filtering, etc. However, due to its chaotic behavior, the fibers obtained by this process are prone to high diameter variations. The high diameter variations will cause poor final product functionality. The diameter is affected by process variables, ambient conditions and in-situ measurements. It is therefore important to model their effect on the fiber diameter variation, which is rarely investigated in the literature. Towards this end, this paper systematically studies the electrospinning process of a biocompatible polymer (i.e., polyacrylonitrile (PAN) 10%) via experimental study and data-driven modeling. In particular, three critical process variables (i.e., voltage, tip-to-collector distance, and polymer flow rate), are varied in a central composite design of experiment. Twenty-four runs are executed for the data collection, during which the in-situ measurements are collected via a customized sensing system. After each experiment, scanning electron microscope (SEM) images are taken from the nonwoven mats and characterized to capture the diameter and the diameter variations. Three machine learning methods, Lasso, random forest (RF), and support vector machine (SVM), are applied to the collected data. The model performance is evaluated in the real case study on the electrospinning of polymeric solution. The most predictive model (RF) can yield an around 15% relative error for prediction in testing data on average over 100 replications.