-
Notifications
You must be signed in to change notification settings - Fork 0
2. Reducing Dimensionality
During this step, the dimensions of the balls will be reduced to be 2. In other words, the balls will be converted to circles. In this step, the PCA method is used to reduce the dimensions. During the PCA, some of the tree relationships are not maintained e.g. siblings circles might be overlapped or child circle located outside its parent circle An algorithm is being used to fix these broken relationships.
The idea behind the algorithm is to fix the broken relationships between circles while keeping its topological structure. The algorithm uses the information provided by the tree structure and the balls in high dimensions to determine whether two circles need to be modified to recover the original status between them. The algorithm checks two conditions the first one is "Is disjoint" and the second one is "Is contained". The first condition is being checked for all children of one family. The second one is being checked for a parent of one family with its children.
If the first condition is not satisfied which means two circles are overlapping while they should be disjoint, the two circles will be scaled down (only radius) by a factor which makes the two circles disjoint. If one of the circles has children, all children will also be scaled down and shifted. By doing so all the topological relationships between the children of the circles will be kept.
If the second condition is not satisfied which means a child circle is located or overlapping with its parent, the parent circle will be scaled up (only radius) by a factor which makes the child circle located inside its parent. Also in case, the parent circles contain other child circles, all of them will be scaled by the same factor and shifted.
The input of this step is the following:
- Nballs: The file contains the balls which generated by step 1 or your own balls file.
- Children: A file contains the child-parent relationships between the balls.
- Circles Before: A file contains the circles after applying PCA on balls and without fixing the broken relationships.
- Circles After: A file contains the circles after applying PCA and fixing the broken relationships.
- Both files can be found in the data folder of the project.
python main_vis.py --reduceAndFix --balls BALLS_FILE_PATH --children CHILDREN_FILE_PATH --output OUTPUT_FILE_PATH
- --balls: A file contains the balls which generated by step 1 or your own balls file.
- --children: A file contains the child-parent relationships between the balls.
- --output: The output file which contains the circles. The path will be used to generate two files one contains the circles before applying the algorithm and one after applying the algorithm.
After applying the executing this step, the result of three check operations will be shown. Each operation checks whether the tree structure is maintained by checking two conditions, namely disjoint and contains conditions. The first operation is performed on the input balls. The second one is performed on the circles before running the fixing of the algorithm. The third one is performed on the circles after running the algorithm.