Achieving precise control in laser-based powder bed fusion of polymers is crucial for ensuring the structural integrity of aerospace and automotive components. Closed-loop feedback control systems using process monitoring techniques, such as infrared thermography, have the potential to provide reliable production by controlling the temperature of the melt. However, challenges arise from complex interactions among variables, such as part geometry, scan strategy, and laser parameters, affecting the melted polymer's temperatures and subsequent particle fusion. Thus, the correlation between thermal signals and resulting part density still needs to be clarified. In this work, a machine learning algorithm is trained to predict local porosity or, rather, solidity based on thermal and temporal features extracted from the melt's temperature-time profile. This enables statistical techniques to assess the contribution of the melt's thermal and temporal features in the decision-making process for evaluating porosity, along with the influence of voxel size and configuration. The in-situ process signature is measured using infrared thermography, and the porosity is analyzed by X-ray micro-computed tomography. The 2D thermal data is first converted into voxel information and then stitched with the 3D mircoCT data in a second step. The resulting 3D thermal features and porosity matrices are downsampled and utilized to train a machine learning algorithm (lightGBM). Models with high prediction accuracy are achieved using a small voxel size to avoid over-homogenizing features and by utilizing thermal signals from adjacent voxels to determine porosity in a volume element. The highest predictor for resulting porosity is the peak temperature of the melt during laser exposure. Interlayer effects, such as sufficient reheating of subsurface layers, are the second-highest indicator for dense parts. Furthermore, the model's performance is also affected by intra-layer effects, including the peak temperature of adjacent voxels and the cooling behavior after laser exposure. This research has several implications for industry, as it enables the detection of process defects based on in-situ process monitoring data without post-process material testing. Moreover, identifying thermal signal ranges that lead to the highest porosity can reduce the number of experiments needed for material qualification processes.