Melola Discovery

← Melola Discovery

Journal

Optimization Of K-Nearest Neighbor Algorithm Using Information Gain And Hyperparameter Tuning In Adult Male Fertility Classification

Recursive Journal of Informatics · Vol. 4 No. 1 (2026) · pp. 21–30

DOI
10.15294/rji.v4i1.14868
ISSN
2986-6588, 2963-5551
Published
2026-03-31
Publisher
Universitas Negeri Semarang
Language
eng

Abstract

Abstract. Male fertility plays an important role in reproductive capability and global population dynamics. Male infertility can be caused by lifestyle, health conditions, and sperm quality. This research develops a male fertility classification model with an optimized K-Nearest Neighbor (KNN) algorithm using Information Gain feature selection and hyperparameter tuning with GridSearchCV. The main problems encountered are low accuracy in prediction and high computational complexity due to many irrelevant features. To overcome this, feature selection and hyperparameter optimization methods were used. The dataset used in this research comes from the UCI Machine Learning Repository, consisting of 100 data with 10 attributes. The KNN algorithm was chosen for its simplicity and ability to classify data with multiple classes and uneven distribution. However, its accuracy is highly dependent on the proper selection of features and parameters. The Information Gain method is used for selection of significant features against the target variable, reducing model complexity and computation time. Hyperparameter tuning is performed using GridSearchCV to find the best combination of parameters. The results showed that the application of Information Gain and GridSearchCV successfully improved the classification accuracy of KNN. The final model achieved 94% accuracy, better than the previous conventional method which only reached 84%. This increase in accuracy shows that KNN optimization with this approach is effective in improving male fertility classification performance. This research is expected to contribute to the development of male fertility diagnostic technology and the implementation of more accurate prediction models in clinical practice. Purpose: The proposed model is a development based on previous research that focuses on developing the K-Nearest Neighbor algorithm with a model accuracy of 84%. this study uses feature selection techniques and hyperparameter tuning in the K-Nearest Neighbor (KNN) algorithm to improve the accuracy of the male fertility classification model. Methods/Study design/approach: To improve the curation of the male fertility classification model and to optimize the model from previous research, this study uses the feature selection technique and hyperparameter tuning technique. For this technique, 2 types of optimization are carried out, namely feature selection using Information Gain and GridSearchCV hyperparameter tuning to get the best parameter combination for the proposed model. The fertility dataset has also been used in previous studies, used in this study. Result/Findings: The proposed model obtained a high accuracy of 94%, which surpassed the model in the previous study which had an accuracy of 85% for the classification of fertility levels in men. Novelty/Originality/Value: The novelty in this research is the addition of hyperparameter tuning techniques to optimize and obtain optimal parameters in the fertility classification model. This research also aims to improve and increase the accuracy of the previous model.

Keywords

Collaboration network of the authors

39 authors · 76 co-authorship links · 4 across different organisations

Hover or tap a name to highlight its co-authors. Double-click to open the author's page.

  • State University of Semarang
  • Universitas Nahdlatul Ulama Blitar
  • Institut Teknologi Kalimantan
  • Affiliation unknown
  • Different organisations
  • Same organisation
  • Affiliation unknown
  • Thicker line = more joint articles · bigger circle = more articles
Show as table
Co-authorOrganisationJoint articles
Muh. SholehAffiliation unknown2
Martanto Setyo HusodoAffiliation unknown2
Riza ArifudinState University of Semarang2
Deonisius Germandy Cahaya PutraAffiliation unknown2
Vivi WulandariAffiliation unknown2
Resta AdityatamaAffiliation unknown2
Taripar Matius AlexanderAffiliation unknown1
Florentina Yuni AriniState University of Semarang1
Athoillah AthoillahAffiliation unknown1
Endang SugihartiState University of Semarang1
Kholiq BudimanAffiliation unknown1
zaenal abidinAffiliation unknown1
Alfath YanuartoAffiliation unknown1
Dinar Diaz SeptianAffiliation unknown1
Akhmad MunawarAffiliation unknown1
Andika Enggal RamadhanAffiliation unknown1
Bhekti KumorowatiAffiliation unknown1
Sugianto SugiantoUniversitas Nahdlatul Ulama Blitar1
Cahya WulandariState University of Semarang1
Muhamad Sayuti HassanAffiliation unknown1
Zidney Ilma Fazaada EmhaAffiliation unknown1
Angel Novita SinuratAffiliation unknown1
Tazkiyatun Aeni AmaliyahAffiliation unknown1
Devi Tri WidyantiAffiliation unknown1
Much Azis MuslimAffiliation unknown1
Ahmad WarsunAffiliation unknown1
Pradistia Edo KristiantoAffiliation unknown1
Syehudin SyehudinAffiliation unknown1
Alamsyah AlamsyahInstitut Teknologi Kalimantan1
Hendi SusantoAffiliation unknown1
Annisya Dira PrastiwiAffiliation unknown1
Adham Satria FirmansyahAffiliation unknown1
Luthfi Ilham Agus PratamaAffiliation unknown1
Dian Tri WiyantiState University of Semarang1
Dante AlighiriState University of Semarang1
Priyantini WidiyaningrumAffiliation unknown1
Agus YuliantoAffiliation unknown1

Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.

Metadata source: OAI-PMH (metadata jurnal) https://journal.unnes.ac.id/journals/rji/oai, first harvested 6 Nov 2026, last seen 8 Nov 2026.
Original metadata (oai_dc)
<oai_dc:dc xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/  http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
	<dc:title xml:lang="en">Optimization Of K-Nearest Neighbor Algorithm Using Information Gain And Hyperparameter Tuning In Adult Male Fertility Classification</dc:title>
	<dc:creator xml:lang="en">Muttaqin, Muhammad Zaenal</dc:creator>
	<dc:creator xml:lang="en">Putra, Anggyi Trisnawan</dc:creator>
	<dc:subject xml:lang="en">Information Gain</dc:subject>
	<dc:subject xml:lang="en">Machine Learning</dc:subject>
	<dc:subject xml:lang="en">K-Nearest Neighbor</dc:subject>
	<dc:subject xml:lang="en">GridSearchCV</dc:subject>
	<dc:subject xml:lang="en">feature optimization</dc:subject>
	<dc:description xml:lang="en">Abstract. Male fertility plays an important role in reproductive capability and global population dynamics. Male infertility can be caused by lifestyle, health conditions, and sperm quality. This research develops a male fertility classification model with an optimized K-Nearest Neighbor (KNN) algorithm using Information Gain feature selection and hyperparameter tuning with GridSearchCV. The main problems encountered are low accuracy in prediction and high computational complexity due to many irrelevant features. To overcome this, feature selection and hyperparameter optimization methods were used. The dataset used in this research comes from the UCI Machine Learning Repository, consisting of 100 data with 10 attributes. The KNN algorithm was chosen for its simplicity and ability to classify data with multiple classes and uneven distribution. However, its accuracy is highly dependent on the proper selection of features and parameters. The Information Gain method is used for selection of significant features against the target variable, reducing model complexity and computation time. Hyperparameter tuning is performed using GridSearchCV to find the best combination of parameters. The results showed that the application of Information Gain and GridSearchCV successfully improved the classification accuracy of KNN. The final model achieved 94% accuracy, better than the previous conventional method which only reached 84%. This increase in accuracy shows that KNN optimization with this approach is effective in improving male fertility classification performance. This research is expected to contribute to the development of male fertility diagnostic technology and the implementation of more accurate prediction models in clinical practice.
Purpose: The proposed model is a development based on previous research that focuses on developing the K-Nearest Neighbor algorithm with a model accuracy of 84%. this study uses feature selection techniques and hyperparameter tuning in the K-Nearest Neighbor (KNN) algorithm to improve the accuracy of the male fertility classification model.
Methods/Study design/approach: To improve the curation of the male fertility classification model and to optimize the model from previous research, this study uses the feature selection technique and hyperparameter tuning technique. For this technique, 2 types of optimization are carried out, namely feature selection using Information Gain and GridSearchCV hyperparameter tuning to get the best parameter combination for the proposed model. The fertility dataset has also been used in previous studies, used in this study.  
Result/Findings: The proposed model obtained a high accuracy of 94%, which surpassed the model in the previous study which had an accuracy of 85% for the classification of fertility levels in men. 
Novelty/Originality/Value: The novelty in this research is the addition of hyperparameter tuning techniques to optimize and obtain optimal parameters in the fertility classification model. This research also aims to improve and increase the accuracy of the previous model.</dc:description>
	<dc:publisher xml:lang="en">Universitas Negeri Semarang</dc:publisher>
	<dc:date>2026-03-31</dc:date>
	<dc:type>info:eu-repo/semantics/article</dc:type>
	<dc:type>info:eu-repo/semantics/publishedVersion</dc:type>
	<dc:type xml:lang="en">Peer-reviewed Article</dc:type>
	<dc:format>application/pdf</dc:format>
	<dc:identifier>https://journal.unnes.ac.id/journals/rji/article/view/14868</dc:identifier>
	<dc:identifier>10.15294/rji.v4i1.14868</dc:identifier>
	<dc:source xml:lang="en">Recursive Journal of Informatics; Vol. 4 No. 1 (2026): March 2026; 21-30</dc:source>
	<dc:source>2986-6588</dc:source>
	<dc:source>2963-5551</dc:source>
	<dc:source>10.15294/f2fbmb40</dc:source>
	<dc:language>eng</dc:language>
	<dc:relation>https://journal.unnes.ac.id/journals/rji/article/view/14868/8941</dc:relation>
	<dc:rights xml:lang="en">Copyright (c) 2026 Recursive Journal of Informatics</dc:rights>
</oai_dc:dc>