-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.py
More file actions
98 lines (66 loc) · 2.57 KB
/
Copy path2.py
File metadata and controls
98 lines (66 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*- coding: utf-8 -*-
"""Job 23 Career matching algorithm.ipynb
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1L1DhFFWrzWaQYEKFrAcvauarOGOw2EcU
CAREER MATCHING ALGORITHM
The goal is to develop a career matching algorithm.
Instead of just classification, we'll build a matching system based on;
* Skill similarity
* Skill importance
* Required level
* Threshold
Load and prepare data
"""
import pandas as pd
df = pd.read_excel("New jobready_career_skill_dataset_1000_rows_v2.xlsx")
# Remove duplicates
df = df.drop_duplicates()
df
"""Build career - Skills mapping"""
career_skills = df.groupby('Career').apply(
lambda x: list(zip(
x['Skill/Sub-skill'],
x['Weight'],
x['Threshold (0-100)'],
x['Level Required']
))
).to_dict()
"""Define User Input"""
user_profile = {
"skills": ["Python", "SQL", "Machine Learning", "Data Analysis"],
"level": "Intermediate"
}
"""Matching Function"""
def match_career(user_profile, career_skills):
scores = {}
user_skills = set(user_profile["skills"])
user_level = user_profile["level"]
level_map = {
"Beginner": 1,
"Intermediate": 2,
"Advanced": 3
}
for career, skills in career_skills.items():
score = 0
for skill, weight, threshold, level in skills:
# Skill match
if skill in user_skills:
score += weight * 100 # boost score
# Level match
if level_map[user_level] >= level_map[level]:
score += 5
# Threshold influence
score += (threshold / 100)
scores[career] = score
return sorted(scores.items(), key=lambda x: x[1], reverse=True)
"""Get Career Recommendations"""
results = match_career(user_profile, career_skills)
# Top 5 careers
top_careers = results[:5]
for career, score in top_careers:
print(f"{career}: {round(score,2)}")
"""Interpretation
The algorithm recommends careers where the user’s skills best align with required skills, levels, and importance weights.
A career matching algorithm was developed to recommend suitable career paths based on user skills. The algorithm compares user input with career skill requirements using weighted scoring based on skill match, difficulty level, and threshold values. Careers are ranked according to similarity scores, and the system can also identify skill gaps and recommend learning resources. This approach provides a more practical and personalized solution compared to simple classification models.
"""