Seksjon 1. Kapittel 2
single
Challenge: Feature Adoption Heatmap
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
You are provided with user feature engagement data in a pandas DataFrame with columns user_id, feature, and usage_count. Your task is to:
- Implement the
compute_core_feature_matrixfunction to create a matrix (as a DataFrame) where each row is a user, each column is a feature, and each cell contains the frequency (sum ofusage_count) of usage for that user-feature pair; - Implement the
plot_core_feature_heatmapfunction that takes the matrix and visualizes it as a heatmap using seaborn; - The heatmap should clearly show which users have adopted which features (breadth), how frequently (frequency), and highlight the intensity of engagement (depth/frequency);
- You do not need to return or display anything from the functions, but the heatmap must be generated when the plotting function is called.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 2
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår