Skip to content

Conversation

@zhengruifeng
Copy link
Contributor

What changes were proposed in this pull request?

make AFTSurvivalRegression support numeric censorCol

How was this patch tested?

existing tests and added tests

@SparkQA
Copy link

SparkQA commented Feb 23, 2017

Test build #73330 has finished for PR 17034 at commit fd59ca9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Technically I guess this could be part of checkNumericTypes similar to checking weight and label cols, but since it is specific to AFT this is ok.

@MLnick
Copy link
Contributor

MLnick commented Feb 23, 2017

As commented we could I guess try to fit in the additional tests into checkNumericTypes - but it's specific to AFT so doesn't seem worth it for now.

So, this LGTM.

Copy link
Contributor

@imatiach-msft imatiach-msft Mar 2, 2017

Choose a reason for hiding this comment

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

maybe you can wrap this in a withClue("Column censor must be of type NumericType but was actually of type StringType") {
...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This place follows the implementation in MLTestingUtils.checkNumericTypes, so I prefer not to change this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is discouraged for readability reasons to use _, consider specifying the list of types here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will update this. Thanks for your reviewing!

@imatiach-msft
Copy link
Contributor

great fix, LGTM! I added minor comments.

@SparkQA
Copy link

SparkQA commented Mar 2, 2017

Test build #73731 has finished for PR 17034 at commit 0185b45.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

import org.apache.spark.sql.{DataFrame, Row}
import org.apache.spark.sql.functions.{col, lit}
import org.apache.spark.sql.types.{ByteType, DecimalType, FloatType, IntegerType, LongType,
ShortType}
Copy link
Contributor

Choose a reason for hiding this comment

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

The style rule is generally to use _ when you're importing >= 5 things. You can revert it back, thanks!

@SparkQA
Copy link

SparkQA commented Mar 2, 2017

Test build #73738 has started for PR 17034 at commit 31293b2.

@zhengruifeng
Copy link
Contributor Author

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Mar 2, 2017

Test build #73743 has finished for PR 17034 at commit 31293b2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MLnick
Copy link
Contributor

MLnick commented Mar 2, 2017

Thanks! Merged to master.

@asfgit asfgit closed this in 50c08e8 Mar 2, 2017
@zhengruifeng zhengruifeng deleted the aft_numeric_censor branch March 3, 2017 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants