Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Modify the comments about LabeledPoint
  • Loading branch information
huangweizhe123 committed Jun 29, 2018
commit 79e414f2af16bc032e9dcb7eb1f4ab4da95c1fff
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void main(String[] args) {
)
);

// The contingency table is constructed from the raw (feature, label) pairs and used to conduct
// The contingency table is constructed from the raw (label, feature) pairs and used to conduct
// the independence test. Returns an array containing the ChiSquaredTestResult for every feature
// against the label.
ChiSqTestResult[] featureTestResults = Statistics.chiSqTest(obs.rdd());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
[LabeledPoint(1.0, [1.0, 0.0, 3.0]),
LabeledPoint(1.0, [1.0, 2.0, 0.0]),
LabeledPoint(1.0, [-1.0, 0.0, -0.5])]
) # LabeledPoint(feature, label)
) # LabeledPoint(label, feature)

# The contingency table is constructed from an RDD of LabeledPoint and used to conduct
# the independence test. Returns an array containing the ChiSquaredTestResult for every feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ object HypothesisTestingExample {
LabeledPoint(-1.0, Vectors.dense(-1.0, 0.0, -0.5)
)
)
) // (feature, label) pairs.
) // (label, feature) pairs.

// The contingency table is constructed from the raw (feature, label) pairs and used to conduct
// The contingency table is constructed from the raw (label, feature) pairs and used to conduct
// the independence test. Returns an array containing the ChiSquaredTestResult for every feature
// against the label.
val featureTestResults: Array[ChiSqTestResult] = Statistics.chiSqTest(obs)
Expand Down