Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scree plot functionality to python client and respective pyunit
- Loading branch information
1 parent
d583778
commit e45ea38
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import sys | ||
sys.path.insert(1, "../../") | ||
import h2o | ||
|
||
def screeplot_test(ip,port): | ||
# Connect to h2o | ||
h2o.init(ip,port) | ||
|
||
australia = h2o.upload_file(h2o.locate("smalldata/pca_test/AustraliaCoast.csv")) | ||
australia_pca = h2o.prcomp(x=australia[0:8], k = 4, transform = "STANDARDIZE") | ||
australia_pca.screeplot(type="barplot", show=False) | ||
australia_pca.screeplot(type="lines", show=False) | ||
|
||
if __name__ == "__main__": | ||
h2o.run_test(sys.argv, screeplot_test) |