Skip to content

Conversation

@lins05
Copy link
Contributor

@lins05 lins05 commented Jul 14, 2016

What changes were proposed in this pull request?

Fixed several inline formatting in ml features doc.

Before:

screen shot 2016-07-14 at 12 24 57 pm

After:

screen shot 2016-07-14 at 12 25 48 pm

## How was this patch tested?

Genetate the docs locally by SKIP_API=1 jekyll build and view it in the browser.

@hhbyyh
Copy link
Contributor

hhbyyh commented Jul 17, 2016

Thanks for finding this.

@lins05
Copy link
Contributor Author

lins05 commented Jul 23, 2016

@jkbradley Could you please take a look at this simple fix?

Rescaled(e_i) = \frac{e_i - E_{min}}{E_{max} - E_{min}} * (max - min) + min
\end{equation}`
For the case `E_{max} == E_{min}`, `Rescaled(e_i) = 0.5 * (max + min)`
For the case `$E_{max} == E_{min}$`, `$Rescaled(e_i) = 0.5 * (max + min)$`
Copy link
Member

Choose a reason for hiding this comment

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

Nit: write = instead of == in the first equation?
It looks like this is repeated in the scaladoc for MinMaxScaler. Can that be updated too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review!

Nit: write = instead of == in the first equation?

Both are ok for me, but in the MinMaxScaler's scaladoc we're also using ==, so we update both places or leave it as is.

It looks like this is repeated in the scaladoc for MinMaxScaler. Can that be updated too?

I don't think we can format math formulas in scaladoc, e.g. from MinMaxScaler doc it seems not formatted at all.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, right. Actually we have several instances where latex is used in scaladoc and it doesn't render, like https://spark.apache.org/docs/2.0.0-preview/api/scala/index.html#org.apache.spark.mllib.optimization.LogisticGradient

Most are private classes. It's even in a log message in GradientDescentSuite. This looks OK to me as-is; you're also welcome to clean up all the useless latex in log messages / scaladoc while 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.

OK, I'll follow up with another PR to remove latex in scaladocs and log messages.

@srowen
Copy link
Member

srowen commented Jul 25, 2016

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Jul 25, 2016

Test build #62833 has finished for PR 14194 at commit 23af691.

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

asfgit pushed a commit that referenced this pull request Jul 25, 2016
… doc

## What changes were proposed in this pull request?

Fixed several inline formatting in ml features doc.

Before:

<img width="475" alt="screen shot 2016-07-14 at 12 24 57 pm" src="https://cloud.githubusercontent.com/assets/717363/16827974/1e1b6e04-49be-11e6-8aa9-4a0cb6cd3b4e.png">

After:

<img width="404" alt="screen shot 2016-07-14 at 12 25 48 pm" src="https://cloud.githubusercontent.com/assets/717363/16827976/2576510a-49be-11e6-96dd-92a1fa464d36.png">

## How was this patch tested?

Genetate the docs locally by `SKIP_API=1 jekyll build` and view it in the browser.

Author: Shuai Lin <linshuai2012@gmail.com>

Closes #14194 from lins05/fix-docs-formatting.

(cherry picked from commit 3b6e1d0)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@srowen
Copy link
Member

srowen commented Jul 25, 2016

Merged to master/2.0 to match original change

@asfgit asfgit closed this in 3b6e1d0 Jul 25, 2016
@lins05 lins05 deleted the fix-docs-formatting branch July 26, 2016 01:17
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