forked from microsoft/graphrag
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathClusterGraphConfig.cs
More file actions
38 lines (33 loc) · 1.4 KB
/
ClusterGraphConfig.cs
File metadata and controls
38 lines (33 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
namespace GraphRag.Config;
/// <summary>
/// Configuration settings for graph community clustering.
/// </summary>
public sealed class ClusterGraphConfig
{
/// <summary>
/// Gets or sets the maximum number of entities allowed in a single community cluster.
/// A value less than or equal to zero disables the limit.
/// </summary>
public int MaxClusterSize { get; set; } = 10;
/// <summary>
/// Gets or sets a value indicating whether the largest connected component
/// should be used when clustering.
/// </summary>
public bool UseLargestConnectedComponent { get; set; } = true;
/// <summary>
/// Gets or sets the seed used when ordering traversal operations to keep
/// results deterministic across runs.
/// </summary>
public int Seed { get; set; } = unchecked((int)0xDEADBEEF);
/// <summary>
/// Gets or sets the maximum number of label propagation iterations when the
/// <see cref="CommunityDetectionAlgorithm.FastLabelPropagation"/> algorithm is used.
/// </summary>
public int MaxIterations { get; set; } = 20;
/// <summary>
/// Gets or sets the community detection algorithm. The fast label propagation
/// implementation mirrors the in-process routine provided by GraphRag.Net.
/// </summary>
public CommunityDetectionAlgorithm Algorithm { get; set; }
= CommunityDetectionAlgorithm.FastLabelPropagation;
}