Skip to content

Commit

Permalink
Correct the performance test so that the CSV data loader in both PNU …
Browse files Browse the repository at this point in the history
…and PU configurations works properly.

Correct test data CSV file to have the correct number of column names in the header.
The covertype_pnu_10000.csv file header has 53 feature columns (0 through 52) but no label column name. The samples have 54 columns (53 features and 1 label).

Add the label column name to the header.

PiperOrigin-RevId: 699375108
  • Loading branch information
raj-sinha authored and The spade_anomaly_detection Authors committed Nov 23, 2024
1 parent 51349a0 commit 09dcbf5
Show file tree
Hide file tree
Showing 8 changed files with 19,787 additions and 75 deletions.
4 changes: 3 additions & 1 deletion spade_anomaly_detection/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ def load_dataframe(
'thyroid_labeled',
'covertype_pu_labeled',
'drug_train_pu_labeled',
'covertype_pnu_10000',
'covertype_pnu_100000',
'covertype_pnu_train',
'covertype_pu_train',
'covertype_test',
]:
raise ValueError(f'Unknown dataset_name: {dataset_name}')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,label
0.8279139569784891,0.6861111111111111,0.36363636363636365,0.4051539012168933,0.5581395348837209,0.4263032176478853,0.6377952755905512,0.984251968503937,0.8622047244094488,0.10065523490868535,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,-1.0
0.3676838419209604,0.4138888888888889,0.16666666666666669,0.17680744452397995,0.2868217054263566,0.2263594211043979,0.9212598425196851,0.9448818897637795,0.5314960629921259,0.2396486825595985,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-1.0
0.6703351675837917,0.5416666666666667,0.21212121212121213,0.0,0.2235142118863049,0.3918786005339328,0.8543307086614174,0.9881889763779528,0.6496062992125984,0.355778614247874,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-1.0
Expand Down
9,850 changes: 9,850 additions & 0 deletions spade_anomaly_detection/example_data/covertype_pnu_train.csv

Large diffs are not rendered by default.

9,561 changes: 9,561 additions & 0 deletions spade_anomaly_detection/example_data/covertype_pu_train.csv

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions spade_anomaly_detection/example_data/covertype_test.csv

Large diffs are not rendered by default.

Loading

0 comments on commit 09dcbf5

Please sign in to comment.