The experiments in this study were conducted using the Anaconda platform with the Python programming language. Key libraries included Pandas for data management and manipulation, NumPy for numerical operations and array handling, and Scikit-learn for implementing Machine Learning models and performing dataset preprocessing. Additionally, Matplotlib and Seaborn were utilized for data visualization and graphical representation. The computations were performed on a personal computer equipped with an Intel Core i5 processor running at 3.30 GHz and 6 GB of RAM.
5.1. Data Collection and Preparation
The dataset used in this study was collected through web-scraping techniques from Moroccan recruitment websites with job postings. This method served as a secondary data collection approach, allowing the extraction of publicly available job-related information without direct interaction with the data sources.
A total of 2100 job postings were compiled and processed to ensure data relevance and consistency. These were scraped in January 2025 and cover job offers posted over the previous three months in three leading Moroccan recruitment platforms, using only publicly accessible job offers.
To illustrate the dataset’s structure, a sample excerpt is provided in
Table 3 and
Table 4 within the data preprocessing subsection. This sample presents key attributes such as job title, company ID, city, required experience, selected technical skills, and contract type. Post-scraping, we performed data cleaning to remove duplicate entries, incomplete records, and non-technical job advertisements to retain only relevant job offers for analysis.
Furthermore, descriptive statistics and categorical distributions were generated based on the collected dataset to offer a comprehensive understanding of the Moroccan job market landscape. In the Job Postings dataset (
Table 3), the term ingenieur refers to an engineer, CDI is a permanent contract, and stage refers to an internship.
In this study, we followed a straightforward and structured process, as illustrated in
Figure 8.
Data Collection via Web Scraping: A custom real-time web-scraping algorithm was developed to extract data from selected Moroccan job offer platforms. The collected data include the job title, a descriptive summary of the role, and the sector of activity, such as automotive, electronics, law, computer science or agriculture. It also captures the function of the role within the organization (e.g., finance, marketing, engineering), as well as the city where the job is located. Additionally, the required educational level is specified, often ranging from technical diplomas to advanced university degrees. In terms of experience, the dataset provides both qualitative and quantitative details. The experience category indicates whether the employer is seeking a junior, mid-level, or senior profile, while the columns exp_min, exp_max, and exp_moyenne give numeric values for the expected years of experience. These features allow for fine-grained analysis of how education and experience levels interact with employability. Altogether, this foundational information sets the stage for combining contextual, educational, and professional indicators in predictive modeling. In addition to contextual and background details, the dataset captures a diverse set of skills and job requirements. Binary indicators were used to represent technical skills requirements (e.g., Python, SQL, Machine Learning, Deep Learning, Power BI, Excel, Tableau, Cloud Computing) allowing precise identification of technological demands. It also covers soft skills like communication, leadership, time management, adaptability, and teamwork, which are increasingly valued by employers. Language proficiency is tracked through variables like French and English, reflecting the linguistic expectations for each position. Additional fields indicate working conditions, such as the availability of remote work and the type of contract offered (e.g., permanent, temporary or just an internship). The classification variable is the contract offered (distinguishing between offers leading to full employment and those limited to internships). The objective was to predict the employment outcome (full-time job versus internship) based on the candidate’s profile. To collect real-time job offer data, we developed a custom web-scraping script that targeted three major Moroccan job portals: ReKrute, AmalJob, and Emploi.ma, extracting only publicly available job postings. No personal or sensitive user data were accessed or stored. This data collection complied with the national law on data protection (Loi 09-08), ensuring that ethical standards regarding transparency, anonymity, and data privacy were fully respected.
Handling Missing Values: Missing values in the city and number of posts columns were replaced with the most frequent value, and missing values in the experience column were replaced by the mean.
Categorical Data Processing: Categorical variables (degree, city, post title, target) were processed using LabelEncoder and OneHotEncoder.
Feature Selection: The most relevant features were identified by evaluating their statistical association with the target label.
Feature Scaling: Applied to normalize features with varying value ranges.
Data Splitting: The dataset was split into training and testing sets for model evaluation.
5.2. AHP-TOPSIS
As explained, this research employs a combined MCDM strategy, integrating AHP for prioritizing factors and TOPSIS for ranking alternatives based on similarity to an optimal solution. AHP is employed to weight two key criteria (the total number of skill occurrences, and their frequency in employable offers) while TOPSIS is used to classify and rank the skills, thereby identifying emerging job market trends, as illustrated in
Figure 9: Integrated AHP-TOPSIS Methodology for Job Market Trends Analysis and Ranking. Consensus was reached using a two-round Delphi survey where experts rated criteria independently, and final weights were computed only after convergence of opinions (CR < 0.1). The integrated AHP-TOPSIS methodology begins with a ranking, proposing a systematic structure for the model (
Figure 10), in which the AHP is used to assign weights to the selected criteria: C1 (total occurrences of a skill) and C2 (occurrences in employable job offers). Subsequently, a pairwise comparison matrix (
Table 5) was constructed based on expert judgments. A questionnaire was distributed to eight experts (four academic researchers and four practitioners), who rated the relative importance of each criterion using the preference scale shown in
Table 6.
Pairwise Comparison Matrix: The pairwise comparison matrix constructed for criteria
and
is presented in
Table 5.
Comparison Scale: To establish pairwise comparisons among the evaluation criteria, the study has adopted a fundamental scale of preference that quantifies the relative importance between two factors. As presented in
Table 6, this scale has ranged from 1 (equal preference) to 9 (extreme preference), with reciprocal values assigned to represent the inverse comparison. This structured scale has provided a systematic basis for constructing the comparison matrix in the AHP process.
The aggregated pairwise comparison matrix resulted in final weights of 25% for C1 and 75% for C2, with a consistency ratio (CR) of 0, indicating high consistency in expert evaluations. After weighting the criteria based on AHP, we used those weights in TOPSIS in order to classify skills by domain and identify the trends of each domain using an example of an application based on computer science skills. The next phase involved the application of TOPSIS, which began with the normalization of the decision matrix (as described in the following equation), followed by multiplication of each normalized value by its corresponding AHP-derived weight.
In this step, the framework establishes the positive ideal solution and the negative ideal solution for each criterion. In our situation, we seek to maximize both occurrences in all offers and occurrences in employable offers. With this in mind, the framework selects the maximum value for each criterion, as illustrated in
Table 7.
Based on the Euclidean distance in the third step, the separation from the ideal (
) and anti-ideal (
) solutions was calculated for each alternative (
6) and (
7).
The AHP weighted results of skill occurrences in both job offers and employable offers are shown in
Table 8.
The normalized values of skill occurrences in job offers and employable offers are presented in
Table 9.
Finally, we evaluate the skills according to their relative proximity to the ideal solution (Equation (
8)
). The separation measures and the relative closeness to the ideal solution for each skill are summarized in
Table 10.
Using this hybrid framework, AHP-TOPSIS (
Figure 11) allows us to achieve two important goals:
Identify the Moroccan job market trends of each domain.
Enhance the dataset by introducing a new variable Global_SkillScore, which represents the aggregated value obtained by combining the weighted criteria with the skills present in each offer. This new feature makes the dataset particularly useful for developing employability prediction models, as it incorporates the impact of market trends into the prediction process. While preliminary trends from the GlobalSkillScore correlate with high-frequency skill demands, future work will include statistical validation against employer surveys and established skill indices.
Figure 11.
Hybrid analysis framework.
Figure 11.
Hybrid analysis framework.
The final skill rankings obtained from the AHP-TOPSIS model closely align with the observed demands of the Moroccan labor market. Skills such as Python, JavaScript, and SQL not only scored highest in our MCDM framework but were also frequently associated with full-time job postings. This convergence between expert opinion and job board data reinforces the practical value of our approach for guiding employability-focused curriculum reforms and training programs.
5.3. Machine Learning Algorithms
This experiment aims to predict graduate employability based on the enhanced dataset incorporating AHP-TOPSIS outputs. In order to achieve this classification goal, we applied 10 Machine Learning models of classification: BernoulliNB [
43,
44], GradientBoostingClassifier GBC [
45], GaussianNB, Support Vector Classification SVC [
46], KNN classifier [
47], Linear Discriminant Analysis LDA [
48], RandomForestClassifier [
49], Extra Trees Classifier [
50], XGBClassifier [
51], and Decision Tree Classifier [
52].
The performance of the ten Machine Learning models is further evaluated using the following metrics:
Accuracy measures the proportion of correct predictions out of all predictions made.
Recall evaluates how well the model identifies actual positives among all relevant instances.
F1-score balances precision and recall through their harmonic mean.
The ROC-AUC curve is also used to assess each model’s ability to distinguish between the two classes.
The dataset contained a moderately imbalanced distribution of classes (approximately 60% full-time jobs and 40% internships). To account for this, we reported class-sensitive metrics, such as F1-score and recall, in addition to accuracy. The dataset was stratified during splitting, and models were evaluated for their ability to handle this imbalance. The consistently high performance of the KNN classifier across all three metrics indicates robust classification despite this imbalance. This experiment aims to identify the most suitable Machine Learning model for the proposed case study. As presented in
Table 9, the KNN classifier outperformed all other models, achieving an accuracy of 99.71%, a recall of 99.81%, and an F1-score of 98.76%. Figure (
Table 9) further highlights the model’s strong ability to accurately distinguish between employability and internship outcomes. These results demonstrate that the KNN classifier is well suited for employability prediction in the context of this study.
KNN Model Confusion Matrix.
Figure 12 presents the confusion matrix for a representative fold of the KNN classifier, selected from the cross-validation process as it closely reflects the overall performance metrics reported in
Table 11 (accuracy: 99.71%, recall: 99.81%, F1-score: 98.76%). The classification task involves distinguishing between full-time job offers (positive class) and internships (negative class).
As shown, the classifier correctly identified 251 out of 252 actual full-time job offers, with only one case misclassified as an internship (False Negative). Likewise, all 168 internship offers were correctly classified, yielding zero false positives. The dark diagonal cells represent correct predictions, while the very light off-diagonal cells indicate minimal misclassification.
This result reflects excellent sensitivity and perfect specificity. The absence of false positives confirms the model’s reliability in distinguishing internships from jobs, while the single false negative demonstrates its near-perfect capability in detecting full-time positions. These findings align closely with the performance metrics reported in
Figure 12, providing visual confirmation of the KNN model’s robustness in handling a moderately imbalanced dataset (approximately 60% jobs vs. 40% internships).