Machine learning ignite:如何在训练模型后从db/工作文件夹中删除已创建的ML数据集

Machine learning ignite:如何在训练模型后从db/工作文件夹中删除已创建的ML数据集,machine-learning,ignite,Machine Learning,Ignite,下面是用于构建模型的代码片段。Trainer class在集群中创建数据集在培训期间,一旦构建了模型,我希望从工作文件夹中删除这些创建的数据集 为什么不从工作文件夹中删除?有没有办法显式调用autocloseable IgniteCache<Integer, double[]> dataCache = createCacheBasedData(ignite, rows, cacheName); KMeansTrainer trainer = new KMeansTrainer()

下面是用于构建模型的代码片段。Trainer class在集群中创建数据集在培训期间,一旦构建了模型,我希望从工作文件夹中删除这些创建的数据集

为什么不从工作文件夹中删除?有没有办法显式调用autocloseable

IgniteCache<Integer, double[]> dataCache = createCacheBasedData(ignite, rows, cacheName);

KMeansTrainer trainer = new KMeansTrainer()
    .withDistance(distanceMeasure)  //other metrics are HammingDistance, ManhattanDistance
    .withAmountOfClusters(k) // number of clusters want to create
    .withMaxIterations(maxIterations)
    .withEpsilon(1.0E-4D)
    .withSeed(seed);

Model mdl = trainer.fit(
    ignite,
    dataCache,
    modelData.getTrainData(),
    modelData.getFeatureExtractor(),
    modelData.getLabelExtractor()
);

dataCache.destory();
IgniteCache dataCache=createCacheBasedData(ignite,行,缓存名称);
KMeanFilter trainer=新KMeanFilter()
.withDistance(distanceMeasure)//其他指标为汉明距离、曼哈顿距离
.withAmountOfClusters(k)//要创建的群集数
.withMaxIterations(maxIterations)
.带ε(1.0E-4D)
.用种子(种子);
型号mdl=trainer.fit(
点燃,
数据缓存,
modelData.getTrainData(),
modelData.getFeatureExtractor(),
modelData.getLabelExtractor()
);
dataCache.destory();

培训结束后还保留哪些文件?您使用什么缓存配置?K-Means显式使用CacheBasedDataset上的try with资源,并对此类数据集显式调用close()销毁辅助缓存和数据