Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Why cluster on predictions_df and not candidate_cases? #7

Description

@hsm207

Just wanted to check that the clustering logic here is correct:

    predictions_df <- rxPredict(model, candidate_cases, extraVarsToWrite=c("rev_id", "flagged"))
    predictions_df$entropy <- entropy(predictions_df$Probability)

    predictions_df$cluster_id <- predictions_df %>%
      dist(method="euclidean") %>%
      hclust(method="ward.D2") %>%
      cutree(k=N)

    selected <- predictions_df %>%
      group_by(cluster_id) %>%
      arrange(-entropy) %>%
      slice(which.max(entropy)) %>%
      as.data.frame

I was under the impression that the clusters should be based only the comment's features ie. v2...v51 in candidates_df.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions