久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

有使用 h5py 在 Python 中對大數據進行分析工作的經

Experience with using h5py to do analytical work on big data in Python?(有使用 h5py 在 Python 中對大數據進行分析工作的經驗嗎?)
本文介紹了有使用 h5py 在 Python 中對大數據進行分析工作的經驗嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我做了大量的統計工作,并使用 Python 作為我的主要語言.雖然我使用的一些數據集可能占用 20GB 的內存,這使得使用 numpy、scipy 和 PyIMSL 中的內存函數對它們進行操作幾乎是不可能的.統計分析語言 SAS 在這里有一個很大的優勢,它可以對來自硬盤的數據進行操作,而不是嚴格的內存處理.但是,我想避免在 SAS 中編寫大量代碼(出于各種原因),因此我試圖確定我對 Python 有哪些選擇(除了購買更多的硬件和內存).

I do a lot of statistical work and use Python as my main language. Some of the data sets I work with though can take 20GB of memory, which makes operating on them using in-memory functions in numpy, scipy, and PyIMSL nearly impossible. The statistical analysis language SAS has a big advantage here in that it can operate on data from hard disk as opposed to strictly in-memory processing. But, I want to avoid having to write a lot of code in SAS (for a variety of reasons) and am therefore trying to determine what options I have with Python (besides buying more hardware and memory).

我應該澄清一下,像 map-reduce 這樣的方法對我的大部分工作沒有幫助,因為我需要對 完整 組數據進行操作(例如計算分位數或擬合邏輯回歸模型).

I should clarify that approaches like map-reduce will not help in much of my work because I need to operate on complete sets of data (e.g. computing quantiles or fitting a logistic regression model).

最近我開始玩 h5py 并認為這是我找到的最佳選擇允許 Python 像 SAS 一樣操作并操作磁盤中的數據(通過 hdf5 文件),同時仍然能夠利用 numpy/scipy/matplotlib 等.我想知道是否有人在類似的設置中使用 Python 和 h5py 的經驗和他們發現了什么.有沒有人能夠在迄今為止由 SAS 主導的大數據"設置中使用 Python?

Recently I started playing with h5py and think it is the best option I have found for allowing Python to act like SAS and operate on data from disk (via hdf5 files), while still being able to leverage numpy/scipy/matplotlib, etc. I would like to hear if anyone has experience using Python and h5py in a similar setting and what they have found. Has anyone been able to use Python in "big data" settings heretofore dominated by SAS?

購買更多的硬件/內存肯定會有所幫助,但從 IT 的角度來看,我很難將 Python 賣給需要分析大量數據集的組織,而 Python(或 R,或 MATLAB 等)需要持有內存中的數據.SAS 在這方面繼續擁有強大的賣點,因為雖然基于磁盤的分析可能較慢,但您可以自信地處理龐大的數據集.所以,我希望 Stackoverflow 能幫助我弄清楚如何降低使用 Python 作為主要大數據分析語言的風險.

Buying more hardware/memory certainly can help, but from an IT perspective it is hard for me to sell Python to an organization that needs to analyze huge data sets when Python (or R, or MATLAB etc) need to hold data in memory. SAS continues to have a strong selling point here because while disk-based analytics may be slower, you can confidently deal with huge data sets. So, I am hoping that Stackoverflow-ers can help me figure out how to reduce the perceived risk around using Python as a mainstay big-data analytics language.

推薦答案

我們使用Python結合h5py、numpy/scipy和boost::python來做數據分析.我們的典型數據集大小可達數百 GB.

We use Python in conjunction with h5py, numpy/scipy and boost::python to do data analysis. Our typical datasets have sizes of up to a few hundred GBs.

HDF5 的優勢:

  • 可以使用 h5view 應用程序、h5py/ipython 和 h5* 命令行工具方便地檢查數據
  • API 可用于不同的平臺和語言
  • 使用組構造數據
  • 使用屬性注釋數據
  • 無憂的內置數據壓縮
  • 單個數據集上的 io 速度很快

HDF5 陷阱:

  • 如果 h5 文件包含太多數據集/組 (> 1000),性能會下降,因為遍歷它們非常慢.另一方面,io 對于一些大型數據集來說速度很快.
  • 高級數據查詢(類似 SQL)實施起來笨拙且速度慢(在這種情況下考慮 SQLite)
  • HDF5 并非在所有情況下都是線程安全的:必須確保使用正確的選項編譯庫
  • 更改 h5 數據集(調整大小、刪除等)會增大文件大小(在最好的情況下)或不可能(在最壞的情況下)(必須復制整個 h5 文件以再次展平)

這篇關于有使用 h5py 在 Python 中對大數據進行分析工作的經驗嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How should I verify a log message when testing Python code under nose?(在鼻子下測試 Python 代碼時,我應該如何驗證日志消息?)
Patch __call__ of a function(修補函數的 __call__)
How to call self in a mock method of an object in Python?(如何在 Python 中對象的模擬方法中調用 self?)
Mocking only a single method on an object(僅模擬對象上的單個方法)
Mocking a subprocess call in Python(在 Python 中模擬子進程調用)
Checking call order across multiple mocks(檢查多個模擬的調用順序)
主站蜘蛛池模板: 国产高清一区二区三区 | 99亚洲国产精品 | 欧美精品在线播放 | 日韩成人高清在线 | 国产精品久久久久久久久图文区 | 男女精品网站 | 嫩草网| 成人免费影院 | 久久人体 | 成年人的视频免费观看 | 欧美综合国产精品久久丁香 | 99精品视频一区二区三区 | 欧美一区二区久久 | 麻豆久久久9性大片 | 韩国av影院 | 中文字幕一区二区三区在线观看 | 99精品国产一区二区三区 | 国产黄色精品 | 99精品一区 | 国产综合久久久久久鬼色 | 中文精品视频 | 91不卡 | 日本久久视频 | 国产精品久久久 | 福利视频网| 亚洲欧美一区二区三区国产精品 | 精品少妇v888av | 亚洲一区二区三区在线免费 | 国产又爽又黄的视频 | 一区二区三区视频播放 | 久久这里只有精品首页 | 亚洲视频在线一区 | 欧美性乱| 老牛影视av一区二区在线观看 | 国产目拍亚洲精品99久久精品 | 久久久精品 | 中文字幕一区在线观看视频 | 亚洲综合大片69999 | 超碰人人人人 | 欧美成人a∨高清免费观看 91伊人 | 亚洲一区二区三区在线 |