获取在 R 中不同时间点从各自集群中“掉”出来的 ID 的百分比

问题描述

我正在对用户生成的数据集进行聚类,我希望回答的问题之一是,随着时间的推移,用户退出各自集群的比例是多少。举个例子,假设我对一个网站的用户数据进行了聚类,我想查看退出该网站的用户数量,即在不同时间点后不再出现在数据中的用户数量。我也想知道哪些集群在不同时间点失去的用户最多。

我尝试过生存分析,效果很好,但我也想将退出用户 ID 列表保存到另一个对象或数据框中,并具有相应的退出时间点。

这是一个模拟数据框以及聚类代码。我想用作参考的时间点在数据中称为 MonthYear:-

Initializing the backend...
Acquiring state lock. This may take a few moments...
Do you want to copy existing state to the new backend?
  Pre-existing state was found while migrating the prevIoUs "local" backend to the
  newly configured "s3" backend. No existing state was found in the newly
  configured "s3" backend. Do you want to copy this state to the new "s3"
  backend? Enter "yes" to copy and "no" to start with an empty state.

  Enter a value: yes

Releasing state lock. This may take a few moments...

Successfully configured the backend "s3"! terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- Reusing prevIoUs version of hashicorp/aws from the dependency lock file

terraform has been successfully initialized!

是否有一种有效的方法可以获取数据中每个时间点(在本例中为 MonthYear 变量)退出集群的用户 ID 的百分比。另外,在特定时间点不会再次出现的用户 ID,是否可以将这些 ID 保存到另一个对象以便在其他时间进行检查?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...