Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vberezhnev committed Oct 30, 2024
1 parent f7ebf6f commit a935134
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ pub fn read_mutual_scores(

for (node, score) in ranks {
let info = self.node_info_from_id(node).clone();
if score > 0.0 {
if score > 0.0 && info.kind == NodeKind::User {
let reversed_score = self.fetch_score_reversed(context, ego_id, node);
v.push((ego.to_string(), info.name.clone(), reversed_score));
points.push((node, reversed_score));
Expand All @@ -1516,7 +1516,7 @@ pub fn read_mutual_scores(
let normalized_points = Self::normalize_data(&points);

// Perform k-means clustering on normalized points
let cluster_count = 3; // Define the number of clusters here
let cluster_count = 3;
let max_iterations = 100;
let tolerance = 0.01;
let clusters = Self::kmeans(&normalized_points, cluster_count, max_iterations, tolerance);
Expand Down

0 comments on commit a935134

Please sign in to comment.