Similar causal relationships can exist between many cancer types, for example, metastatic bladder cancer and secondary lung cancer. This relatedness must therefore be taken into account for the diagnosis to be more accurate. The categorization of cancers can benefit from gene expression studies. In order to categorize cancer tissues with a comparable causal link, the best classifier model is sought after in this research. The CuMiDa dataset is used to obtain the lung and bladder cancer datasets, and parameters are modified to improve accuracy once fewer classifiers are taken into account. According to the experimental findings, Linear SVC achieves the highest accuracy, followed by Logistic Regression and XGBoost.