@@ -46,7 +46,7 @@ The graph-based nature of DPG provides significant enhancements in the direction
4646To install DPG locally, first clone the repository:
4747
4848``` bash
49- git clone https://github.com/LeonardoArrighi /DPG.git
49+ git clone https://github.com/Meta-Group /DPG.git
5050cd DPG
5151```
5252
@@ -57,7 +57,7 @@ pip install -e .
5757
5858Alternatively, if using ` pip directly ` :
5959``` bash
60- pip install git+https://github.com/LeonardoArrighi /DPG.git
60+ pip install git+https://github.com/Meta-Group /DPG.git
6161```
6262** Troubleshooting:** If you encounter dependency conflicts, we recommend using a virtual environment:
6363
@@ -132,11 +132,11 @@ dpg_model, nodes_list = dpg.to_networkx(dot)
132132# Extract and visualize
133133dpg_metrics = GraphMetrics.extract_graph_metrics(dpg_model, nodes_list,target_names = np.unique(y_train).astype(str ).tolist())
134134df = NodeMetrics.extract_node_metrics(dpg_model, nodes_list)
135- plot_dpg (" dpg_output.png " , dot, df_nodes , dpg_metrics, save_dir = " datasets" , communities = True , class_flag = True )
135+ plot_dpg_communities (" dpg_output" , dot, df , dpg_metrics, save_dir = " datasets" , class_flag = True , export_pdf = True )
136136```
137137#### Output:
138138<p align =" center " >
139- <img src =" https://github.com/LeonardoArrighi/DPG/blob/main/dpg_image_examples/dpg_output.png_communities .png?raw=true " width =" 600 " />
139+ <img src =" https://github.com/LeonardoArrighi/DPG/blob/main/dpg_image_examples/dpg_output_communities .png?raw=true " width =" 600 " />
140140</p >
141141
142142#### CLI scripts
@@ -157,7 +157,7 @@ The DPG output, through `run_dpg_standard.py` or `run_dpg_custom.py`, produces s
157157- a ` .txt ` file containing the Random Forest statistics (accuracy, confusion matrix, classification report)
158158
159159## Easy usage
160- Usage: ` python run_dpg_standard.py --dataset <dataset_name> --n_learners <integer_number> --pv <threshold_value> --t <integer_number> --model_name <str_model_name> --dir <save_dir_path> --plot --save_plot_dir <save_plot_dir_path> --attribute <attribute> --communities --class_flag `
160+ Usage: ` python run_dpg_standard.py --dataset <dataset_name> --n_learners <integer_number> --pv <threshold_value> --t <integer_number> --model_name <str_model_name> --dir <save_dir_path> --plot --save_plot_dir <save_plot_dir_path> --attribute <attribute> --communities --clusters --threshold_clusters <float> -- class_flag --seed <int> `
161161Where:
162162- ` dataset ` is the name of the standard classification ` sklearn ` dataset to be analyzed;
163163- ` n_learners ` is the number of base learners for the Random Forest;
@@ -169,9 +169,12 @@ Where:
169169- ` save_plot_dir ` is the path of the directory to save the plot image;
170170- ` attribute ` is the specific node metric which can be visualized on the DPG;
171171- ` communities ` is a store_true variable which can be added to visualize communities on the DPG;
172- - ` class_flag ` is a store_true variable which can be added to highlight class nodes.
172+ - ` clusters ` is a store_true variable which can be added to visualize clusters on the DPG;
173+ - ` threshold_clusters ` is the threshold used to detect ambiguous nodes in clusters;
174+ - ` class_flag ` is a store_true variable which can be added to highlight class nodes;
175+ - ` seed ` controls the random split.
173176
174- Disclaimer: ` attribute ` and ` communities ` can not be added together, since DPG supports just one of the two visualizations .
177+ Disclaimer: ` attribute ` , ` communities ` , and ` clusters ` are mutually exclusive: DPG supports just one visualization mode at a time .
175178
176179The usage of ` run_dpg_custom.py ` is similar, but it requires another parameter:
177180- ` target_column ` , which is the name of the column to be used as the target variable;
0 commit comments