Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faezeh-gholamrezaie/familyseatingarrangementbigram
A seating arrangement tool using bigram analysis to optimize family group seating considering conflicts between individuals.
https://github.com/faezeh-gholamrezaie/familyseatingarrangementbigram
bigram generator neural-network seating-arrangements
Last synced: 11 days ago
JSON representation
A seating arrangement tool using bigram analysis to optimize family group seating considering conflicts between individuals.
- Host: GitHub
- URL: https://github.com/faezeh-gholamrezaie/familyseatingarrangementbigram
- Owner: faezeh-gholamrezaie
- Created: 2024-06-27T13:44:47.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T10:21:38.000Z (4 months ago)
- Last Synced: 2024-07-16T13:02:26.028Z (4 months ago)
- Topics: bigram, generator, neural-network, seating-arrangements
- Language: Jupyter Notebook
- Homepage:
- Size: 309 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Family Seating Arrangement Bigram
This repository contains a Python code implementation for generating optimal seating arrangements for 400 individuals based on specified constraints.
## Overview
In this project, we start by generating 400 random names for individuals. These names include both first names and surnames. Next, we organize these individuals into 80 groups of 5, ensuring each group is contiguous.To simulate seating arrangements, we create differences between individuals, ensuring that individuals within the same group have zero differences. We construct a difference matrix where individuals with differences are marked with a value of 1.
For the main task, we compute differences between the 80 groups. A group can have up to 4 differences with its neighboring groups. The probability of these differences is computed using torch.multinomial, considering initial random weights (W) and defining a loss function (LOSS). The primary goal is to arrange groups such that differences between them are minimized first, followed by minimizing differences between individuals within each group.
### Implementation Details
- Data Generation: Random generation of 400 names.
- Group Formation: Creation of 80 contiguous groups of 5 individuals each.
- Difference Calculation: Construction of a difference matrix to track differences between individuals.
- Optimization: Use of torch.multinomial to optimize the seating arrangement, prioritizing minimal inter-group and intra-group differences.
#### Output
The output of this model is a list of 400 names arranged in optimal contiguous seating groups, minimizing differences between both groups and individuals within groups.# Resource :
https://github.com/karpathy/nn-zero-to-hero/blob/master/lectures/makemore/makemore_part1_bigrams.ipynb