You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param invertSources boolean indicating whether the document-level source values should be included (= {@code true}) rather than excluded.
624
624
* @param invertSections boolean indicating whether the document-level section values should be included (= {@code true}) rather than excluded.
625
625
* @param invertTypes boolean indicating whether the document-level type values should be included (= {@code true}) rather than excluded.
626
-
* @param algorithm The algorithm to maximise polarisation at each time step. Can be "greedy" (for a greedy algorithm) or "genetic" (for a genetic algorithm).
627
-
* @param normaliseScores boolean indicating whether the polarisation scores should be normalised by dividing them by their theoretical maximum within a given network. This takes away the effect of more activity (possibly due to participation by more actors or more statements per actor) contributing to polarisation scores and focuses solely on structure given the edge mass in the network. Without normalisation, time periods with more actors and activity will elevate the polarisation of the network (at constant levels of being divided over concepts).
628
-
* @param numClusters The number of clusters or factions k, for example 2 for bi-polarisation.
626
+
* @param algorithm The algorithm to maximise polarization at each time step. Can be "greedy" (for a greedy algorithm) or "genetic" (for a genetic algorithm).
627
+
* @param normaliseScores boolean indicating whether the polarization scores should be normalised by dividing them by their theoretical maximum within a given network. This takes away the effect of more activity (possibly due to participation by more actors or more statements per actor) contributing to polarization scores and focuses solely on structure given the edge mass in the network. Without normalisation, time periods with more actors and activity will elevate the polarization of the network (at constant levels of being divided over concepts).
628
+
* @param numClusters The number of clusters or factions k, for example 2 for bi-polarization.
629
629
* @param numParents Only for the genetic algorithm: The number of cluster solutions (i.e., parents) to generate in each iteration, for example 30 or 50.
630
630
* @param numterations Only for the genetic algorithm: For how many generations should the genetic algorithm run at most? This is the maximal number of generations through which optimisation should be attempted. Will be lower if early convergence is detected. A suggested starting value is 1000.
631
631
* @param elitePercentage Only for the genetic algorithm: The share of cluster solutions in each parent generation that is copied into the children generation without changes, between 0.0 and 1.0, usually around 0.1.
632
632
* @param mutationPercentage Only for the genetic algorithm: The probability with which each bit in any cluster solution is selected for mutation after the cross-over step. For example 0.1 to select 10% of the nodes to swap their memberships.
633
633
* @param randomSeed Only for the genetic algorithm: The random seed to use for the random number generator. Pass 0 for random behaviour.
634
-
* @return A PolarisationResultTimeSeries object containing the results of the algorithm for each time step and iteration.
634
+
* @return A PolarizationResultTimeSeries object containing the results of the algorithm for each time step and iteration.
this.isolates = true; // include isolates in the iterations but not in the full matrix; will be adjusted to smaller full matrix dimensions without isolates manually each time in the iterations; necessary because some actors may be deleted in the backbone matrix otherwise after deleting their concepts
3387
3387
3388
-
// compute normalised eigenvalues for the full matrix; no need to recompute every time as they do not change
3388
+
// compute normalized eigenvalues for the full matrix; no need to recompute every time as they do not change
candidateMatrix = this.reduceCandidateMatrix(candidateMatrix, fullMatrix.getRowNames()); // ensure it has the right dimensions by purging isolates relative to the full matrix
3424
3424
candidateMatrices.add(candidateMatrix);
3425
-
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalised eigenvalues for the candidate matrix
3425
+
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalized eigenvalues for the candidate matrix
if (penalty) { // simulated annealing with penalty: initially one randomly chosen entity in the backbone set
@@ -3558,7 +3558,7 @@ public void initializeSimulatedAnnealingBackbone(boolean penalty, double p, int
3558
3558
finalMatrix = this.reduceCandidateMatrix(finalMatrix, fullMatrix.getRowNames()); // ensure it has the right dimensions by purging isolates relative to the full matrix
3559
3559
3560
3560
// eigenvalues for final matrix
3561
-
eigenvaluesFinal = computeNormalizedEigenvalues(finalMatrix.getMatrix(), "ojalgo"); // normalised eigenvalues for the candidate matrix
3561
+
eigenvaluesFinal = computeNormalizedEigenvalues(finalMatrix.getMatrix(), "ojalgo"); // normalized eigenvalues for the candidate matrix
3562
3562
3563
3563
// create an initial current backbone set B_0, also with the one c_j concept like in B: B_0 <- {c_j}
candidateMatrix = this.computeOneModeMatrix(candidateStatementList, this.qualifierAggregation, this.startDateTime, this.stopDateTime); // create candidate matrix after filtering the statements based on the action that was executed
3673
3673
candidateMatrix = this.reduceCandidateMatrix(candidateMatrix, fullMatrix.getRowNames()); // ensure it has the right dimensions by purging isolates relative to the full matrix
3674
-
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalised eigenvalues for the candidate matrix
3674
+
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalized eigenvalues for the candidate matrix
3675
3675
if (penalty) {
3676
3676
newLoss = penalizedLoss(eigenvaluesFull, eigenvaluesCandidate, p, candidateBackboneList.size(), fullConcepts.length); // spectral distance between full and candidate matrix
3677
3677
} else {
@@ -3749,7 +3749,7 @@ public double[] evaluateBackboneSolution(String[] backboneEntities, int p) {
candidateMatrix = this.computeOneModeMatrix(candidateStatementList, this.qualifierAggregation, this.startDateTime, this.stopDateTime); // create candidate matrix after filtering the statements based on the action that was executed
3773
3773
candidateMatrix = this.reduceCandidateMatrix(candidateMatrix, fullMatrix.getRowNames()); // ensure it has the right dimensions by purging isolates relative to the full matrix
3774
-
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalised eigenvalues for the candidate matrix
3774
+
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalized eigenvalues for the candidate matrix
3775
3775
results[0] = penalizedLoss(eigenvaluesFull, eigenvaluesCandidate, p, backboneSet.size(), fullConcepts.length); // spectral distance between full and candidate matrix
3776
3776
3777
3777
// spectral distance between full and redundant set
@@ -3781,7 +3781,7 @@ public double[] evaluateBackboneSolution(String[] backboneEntities, int p) {
candidateMatrix = this.computeOneModeMatrix(candidateStatementList, this.qualifierAggregation, this.startDateTime, this.stopDateTime); // create candidate matrix after filtering the statements based on the action that was executed
3783
3783
candidateMatrix = this.reduceCandidateMatrix(candidateMatrix, fullMatrix.getRowNames()); // ensure it has the right dimensions by purging isolates relative to the full matrix
3784
-
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalised eigenvalues for the candidate matrix
3784
+
eigenvaluesCandidate = computeNormalizedEigenvalues(candidateMatrix.getMatrix(), "ojalgo"); // normalized eigenvalues for the candidate matrix
3785
3785
results[1] = penalizedLoss(eigenvaluesFull, eigenvaluesCandidate, p, redundantSet.size(), fullConcepts.length); // spectral distance between full and candidate matrix
0 commit comments