Skip to content

Conversation

@singlis
Copy link
Member

@singlis singlis commented Nov 21, 2018

This will be replacing the TermLookupTransform and provide a way to
specify the mapping betweeen two values (note this is specified and not
trained). A user can specify the mapping by providing a keys list and
values list that must be equal in size. The Estimator will then generate
a 1-1 mapping based on the two lists.

The PR references #754 which covers the conversion of Transformer to use
the new Estimator API.

This will be replacing the TermLookupTransform and provide a way to
specify the mapping betweeen two values (note this is specified and not
trained). A user can specify the mapping by providing a keys list and
values list that must be equal in size. The Estimator will then generate
a 1-1 mapping based on the two lists.

The PR references dotnet#754 which covers the conversion of Transformer to use
the new Estimator API.
@singlis
Copy link
Member Author

singlis commented Nov 21, 2018

@Ivanidzo4ka @sfilipi - I am thankful for your future code reviews! #Resolved

@singlis singlis changed the title Addition of the ValueMappingEstimator and ValueMappingTransform. WIP - Addition of the ValueMappingEstimator and ValueMappingTransform. Nov 21, 2018
@singlis singlis changed the title WIP - Addition of the ValueMappingEstimator and ValueMappingTransform. [WIP] Addition of the ValueMappingEstimator and ValueMappingTransform. Nov 22, 2018
@singlis
Copy link
Member Author

singlis commented Nov 28, 2018

@Ivanidzo4ka and @sfilipi - I have pushed an update. Can you review when you have a moment? #Resolved

/// <summary>
/// Base class that contains the mapping of keys to values.
/// </summary>
private abstract class ValueMap
Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka Dec 21, 2018

Choose a reason for hiding this comment

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

ValueMap [](start = 31, length = 8)

You have only one child class for this abstract class, is it worth to have it? #ByDesign

Copy link
Member Author

Choose a reason for hiding this comment

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

The main issue with combining the two classes and having a single class is the declaration of the ValueMap on the Transformer. It would go from ValueMap _valueMap to ValueMap<TKey, TValue> _valueMap -- this would be OK if TKey and TValue could be used directly, however the ValueMap is constructed based on the column types (which are similar!). Where they differr is when TValue is a vector type. When creating ValueMapping Transformer with an int vector, TValue is still only in. However in the value map its int[].


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

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

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

:shipit:

@singlis
Copy link
Member Author

singlis commented Dec 21, 2018

@Ivanidzo4ka @sfilipi thanks a ton for your feedback! Just need one more approval.

Copy link
Member

@sfilipi sfilipi left a comment

Choose a reason for hiding this comment

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

:shipit:

@sfilipi sfilipi merged commit 06ab3d0 into dotnet:master Dec 21, 2018
@singlis singlis deleted the singlis/term branch March 7, 2019 00:54
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants