-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements for role mining functionality
1. Adding a data generator for testing role-mining algorithms 2. Data loading speed optimization and GUI modification 3. Fix known issues
- Loading branch information
1 parent
9bc01bd
commit 52ec010
Showing
27 changed files
with
1,932 additions
and
882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
gui/admin-gui/src/frontend/scss/role-mining-static-header-name.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*! | ||
* Copyright (C) 2010-2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
|
||
.role-mining-static-header-name { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
transform: rotate(180deg); | ||
writing-mode: revert; | ||
width: 40px; | ||
height: 150px; | ||
border: 1px solid #f4f4f4; | ||
} | ||
|
||
|
14 changes: 14 additions & 0 deletions
14
gui/admin-gui/src/frontend/scss/role-mining-static-header.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*! | ||
* Copyright (C) 2010-2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
|
||
.role-mining-static-header { | ||
width: 40px; | ||
height: 150px; | ||
} | ||
|
||
|
14 changes: 14 additions & 0 deletions
14
gui/admin-gui/src/frontend/scss/role-mining-static-row-header.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*! | ||
* Copyright (C) 2010-2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
|
||
.role-mining-static-row-header { | ||
width: 150px; | ||
height: 150px; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ui/src/main/java/com/evolveum/midpoint/gui/api/component/mining/ProbabilityGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (C) 2010-2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.api.component.mining; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class ProbabilityGenerator { | ||
|
||
private final Map<Integer, Double> probability; | ||
private double probabilitySum; | ||
|
||
public ProbabilityGenerator() { | ||
probability = new HashMap<>(); | ||
} | ||
|
||
public void addGroupProbability(int value, double probability) { | ||
if (this.probability.get(value) != null) { | ||
this.probabilitySum -= this.probability.get(value); | ||
} | ||
this.probability.put(value, probability); | ||
probabilitySum = probabilitySum + probability; | ||
} | ||
|
||
public int getRandomNumber() { | ||
double random = Math.random(); | ||
double ratio = 1.0f / probabilitySum; | ||
double tempProbability = 0; | ||
for (Integer i : probability.keySet()) { | ||
tempProbability += probability.get(i); | ||
if (random / ratio <= tempProbability) { | ||
return i; | ||
} | ||
} | ||
return 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.