當前位置: 首頁>>代碼示例>>Java>>正文


Java KMeansData類代碼示例

本文整理匯總了Java中org.apache.flink.test.testdata.KMeansData的典型用法代碼示例。如果您正苦於以下問題:Java KMeansData類的具體用法?Java KMeansData怎麽用?Java KMeansData使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


KMeansData類屬於org.apache.flink.test.testdata包,在下文中一共展示了KMeansData類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testKMeansJobWithCustomClassLoader

import org.apache.flink.test.testdata.KMeansData; //導入依賴的package包/類
@Test
public void testKMeansJobWithCustomClassLoader() throws IOException, ProgramInvocationException {
	PackagedProgram kMeansProg = new PackagedProgram(
		new File(KMEANS_JAR_PATH),
		new String[] {
			KMeansData.DATAPOINTS,
			KMeansData.INITIAL_CENTERS,
			"25"
		});

	TestEnvironment.setAsContext(
		testCluster,
		parallelism,
		Collections.singleton(new Path(KMEANS_JAR_PATH)),
		Collections.<URL>emptyList());

	kMeansProg.invokeInteractiveModeForExecution();
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:19,代碼來源:ClassLoaderITCase.java

示例2: postSubmit

import org.apache.flink.test.testdata.KMeansData; //導入依賴的package包/類
@Override
protected void postSubmit() throws Exception {
	List<String> resultLines = new ArrayList<String>();
	readAllResultLines(resultLines, resultPath);
	
	KMeansData.checkResultsWithDelta(KMeansData.CENTERS_AFTER_20_ITERATIONS_SINGLE_DIGIT, resultLines, 0.1);
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:8,代碼來源:IterativeKMeansITCase.java

示例3: preSubmit

import org.apache.flink.test.testdata.KMeansData; //導入依賴的package包/類
@Override
protected void preSubmit() throws Exception {
	dataPath = createTempFile("datapoints.txt", KMeansData.DATAPOINTS);
	clusterPath = createTempFile("initial_centers.txt", KMeansData.INITIAL_CENTERS);
	resultPath = getTempDirPath("result");
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:7,代碼來源:IterativeKMeansITCase.java

示例4: postSubmit

import org.apache.flink.test.testdata.KMeansData; //導入依賴的package包/類
@Override
protected void postSubmit() throws Exception {
	compareResultsByLinesInMemory(KMeansData.CENTERS_AFTER_20_ITERATIONS_SINGLE_DIGIT, resultPath);
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:5,代碼來源:KMeansIterativeNepheleITCase.java


注:本文中的org.apache.flink.test.testdata.KMeansData類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。