開始使用免費開始

交叉列聯二元分數

table() 函式會統計一個或多個向量中,各種值組合出現的次數。輸出表格的方向取決於你提供輸入向量的順序。例如,在下列表格中:

table(currency, country)

        country
currency UK USA
       $  0   1
       £  1   0

列是依貨幣建立索引,因為在 table() 函式中,貨幣向量是第一個引數。

本練習屬於課程

R 中的異常偵測入門

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Tabulate agreement of label and binary isolation score 
table(___, ___)

# Tabulate agreement of label and binary LOF score 
編輯並執行程式碼