Detecting heart attack conditions at an early stage is crucial for healthcare, making innovative solutions that contribute to prevention and overall health improvement imperative. Machine learning, as a subset of Artificial Intelligence, plays a pivotal role in heart attack analysis and prediction, leveraging its ability to process large datasets and identify complex patterns. This study introduces a new approach to heart attack prediction by incorporating Independent Component Analysis (ICA) with various ML classifiers, namely K-Nearest Neighbors, Gradient Boosting, Naive Bayes, Support Vector Machine, and Random Forest. The proposed model was evaluated on two benchmark datasets, achieving notable accuracy rates of 93.44% and 100% on the Cleveland dataset and heart disease dataset, respectively. In addition to accuracy, a comprehensive evaluation using various metrics, including F1-score, Area Under the Curve (AUC), Precision, Recall, and Error rate, is performed. Furthermore, the analysis of the AUC-ROC curve and confusion matrix provides valuable insights into the models' predictive capabilities. The findings underscore the effectiveness of ICA in feature extraction and highlight the remarkable potential of KNN as a robust classifier for heart attack prediction.