Abstract Background The use of intrathoracic impedance for examining pleural effusion in heart failure patients has been explored previously. However, due to concerns about its accuracy and complexity, transthoracic impedance values have had limitations in quantifying extravascular lung water. Our dual objectives were to clarify the relationship between intrathoracic conditions and percutaneous transthoracic impedance values, and to establish a basic model for a new machine learning-based estimation system for assessing intrathoracic conditions in patients with heart failure. Methods First, we developed a live porcine congested lung model that induced pleural effusion by substantial fluid loading, and then longitudinally evaluated its correlation with percutaneous transthoracic impedance values. Second, we conducted multi-frequency bioelectrical impedance analysis to simultaneously collect electrical, physical, and hematological data from 63 hospitalized heart failure patients and 82 healthy volunteers Results In the porcine model, pleural effusion correlated with a concurrent decrease in SpO2 and a gradual decrease in impedance. We indexed and generated features from the measured values and developed an intrathoracic estimation model based on electrical measurements and clinical findings using a decision tree-based machine learning approach. Among the 286 features collected per individual, the model used 16 features. Notably, the model demonstrated high accuracy in discriminating patients with pleural effusion, achieving an AUC of 0.905 (95% CI: 0.870-0.940) in cross-validation, significantly outperforming the conventional frequency-based method. Conclusions Transthoracic impedance values, when indexed, reflect intrathoracic conditions and improve estimation. Our results highlighted the potential of machine learning and thoracic impedance measurement for accurate estimation of pleural effusion. This approach provides an effective means of assessing intrathoracic conditions. Figure: The upper figure shows the relationship between impedance values and pleural effusion in the congested lung model. On these results, human data were collected to construct the estimation model. The lower illustrates the accuracy of the model and provides a comprehensive view of the system.