隔离森林和隔离树孤立森林因其在不同基准测试中的普遍有效性和强大的可扩展性而成为近年来最受欢迎的异常检测器之一。它具有计算效率,并且已被证明在异常检测中非常有效。

孤立森林与其他森林的比较( src )
该算法通过随机选择一个特征,然后在所选特征的最大值和最小值之间随机选择一个分割值来隔离观察值。因此,该实现与分区树和引导树相同,不同之处在于目标函数应该是均匀的(尝试用恒定的 Y 值分割变量)。
然而,如果你在 JMP 中尝试这个,它不起作用。
通过在 JMP 中加入孤立森林,类似预测因子筛选,用户可以使用强大的工具来检测数据中的异常。这可以帮助他们识别可能需要进一步调查的异常模式或行为。
本文研究了 IForest 的工作原理并改进了它的一些局限性(即扩展隔离森林)
https://hal.science/hal-03537102/document
Scikit-learn 文档
https://scikit-learn.org/stable/modules/outlier_detection.html
基础数据分析与建模预测模型和机器学习回复:隔离森林和隔离树谢谢,米娅。 请注意,隔离树的实现与分区树相同。
“唯一”的区别是分区是随机发生的。
在 JMP 中,如果您引入没有任何可变性的 Y(例如全 0),JMP 不会执行任何分割(这是预期的结果,否则解在某个点将是随机的)。
在文献中,这被称为 Extratrees。
https://en.wikipedia.org/wiki/Random_forest#ExtraTrees
回复:隔离林和隔离树 - 状态更改为:正在调查感谢您的请求@FN 。 我们目前正在调查。
回复:隔离森林和隔离树事实上,延伸的树木或森林会更好。
通过您的链接,扩展的原始论文在这里: https://arxiv.org/pdf/1811.02141.pdf
回复:隔离森林和隔离树很好的建议@FN 。
除了隔离森林,
考虑扩展隔离森林而不是“常规”隔离森林算法也可能很有趣,因为它在决策边界方向(不仅是水平或垂直)上提供了更大的灵活性。
这是一篇文章,解释了扩展隔离森林的工作原理以及如何使用它: https://link.medium.com/TL1Lxirf9pb
回复:隔离森林和隔离树你好@mia_stephens ,有什么更新吗?谢谢
回复:隔离森林和隔离树您好@FN ,我们对使用 JMP 18 中的 Python 集成和Python“isotree”包进行了一些研究,使用 JSL 在 JMP 中创建对话框窗口。这看起来很有希望,但目前我们没有任何可以分享的内容。想知道您是否看过这种方法?
回复:隔离森林和隔离树谢谢,米娅。
正如我之前的评论中所分享的,这种方法在 JMP 中非常有用,因为它优于其他具有全局异常值的异常检测算法。
KNN 距离(在 JMP 的异常值分析菜单内)适用于局部异常值。
添加例如孤立森林将有助于快速识别和删除海量数据集中的所有类型的异常值。
针对真实世界数据的无监督异常检测算法:我们需要多少个?
当没有给出 Y 时,分区树也可以被修改来随机分割数据。
回复:隔离森林和隔离树回到此请求,看看是否有任何更新。
本文总结了 JMP 为何应该实施这一举措。
“在 52 个真实世界多变量表格数据集上对 33 种无监督异常检测算法进行了比较,这是迄今为止最大规模的无监督异常检测算法比较。在这个数据集集合上,EIF(扩展隔离森林)算法明显优于大多数其他算法。”
回复:隔离森林和隔离树我刚刚看了 Ross M 主持的 JMP-Python 集成网络研讨会(非常棒),他在会上重点介绍了 Python 中的这种方法,但似乎在 JMP 中也可以相对轻松地完成。它似乎代表了 JMP 已经采用的多种技术,例如分区树和多变量离群值分析。
回复:隔离森林和隔离树 - 状态更改为:是的,敬请期待!正在作为 Pythonic 插件进行开发。
回复:隔离森林和隔离树好消息!谢谢 Mia:)
回复:隔离森林和隔离树插件现已在市场上可用! https://marketplace.jmp.com/appdetails/Isolation+Forest
感谢@russ_wolfinger提供此信息。
回复:隔离森林和隔离树是的,插件现已可用。感谢@MathStatChem 的帮助!
回复:隔离林和隔离树 - 状态更改为:已交付回复:隔离森林和隔离树@mia_stephens ,感谢您为开发这个附加组件所付出的努力!
话虽如此,我注意到它对 Python 库的依赖使得它至少在 Windows 机器上使用起来相当具有挑战性。
如果没有计划在 JMP 中原生实现此功能(在我看来,这太棒了:smiling_face_with_smiling_eyes: ),您会考虑开源这个插件吗?这样,社区将来就可以帮助维护和改进它。
---
例如,我无法安装 isotree:
Python Install Packages("isotree");
在 JMP 18 中我收到此错误:
Traceback (most recent call last):
File "
", line 198, in _run_module_as_main
File "
", line 88, in _run_code File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\__main__.py", line 22, in
from pip._internal.cli.main import main as _main File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\cli\main.py", line 10, in
from pip._internal.cli.autocompletion import autocomplete File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\cli\main_parser.py", line 9, in
from pip._internal.build_env import get_runnable_pip File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\build_env.py", line 19, in
from pip._internal.cli.spinners import open_spinner File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\cli\spinners.py", line 9, in
from pip._internal.utils.logging import get_indentation File "C:\Users\user\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\utils\logging.py", line 4, in
import logging.handlers File "logging\handlers.py", line 26, in
File "socket.py", line 51, in
ModuleNotFoundError: No module named '_socket'
在 JMP 19 Pro 中我收到编译器错误。
//:*/
import jmputils
jmputils.jpip('install', 'isotree')
/*:
Collecting isotree
Using cached isotree-0.6.1.post8.tar.gz (300 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: isotree
Building wheel for isotree (pyproject.toml): started
Building wheel for isotree (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for isotree (pyproject.toml) did not run successfully.
exit code: 1
[14 lines of output]
C:\Users\user\AppData\Local\Temp\pip-build-env-e669figd\overlay\Lib\site-packages\setuptools\_distutils\extension.py:150: UserWarning: Unknown Extension options: 'install_requires'
warnings.warn(msg)
C:\Users\user\AppData\Local\Temp\pip-build-env-e669figd\overlay\Lib\site-packages\setuptools\dist.py:332: InformationOnly: Normalizing '0.6.1-8' to '0.6.1.post8'
self.metadata.version = self._normalize_version(self.metadata.version)
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-313\isotree
copying isotree\__init__.py -> build\lib.win-amd64-cpython-313\isotree
running build_ext
Compiling isotree/cpp_interface.pyx because it changed.
[1/1] Cythonizing isotree/cpp_interface.pyx
building 'isotree._cpp_interface' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for isotree
Failed to build isotree
error: failed-wheel-build-for-install
Failed to build installable wheels for some pyproject.toml based projects
isotree
0
回复:隔离森林和隔离树_socket 错误,您需要卸载 18.0 版本,然后更新到较新的 18.x 版本。而且必须是卸载,而不是修改/恢复。套接字共享库的安装位置不正确。
对于 JMP 18 和 19 版本来说,isotree 都是比较棘手的软件包之一。通常有效的解决方法是,为 JMP 18 标准安装 Python.org 3.11.x 版本,或为 JMP 19 标准安装 3.13.x 版本,然后在默认环境中执行常规 pip 安装。这通常可以正确构建。然后在 JMP 内部执行 jpip 安装。JMP 会获取本地缓存的打包版本,然后安装到 JMP 私有的 site-packages 目录中。
回复:隔离森林和隔离树感谢您回复@Paul_Nelson 。
回复:隔离森林和隔离树error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
当 Python 需要构建基于 C/C++ 的包时,你需要安装 C/C++ 开发环境。Visual Studio Code 应该足够了。这和你刚安装 Python 并尝试安装 isotree 没什么区别。