Predicting a few or many friends in schoolchildren: a machine learning approach

Machine learning algorithms were used to determine whether Peruvian 8–12-year-olds (N = 730) believe they have many or few friends based on sociodemographic and psychological variables. Theoretical variables were depression (PHQ-8), subjective well-being (SWB-3), sorrow, bullying, and birthplace. With stratified 10-fold cross-validation, the easyML R package examined six algorithms: Random Forest, XGBoost, Support Vector Machine, Neural Network, Logistic Regression, and Decision Tree. The cross-validation pipeline used SMOTE to correct class imbalance (25.6% few vs. 74.4% many friends). Logistic Regression had the greatest ROC-AUC (0.663 in cross-validation, 0.673 on the test set) and no overfitting (CV-test gap = −0.010). The greatest SHAP predictor was subjective well-being, followed by depression and birthplace. Youden’s J index threshold optimization (optimal = 0.44) increased classification accuracy from 64.6% to 72.8%. Psychology predicts friendship perception in youngsters, with well-being outweighing clinical symptomatology.

Authors

Institutions

Publication Details

Journal
The Journal of General Psychology
Published
2026-06-18
DOI
https://doi.org/10.1080/00221309.2026.2687378
Primary Topic
Bullying, Victimization, and Aggression
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Predicting a few or many friends in schoolchildren: a machine learning approach

José Ventura‐León, Cristopher Lino‐Cruz, Jonathan Ruiz-Castro, Shirley Tocto‐Muñoz et al.
The Journal of General Psychology
Bullying, Victimization, and Aggression
article

Predicting a few or many friends in schoolchildren: a machine learning approach

José Ventura‐León, Cristopher Lino‐Cruz, Jonathan Ruiz-Castro, Shirley Tocto‐Muñoz, Goldie Gamboa‐Melgar
article en

Abstract

Machine learning algorithms were used to determine whether Peruvian 8–12-year-olds (N = 730) believe they have many or few friends based on sociodemographic and psychological variables. Theoretical variables were depression (PHQ-8), subjective well-being (SWB-3), sorrow, bullying, and birthplace. With stratified 10-fold cross-validation, the easyML R package examined six algorithms: Random Forest, XGBoost, Support Vector Machine, Neural Network, Logistic Regression, and Decision Tree. The cross-validation pipeline used SMOTE to correct class imbalance (25.6% few vs. 74.4% many friends). Logistic Regression had the greatest ROC-AUC (0.663 in cross-validation, 0.673 on the test set) and no overfitting (CV-test gap = −0.010). The greatest SHAP predictor was subjective well-being, followed by depression and birthplace. Youden’s J index threshold optimization (optimal = 0.44) increased classification accuracy from 64.6% to 72.8%. Psychology predicts friendship perception in youngsters, with well-being outweighing clinical symptomatology.

The Journal of General Psychology
Peruvian University of Applied Sciences (PE), Universidad Continental (PE), Private University of the North (PE)
Openalex Percentile: Top 4%
Bullying, Victimization, and Aggression
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.