Skip to content

Update xml documentation for Image estimators #3376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Ivanidzo4ka
Copy link
Contributor

towards #3204

@codecov
Copy link

codecov bot commented Apr 17, 2019

Codecov Report

Merging #3376 into master will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3376      +/-   ##
==========================================
+ Coverage   72.69%   72.76%   +0.06%     
==========================================
  Files         807      808       +1     
  Lines      145171   145452     +281     
  Branches    16225    16244      +19     
==========================================
+ Hits       105536   105839     +303     
+ Misses      35220    35192      -28     
- Partials     4415     4421       +6
Flag Coverage Δ
#Debug 72.76% <ø> (+0.06%) ⬆️
#production 68.27% <ø> (+0.04%) ⬆️
#test 89.04% <ø> (+0.06%) ⬆️
Impacted Files Coverage Δ
src/Microsoft.ML.ImageAnalytics/ImageLoader.cs 84.55% <ø> (ø) ⬆️
src/Microsoft.ML.ImageAnalytics/ImageGrayscale.cs 78.33% <ø> (ø) ⬆️
...rosoft.ML.ImageAnalytics/VectorToImageTransform.cs 76.77% <ø> (ø) ⬆️
...Microsoft.ML.ImageAnalytics/ImagePixelExtractor.cs 82.55% <ø> (ø) ⬆️
src/Microsoft.ML.ImageAnalytics/ImageResizer.cs 84.64% <ø> (ø) ⬆️
...c/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs 16.66% <ø> (ø) ⬆️
src/Microsoft.ML.Data/Transforms/KeyToValue.cs 79.16% <0%> (-0.65%) ⬇️
src/Microsoft.ML.Transforms/Text/LdaTransform.cs 89.26% <0%> (-0.63%) ⬇️
...ML.Transforms/MutualInformationFeatureSelection.cs 78.58% <0%> (-0.33%) ⬇️
...ft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs 77.18% <0%> (-0.01%) ⬇️
... and 64 more

Copy link
Contributor

@natke natke left a comment

Choose a reason for hiding this comment

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

A few minor comments.

@@ -23,9 +28,12 @@ public static class ImageEstimatorsCatalog
public static ImageGrayscalingEstimator ConvertToGrayscale(this TransformsCatalog catalog, string outputColumnName, string inputColumnName = null)
=> new ImageGrayscalingEstimator(CatalogUtils.GetEnvironment(catalog), new[] { (outputColumnName, inputColumnName ?? outputColumnName) });

/// <include file='doc.xml' path='doc/members/member[@name="ImageGrayscalingEstimator"]/*' />
///<summary>
/// Create a <see cref="ImageGrayscalingEstimator"/>, which converts images in the column specified in <see cref="InputOutputColumnPair.InputColumnName"/>
Copy link
Contributor

@natke natke Apr 18, 2019

Choose a reason for hiding this comment

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

Should we distinguish between the two methods? i.e. one uses the column names directly, and one supplies a column pair #ByDesign

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Second method is internal, so main reason why I'm even adding anything here is because I want to get rid of doc.xml.


In reply to: 276802631 [](ancestors = 276802631)

/// <param name="catalog">The transform's catalog.</param>
/// <param name="columns">Specifies the names of the input columns for the transformation, and their respective output column names.</param>
/// <param name="columns">The pairs of input and output columns. This estimator operates over any data type.</param>
Copy link
Contributor

@natke natke Apr 18, 2019

Choose a reason for hiding this comment

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

Is that true? Doesn't the input have to be image data? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update to proper description


In reply to: 276802807 [](ancestors = 276802807)

@@ -41,20 +49,15 @@ internal static ImageGrayscalingEstimator ConvertToGrayscale(this TransformsCata
}

/// <summary>
/// Loads the images from the <see cref="ImageLoadingTransformer.ImageFolder" /> into memory.
/// Create a <see cref="ImageLoadingEstimator"/>, which load the data from the column specified in <paramref name="inputColumnName"/>
Copy link
Contributor

@natke natke Apr 18, 2019

Choose a reason for hiding this comment

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

load --> loads #Resolved

@Ivanidzo4ka Ivanidzo4ka added the documentation Related to documentation of ML.NET label Apr 19, 2019
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be <see cref="System.Drawing.Bitmap"/>.</param>
/// <param name="inputColumnName">Name of the column to copy the data from.
/// This estimator operates over text data.</param>
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

over text data [](start = 36, length = 14)

over text data indicating the path of the images to load. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rather put it in sentence above.


In reply to: 276905816 [](ancestors = 276905816)

@sfilipi
Copy link
Member

sfilipi commented Apr 19, 2019

    public static ImageLoadingEstimator LoadImages(this TransformsCatalog catalog, string outputColumnName, string imageFolder, string inputColumnName = null)

idk why TextLoader is its own privileged type, but LoadImages is an estimator.. #endRant #WontFix


Refers to: src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs:67 in 6d4e789. [](commit_id = 6d4e789, deletion_comment = False)

/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.</param>
/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be known size vector of <see cref="System.Single"/>or <see cref="System.Byte"/> depending on <paramref name="outputAsFloatArray"/>.</param>
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

e known [](start = 42, length = 7)

be a known #Resolved

/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.</param>
/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be known size vector of <see cref="System.Single"/>or <see cref="System.Byte"/> depending on <paramref name="outputAsFloatArray"/>.</param>
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

o [](start = 92, length = 1)

space #Resolved

/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be known size vector of <see cref="System.Single"/>or <see cref="System.Byte"/> depending on <paramref name="outputAsFloatArray"/>.</param>
/// <param name="inputColumnName">Name of the column to copy the data from.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

Name of the column to copy the data from [](start = 42, length = 40)

nope :) #Resolved

/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be the same as that of the input column.</param>
/// <param name="inputColumnName">Name of the column to copy the data from.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

Name of the column to copy the data from. [](start = 42, length = 41)

fix me :) #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do what, but who gonna fix me?


In reply to: 276906121 [](ancestors = 276906121)

/// <param name="inputColumnName"> Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be <see cref="System.Drawing.Bitmap"/>.</param>
/// <param name="inputColumnName">Name of the column to copy the data from.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

Name of the column to copy the data from. [](start = 42, length = 41)

fix me too. #Resolved

@sfilipi
Copy link
Member

sfilipi commented Apr 19, 2019

    /// <seealso cref= "ImageLoadingEstimator" />

please get those outside of , since you're at it.. #Resolved


Refers to: src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs:180 in 6d4e789. [](commit_id = 6d4e789, deletion_comment = False)

@@ -76,7 +79,7 @@ public static ImageLoadingEstimator LoadImages(this TransformsCatalog catalog, s
/// <seealso cref = "ImageEstimatorsCatalog" />
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

/// [](start = 8, length = 47)

please remove #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's on top of internal method, but will do.


In reply to: 276906321 [](ancestors = 276906321)

/// <param name="inputColumnName">Name of the column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be <see cref="System.Drawing.Bitmap"/>.</param>
/// <param name="inputColumnName">Name of the column to copy the data from.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

Name of the column to copy the data from. [](start = 42, length = 41)

fix #Resolved

@@ -32,18 +32,8 @@ namespace Microsoft.ML.Transforms.Image
// REVIEW: Rewrite as LambdaTransform to simplify.
// REVIEW: Should it be separate transform or part of ImageResizerTransform?
/// <summary>
/// <see cref="ITransformer"/> produced by fitting the <see cref="IDataView"/> to an <see cref="ImageGrayscalingEstimator" />.
/// <see cref="ITransformer"/> resulting from fitting a <see cref="ImageGrayscalingTransformer"/>.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

a [](start = 58, length = 1)

a --> an #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think in past month I learn more about English grammar rather than machine learning or C# development.
Not sure what to think about this.


In reply to: 276906392 [](ancestors = 276906392)

/// | Output column data type | <xref:System.Drawing.Bitmap> |
///
/// The resulting <xref:Microsoft.ML.Transforms.Image.ImageGrayscalingTransformer> creates a new column, named as specified in the output column name parameters, and
/// converts image from input column into grayscale image.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

image [](start = 16, length = 7)

the image from the input column into a grayscale image. #Resolved

/// <seealso cref = "ImageEstimatorsCatalog" />
/// </remarks >
/// [examples](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started) in the machinelearning-samples github repository.
/// See the See Also section for links to more examples of the usage.
Copy link
Member

Choose a reason for hiding this comment

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

examples of the usage [](start = 51, length = 21)

@natke usage examples?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that sounds better

@@ -29,16 +29,8 @@
namespace Microsoft.ML.Data
{
/// <summary>
/// The <see cref="ITransformer"/> produced by fitting an <see cref="IDataView"/> to an <see cref="ImageLoadingEstimator"/>.
/// <see cref="ITransformer"/> resulting from fitting a <see cref="ImageLoadingEstimator"/>.
Copy link
Member

@sfilipi sfilipi Apr 19, 2019

Choose a reason for hiding this comment

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

a [](start = 58, length = 1)

an #Resolved

@Ivanidzo4ka Ivanidzo4ka requested a review from natke April 19, 2019 23:16
@Ivanidzo4ka Ivanidzo4ka requested review from sfilipi and removed request for natke April 19, 2019 23:16
/// <seealso cref = "ImageEstimatorsCatalog" />
/// </remarks >
/// [examples](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started) in the machinelearning-samples github repository.
/// See the See Also section for links to more examples of the usage.
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that sounds better

/// | Output column data type | <xref:System.Drawing.Bitmap> |
///
/// The resulting <xref:Microsoft.ML.Transforms.Image.ImageResizingTransformer> creates a new column, named as specified in the output column name parameters, and
/// resize the data from the input column to this new column.
Copy link
Contributor

@natke natke Apr 20, 2019

Choose a reason for hiding this comment

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

resize -> resizes #Resolved

@natke natke self-requested a review April 20, 2019 17:12
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.</param>
/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.
/// This column's data type will be a known-size vector of <see cref="System.Single"/> or <see cref="System.Byte"/> depending on <paramref name="outputAsFloatArray"/>.</param>
Copy link

@shmoradims shmoradims Apr 20, 2019

Choose a reason for hiding this comment

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

size [](start = 52, length = 4)

sized #Resolved

@shmoradims
Copy link

    /// <seealso cref= "ImageLoadingEstimator" />

don't worry about 'internal' docs at this point


In reply to: 484774327 [](ancestors = 484774327)


Refers to: src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs:180 in 6d4e789. [](commit_id = 6d4e789, deletion_comment = False)

/// | -- | -- |
/// | Does this estimator need to look at the data to train its parameters? | No |
/// | Input column data type | <xref:System.Drawing.Bitmap> |
/// | Output column data type | Vector of known size of <xref:System.Single> or <xref:System.Byte> |

Choose a reason for hiding this comment

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

Vector of known size [](start = 36, length = 20)

Known-sized vector of ...

/// | Output column data type | Vector of known size of <xref:System.Single> or <xref:System.Byte> |
///
/// The resulting <xref:Microsoft.ML.Transforms.Image.ImagePixelExtractingTransformer> creates a new column, named as specified in the output column name parameters, and
/// converts image into vector of known size of floats or bytes. Size and data type depends on specified paramaters.

Choose a reason for hiding this comment

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

vector of known size of [](start = 28, length = 23)

ditto

/// | Does this estimator need to look at the data to train its parameters? | No |
/// | Input column data type | <xref:System.Drawing.Bitmap> |
/// | Output column data type | Vector of known size of <xref:System.Single> or <xref:System.Byte> |
///
Copy link

@shmoradims shmoradims Apr 20, 2019

Choose a reason for hiding this comment

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

/// [](start = 2, length = 5)

please add: |Required NuGet in addition to Microsoft.ML| the nuget name |

also to other image transforms in the PR #Resolved

/// | | |
/// | -- | -- |
/// | Does this estimator need to look at the data to train its parameters? | No |
/// | Input column data type | Vector of known size of floats, doubles or bytes. |
Copy link

@shmoradims shmoradims Apr 20, 2019

Choose a reason for hiding this comment

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

floats, doubles or bytes [](start = 59, length = 24)

use system types please, for the sake of F# users #Resolved

Copy link

@shmoradims shmoradims left a comment

Choose a reason for hiding this comment

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

:shipit:

@shmoradims shmoradims merged commit 4deb4fc into dotnet:master Apr 21, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Related to documentation of ML.NET
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants