Scénario de test & Cas d'usage
Création d'un graphe d'achats croisés : Produits (Noeuds) et fréquences d'achat simultané (Liens). Deux clusters distincts sont simulés : 'Petit-Dejeuner' (Café, Lait, Sucre) et 'Apéro' (Chips, Soda, Olives).
| 1 | DATA mycas.market_basket; INPUT product1 $ product2 $ frequency; DATALINES; Cafe Lait 50 |
| 2 | Cafe Sucre 40 |
| 3 | Lait Sucre 45 |
| 4 | Chips Soda 80 |
| 5 | Chips Olives 30 |
| 6 | Soda Olives 25 |
| 7 | Cafe Chips 2 |
| 8 | ; RUN; |
| 1 | |
| 2 | PROC CAS; |
| 3 | network.community / links={name='market_basket'} nodesVar={vars=('product1', 'product2')} outNodes={name='ProductSegments', replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.fetch / TABLE='ProductSegments' sortBy='community'; |
| 4 | |
| 5 | RUN; |
| 6 |
L'action doit générer la table `ProductSegments`. On attend 2 communautés distinctes : une regroupant {Cafe, Lait, Sucre} et une autre {Chips, Soda, Olives}. Le lien faible (Cafe-Chips) ne doit pas fusionner les deux groupes.