-
-
Save lethain/34ca7ad6c65c59dbfb0235d49bf55245 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from systems.parse import parse | |
| import pandas as pd | |
| # Define the model specification | |
| spec = """ | |
| # Hiring Pipeline Model | |
| [PotentialCandidates] > Outreaches @ 10 | |
| Outreaches > Interested @ Conversion(0.5) | |
| Interested > Active @ Conversion(0.5) | |
| Active > Offers @ Conversion(0.1) | |
| Offers > Hires @ Conversion(0.7) | |
| """ | |
| # Parse the model and run it for 10 rounds | |
| model = parse(spec) | |
| results = model.run(rounds=10) | |
| # Convert results to a pandas DataFrame for nice display | |
| df = pd.DataFrame(results) | |
| # Display the table (remove the infinite PotentialCandidates column) | |
| if 'PotentialCandidates' in df.columns: | |
| df = df.drop(columns=['PotentialCandidates']) | |
| print("Hiring Pipeline Results:") | |
| print(df) | |
| # Optional: Calculate cumulative hires over time | |
| print("\nCumulative Hires Over Time:") | |
| print(df['Hires'].cumsum()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment