Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Updated documentation for
  • Loading branch information
MrBago committed Dec 18, 2017
commit d63f07789069a8f643dc41448e5f456233fc3499
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,23 @@ class VectorSizeHint @Since("2.3.0") (@Since("2.3.0") override val uid: String)
/**
* Param for how to handle invalid entries. Invalid vectors include nulls and vectors with the
* wrong size. The options are `skip` (filter out rows with invalid vectors), `error` (throw an
* error) and `keep` (do not check the vector size, and keep all rows). `error` by default.
* error) and `optimistic` (do not check the vector size, and keep all row\). `error` by default.
Copy link
Contributor

@WeichenXu123 WeichenXu123 Dec 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"row\" ==> "rows"

*
* Note: Users should take care when setting this param to `optimistic`. The use of the
* `optimistic` option will prevent the transformer from validating the sizes of vectors in
* `inputCol`. A mismatch between the metadata of a column and its contents could result in
* unexpected behaviour or errors when using that column.
*
* @group param
*/
@Since("2.3.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you're overriding this val, can you please override the docstring and specify the default value here?

override val handleInvalid: Param[String] = new Param[String](
this,
"handleInvalid",
"How to handle invalid vectors in inputCol. Invalid vectors include nulls and vectors with " +
"the wrong size. The options are skip (filter out rows with invalid vectors), error " +
"(throw an error) and keep (do not check the vector size, and keep all rows). `error` by " +
"default.",
"the wrong size. The options are `skip` (filter out rows with invalid vectors), `error` " +
"(throw an error) and `optimistic` (do not check the vector size, and keep all rows). " +
"`error` by default.",
ParamValidators.inArray(VectorSizeHint.supportedHandleInvalids))

/** @group setParam */
Expand Down Expand Up @@ -173,6 +179,7 @@ class VectorSizeHint @Since("2.3.0") (@Since("2.3.0") override val uid: String)
override def copy(extra: ParamMap): this.type = defaultCopy(extra)
}

/** :: Experimental :: */
@Experimental
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Scala docstring here with :: Experimental :: note.

@Since("2.3.0")
object VectorSizeHint extends DefaultParamsReadable[VectorSizeHint] {
Expand Down