Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python scikit学习估计器的CPU和内存使用_Python_Memory_Scikit Learn_Cpu_Cpu Usage - Fatal编程技术网

Python scikit学习估计器的CPU和内存使用

Python scikit学习估计器的CPU和内存使用,python,memory,scikit-learn,cpu,cpu-usage,Python,Memory,Scikit Learn,Cpu,Cpu Usage,是否有一种方法可以监控或保存正在代码中运行的scikit学习估计器的内存和CPU使用情况 例如: from sklearn.ensemble import RandomForestRegressor clf = RandomForestRegressor().fit(X_train, y_train) 要获得smth,请执行以下操作: Memory used: 1 MB CPU % used: 5% clocks per instruction (CPI) = 20 我试过使用内存分析

是否有一种方法可以监控或保存正在代码中运行的scikit学习估计器的内存和CPU使用情况

例如:

from sklearn.ensemble import RandomForestRegressor 

clf = RandomForestRegressor().fit(X_train, y_train)
要获得smth,请执行以下操作:

Memory used: 1 MB

CPU % used: 5%
clocks per instruction (CPI) = 20
我试过使用
内存分析器
,但到目前为止,它对许多估计器都不起作用