dataset modification
This commit is contained in:
@@ -17,6 +17,7 @@ from pyod.models.loci import LOCI
|
||||
from pyod.models.hbos import HBOS
|
||||
from pyod.models.lscp import LSCP
|
||||
from pyod.models.feature_bagging import FeatureBagging
|
||||
from torch_geometric.data import Data
|
||||
|
||||
from utils.project_settings import Classes
|
||||
|
||||
@@ -116,6 +117,10 @@ def cluster_cubes(data, cluster_dims, max_points_per_cluster=-1, min_points_per_
|
||||
print("no need to cluster.")
|
||||
return [farthest_point_sampling(data, max_points_per_cluster)]
|
||||
|
||||
if isinstance(data, Data):
|
||||
import torch
|
||||
data = torch.cat((data.pos, data.norm, data.y.double().unsqueeze(-1)), dim=-1).numpy()
|
||||
|
||||
max = data[:, :3].max(axis=0)
|
||||
max += max * 0.01
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ class DataSplit(DataClass):
|
||||
train = 'train'
|
||||
devel = 'devel'
|
||||
test = 'test'
|
||||
predict = 'predict'
|
||||
|
||||
|
||||
class GlobalVar(DataClass):
|
||||
|
||||
Reference in New Issue
Block a user