## 2 Materials and Methods
### Machine Learning Methods  
Machine learning techniques were employed to classify and predict smoking behaviors based on socio-demographic, familial, and behavioral factors. The choice of algorithms was guided by their compatibility with the dataset's size and feature characteristics. The decision tree was selected as a baseline model due to its interpretability and ability to handle nonlinear relationships effectively. The ensemble method was employed to enhance robustness and mitigate overfitting by aggregating multiple weak learners, a strategy well suited for managing the variability inherent in the dataset. Support vector machines (SVMs) were chosen for their theoretical advantage in separating classes by maximizing decision margins, although their practical performance was constrained by the limited dataset size. Finally, the k-NN algorithm was implemented for its simplicity and strength in capturing localized relationships, making it an effective tool for identifying proximity-based patterns within the data. To better understand the structure of the data and assess the complexity of the classification task, a Principal Component Analysis (PCA) was conducted. The initial PCA was performed using all available features from the demographic, FRAC, and PSECDI sections of the questionnaire. In addition, a refined PCA was carried out on the six most statistically discriminative variables, identified via ANOVA F-test, to enhance interpretability. These projections aimed to explore class separability and identify meaningful clustering patterns within the dataset. The preprocessing and analysis of the dataset were designed to facilitate robust machine learning modeling while addressing data quality issues and extracting meaningful insights. Initially, the data were subjected to preprocessing steps, including the removal of rows with missing values to maintain the integrity of the dataset. Continuous variables, such as smoking frequency and family support ratings, were normalized using z-score normalization to ensure compatibility with machine learning algorithms and to avoid biases due to differing scales. In addition, categorical variables, including family smoking history, conflict levels, and type of smoking, were encoded in numerical formats. Feature engineering was applied to construct composite variables that represent the impact of smoking on family relationships and behaviors based on responses to the Likert scale. The class imbalance was addressed by oversampling the minority class, particularly for variables with significant disparity in the response distribution. The data were then partitioned into training (70%) and testing subsets (30%). Several algorithms were implemented, including a decision tree classifier, ensemble learning methods (using a bagging approach), k-nearest neighbors (k-NNs), and support vector machines (SVMs). Each model was trained and validated using stratified k-fold cross-validation to minimize overfitting and assess generalizability. Metrics such as accuracy and loss were used to evaluate model performance, and confusion matrices were generated to analyze classification consistency. All machine learning analyses were performed using Matlab R2019b for academic use (Mathworks Inc., Natick, MA, USA) and machine learning tools, ensuring a reproducible and systematic approach to analysis. The classification task was aimed to predict how participants perceived the impact of their smoking behavior on family relationships. The target variable was derived from a survey item with four ordinal response categories, 0.00, 0.33, 0.66, and 1.00, reflecting increasing levels of perceived negative impact on family dynamics. These values served as discrete class labels for supervised learning. Out of the total sample of 100 participants, the distribution of classes was imbalanced, with the majority of responses concentrated in the 0.33 and 0.66 categories. To address this imbalance and ensure fair model training, random oversampling of the minority classes was applied during preprocessing.