Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
Signed-off-by: minmingzhu <minming.zhu@intel.com>
  • Loading branch information
minmingzhu committed Oct 11, 2023
1 parent 4c4c993 commit 7829b0c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CorrelationHomogenTableSuite extends FunctionsSuite with Logging {
val correlationDAL = new CorrelationDALImpl(1, 1)
val gpuIndices = Array(0)
val result = new CorrelationResult()
correlationDAL.cCorrelationTrainDAL(dataTable.getcObejct(), 200, 10, 1, 1, Common.ComputeDevice.HOST.ordinal(), gpuIndices, result);
correlationDAL.cCorrelationTrainDAL(dataTable.getcObejct(), sourceData.length, sourceData(0).length, 1, 1, Common.ComputeDevice.HOST.ordinal(), gpuIndices, result);
val correlationMatrix = TestCommon.getMatrixFromTable(OneDAL.makeHomogenTable(
result.getCorrelationNumericTable), TestCommon.getComputeDevice)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class KmeansHomogenTableSuite extends FunctionsSuite with Logging {
OneCCL.init(1, 1, "127.0.0.1_3000")
val gpuIndices = Array(0)
val result = new KMeansResult();
val centroids = kmeansDAL.cKMeansOneapiComputeWithInitCenters(dataTable.getcObejct(), 10000, 20, centroidsTable.getcObejct(),10, 0.001,
val centroids = kmeansDAL.cKMeansOneapiComputeWithInitCenters(dataTable.getcObejct(), sourceData.length, sourceData(0).length, centroidsTable.getcObejct(),10, 0.001,
5, 1, 1, TestCommon.getComputeDevice.ordinal(), gpuIndices, result);
val resultVectors = OneDAL.homogenTableToVectors(OneDAL.makeHomogenTable(centroids), TestCommon.getComputeDevice);
assertArrayEquals(TestCommon.convertArray(expectCentroids), TestCommon.convertArray(resultVectors), 0.000001)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PCAHomogenTableSuite extends FunctionsSuite with Logging {
val pcaDAL = new PCADALImpl(5, 1, 1)
val gpuIndices = Array(0)
val result = new PCAResult()
pcaDAL.cPCATrainDAL(dataTable.getcObejct(), 1000, 10, 1, 1, TestCommon.getComputeDevice.ordinal(), gpuIndices, result);
pcaDAL.cPCATrainDAL(dataTable.getcObejct(), sourceData.length, sourceData(0).length, 1, 1, TestCommon.getComputeDevice.ordinal(), gpuIndices, result);
val pcNumericTable = OneDAL.makeHomogenTable(result.getPcNumericTable)
val explainedVarianceNumericTable = OneDAL.makeHomogenTable(
result.getExplainedVarianceNumericTable)
Expand Down Expand Up @@ -79,7 +79,7 @@ class PCAHomogenTableSuite extends FunctionsSuite with Logging {
val pcaDAL = new PCADALImpl(5, 1, 1)
val gpuIndices = Array(0)
val result = new PCAResult()
pcaDAL.cPCATrainDAL(dataTable.getcObejct(), 1000, 10, 1, 1, TestCommon.getComputeDevice.ordinal(), gpuIndices, result);
pcaDAL.cPCATrainDAL(dataTable.getcObejct(), sourceData.length, sourceData(0).length, 1, 1, TestCommon.getComputeDevice.ordinal(), gpuIndices, result);
val pcNumericTable = OneDAL.makeHomogenTable(result.getPcNumericTable)
val explainedVarianceNumericTable = OneDAL.makeHomogenTable(
result.getExplainedVarianceNumericTable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SummarizerHomogenTableSuite extends FunctionsSuite with Logging{
val summarizerDAL = new SummarizerDALImpl(1, 1)
val gpuIndices = Array(0)
val result = new SummarizerResult()
summarizerDAL.cSummarizerTrainDAL(dataTable.getcObejct(), 200, 10, 1, 1, Common.ComputeDevice.HOST.ordinal(), gpuIndices, result)
summarizerDAL.cSummarizerTrainDAL(dataTable.getcObejct(), sourceData.length, sourceData(0).length, 1, 1, Common.ComputeDevice.HOST.ordinal(), gpuIndices, result)
val meanTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMeanNumericTable), Common.ComputeDevice.HOST)
val varianceTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getVarianceNumericTable), Common.ComputeDevice.HOST)
val minimumTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMinimumNumericTable), Common.ComputeDevice.HOST)
Expand Down

0 comments on commit 7829b0c

Please sign in to comment.