Optimizing Grouping of People for Teamwork

  • Context: Graduate 
  • Thread starter Thread starter Frank Einstein
  • Start date Start date
  • Tags Tags
    Clusters Optimization
Click For Summary
SUMMARY

The discussion centers on optimizing group formations for teamwork based on a compatibility matrix of 56x56 dimensions. The matrix is represented in Python using a DataFrame from the pandas library, where each entry indicates the compatibility score between individuals. The user seeks to form groups of 8-10 people to maximize total compatibility but faces challenges with existing genetic algorithm implementations that fail to yield feasible solutions. Suggestions include modifying existing code from Stack Overflow to accommodate larger group sizes and exploring alternative methods for grouping.

PREREQUISITES
  • Understanding of compatibility matrices and their applications in team dynamics.
  • Proficiency in Python programming, specifically with pandas for data manipulation.
  • Familiarity with genetic algorithms and their components such as chromosomes, crossover, and mutation.
  • Knowledge of optimization techniques for group formation and teamwork efficiency.
NEXT STEPS
  • Explore advanced genetic algorithm techniques for group optimization in Python.
  • Learn about clustering algorithms such as K-means or hierarchical clustering for team formation.
  • Investigate the use of linear programming for maximizing compatibility scores in group assignments.
  • Review existing solutions on Stack Overflow and adapt them for larger group sizes, specifically targeting groups of 8-10.
USEFUL FOR

This discussion is beneficial for data scientists, team managers, and software developers focused on optimizing team dynamics and enhancing collaboration through effective group formations.

Frank Einstein
Messages
166
Reaction score
1
TL;DR
I wan to group some people based on a compatibility score. Each group has a maximum size. I must maximize the compatibility within each group
I have a matrix of dimension 56*56, each row and column represent the compatibility of one person with the rest of the people.

A sample matrix could be

[CODE title="Compatibility sample"]
Alejandro Ana Beatriz Jose Juan Luz Maria Ruben
Alejandro 0.0 0.0 1000.0 0.0 1037.0 1014.0 100.0 0.0
Ana 0.0 0.0 15.0 0.0 100.0 0.0 16.0 1100.0
Beatriz 1000.0 15.0 0.0 100.0 1000.0 1100.0 15.0 0.0
Jose 0.0 0.0 100.0 0.0 0.0 100.0 1000.0 14.0
Juan 1037.0 100.0 1000.0 0.0 0.0 1014.0 0.0 100.0
Luz 1014.0 0.0 1100.0 100.0 1014.0 0.0 0.0 0.0
Maria 100.0 16.0 15.0 1000.0 0.0 0.0 0.0 0.0
Ruben 0.0 1100.0 0.0 14.0 100.0 0.0 0.0 0.0[/CODE]

Represented in python as

[CODE lang="python" title="Data as dataframe"]data = {
'Alejandro': [0.0, 0.0, 1000.0, 0.0, 1037.0, 1014.0, 100.0, 0.0],
'Ana': [0.0, 0.0, 15.0, 0.0, 100.0, 0.0, 16.0, 1100.0],
'Beatriz': [1000.0, 15.0, 0.0, 100.0, 1000.0, 1100.0, 15.0, 0.0],
'Jose': [0.0, 0.0, 100.0, 0.0, 0.0, 100.0, 1000.0, 14.0],
'Juan': [1037.0, 100.0, 1000.0, 0.0, 0.0, 1014.0, 0.0, 100.0],
'Luz': [1014.0, 0.0, 1100.0, 100.0, 1014.0, 0.0, 0.0, 0.0],
'Maria': [100.0, 16.0, 15.0, 1000.0, 0.0, 0.0, 0.0, 0.0],
'Ruben': [0.0, 1100.0, 0.0, 14.0, 100.0, 0.0, 0.0, 0.0]
}
df = pd.DataFrame(
data,
index=['Alejandro', 'Ana', 'Beatriz', 'Jose', 'Juan', 'Luz', 'Maria', 'Ruben']
)[/CODE]

I want to group the people in groups of two or three people and I want to maximize the total compatibility within each group since I want them to do some teamwork.

One solution could be [Alejandro-Juan], [Ana-Ruben], [Beatriz-Luz] and [Maria-Jose]. The punctuation would be the sum of the element of the matrix corresponding to each pair. If I had chosen [Alejandro-Juan-Ana], [Ruben-Beatriz-Luz], [Maria-Jose], I would sum the scores of Alejandro-Juan, Alejandro-Ana, Juan-Ana and so on.

I have already asked this question in Stack Overflow, but the code doesn't find clusters for the real data. In reality, I must group people in groups of 8-10 people.

I have tough on using a genetic algorithm, where chromosomes are the groups of people, as an example,

AlejandroJuanAnaRubenBeatrizLuzMariaJose
11122233
12312312

However, I am clueless about how to do the crossing and the mutation.

Can someone please help me obtain a solution to this problem?
Any answer is appreciated.

Best regards and thanks for reading.
 
Physics news on Phys.org
The edited stack overflow solution is supposed to nature groups of 2-3, all you need to do is edit those numbers to be 8 and 10? If the code as written doesn't work I feel like you should keep up the discussion there rather than have more Internet strangers do the same work again.
 
Office_Shredder said:
The edited stack overflow solution is supposed to nature groups of 2-3, all you need to do is edit those numbers to be 8 and 10? If the code as written doesn't work I feel like you should keep up the discussion there rather than have more Internet strangers do the same work again.
The code doesn't seem to work since it never returns a feasible solution, it doesn't matter hoy much extra iterations I add. That is why I came here to ask if someone could propose an alternative method.

Shoul I delete the post?