當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python SciPy arff.MetaData用法及代碼示例

本文簡要介紹 python 語言中 scipy.io.arff.MetaData 的用法。

用法:

class  scipy.io.arff.MetaData(rel, attr)#

用於在 ARFF 數據集上保存有用信息的小容器。

了解屬性名稱和類型。

注意

還按順序維護屬性列表,即在 meta 中執行 for i,其中 meta 是 MetaData 的實例,將按照定義的順序返回不同的屬性名稱。

例子

data, meta = loadarff('iris.arff')
# This will print the attributes names of the iris.arff dataset
for i in meta:
    print(i)
# This works too
meta.names()
# Getting attribute type
types = meta.types()

相關用法


注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.io.arff.MetaData。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。