Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML-35] Restrict printNumericTable to first 10 eigenvalues with first 20 dimensions #36

Merged
merged 3 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions mllib-dal/src/main/native/ALSDALImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ JNIEXPORT jlong JNICALL Java_org_apache_spark_ml_recommendation_ALSDALImpl_cDALI

std::cout << "\n=== Results for Rank " << rankId << "===\n" << std::endl;
// std::cout << "Partition ID: " << partitionId << std::endl;
printNumericTable(pUser, "User Factors (first 10 rows):", 10);
printNumericTable(pItem, "Item Factors (first 10 rows):", 10);
printNumericTable(pUser, "User Factors (first 10 rows x 20 columns):", 10, 20);
printNumericTable(pItem, "Item Factors (first 10 rows x 20 columns):", 10, 20);
std::cout << "User Offset: " << getOffsetFromOffsetTable(userOffset) << std::endl;
std::cout << "Item Offset: " << getOffsetFromOffsetTable(itemOffset) << std::endl;
std::cout << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions mllib-dal/src/main/native/PCADALImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ JNIEXPORT jlong JNICALL Java_org_apache_spark_ml_feature_PCADALImpl_cPCATrainDAL
std::cout << "PCA (native): master step took " << duration << " secs" << std::endl;

/* Print the results */
printNumericTable(result->get(pca::eigenvalues), "First 10 Eigenvalues:", 10);
printNumericTable(result->get(pca::eigenvectors), "First 10 Eigenvectors:", 10);
printNumericTable(result->get(pca::eigenvalues), "First 10 eigenvalues with first 20 dimensions:", 10, 20);
printNumericTable(result->get(pca::eigenvectors), "First 10 eigenvectors with first 20 dimensions:", 10, 20);

// Return all eigenvalues & eigenvectors

Expand Down