Repository navigation
Don't drop columns that are not specified - #1505
Conversation
based on what the outcome of the #1504 discussion is, we should update this to be accurate. #Closed Refers to: src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs:59 in 05adabe. [](commit_id = 05adabe, deletion_comment = False) |
| { | ||
| IDataView savedData = TakeFilter.Create(_env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); | ||
| savedData = SelectColumnsTransform.CreateKeep(_env, savedData, "pca"); | ||
| savedData = SelectColumnsTransform.CreateKeep(_env, savedData, new[] { "pca" }); |
There was a problem hiding this comment.
new[] [](start = 79, length = 5)
is it unavoidable?
There was a problem hiding this comment.
If we want the "keepHidden" argument to be optional, then the string[] argument can't be a 'params' argument. I can bring back the other CreateKeep overload with the non-optional keepHidden argument if you think it's important.
In reply to: 231233064 [](ancestors = 231233064)
There was a problem hiding this comment.
I thought that you can have optional and then params
In reply to: 231242980 [](ancestors = 231242980,231233064)
There was a problem hiding this comment.
There was a problem hiding this comment.
Turns out you're right, it is possible to have an optional followed by params. But to use it without specifying the optional it would have to be: keepColumns: new[] {"a", "b", "c"}, which is longer than just adding the "new[]"...
In reply to: 231257259 [](ancestors = 231257259,231257225,231242980,231233064)
Can we change the tests? :) In reply to: 436366507 [](ancestors = 436366507,436352181,436352086) Refers to: src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs:64 in ea30ccb. [](commit_id = ea30ccb, deletion_comment = False) |
idk if you can annotate test classes with the new [BestFriend] and not need to change them. In reply to: 436375208 [](ancestors = 436375208,436366507,436352181,436352086) Refers to: src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs:64 in ea30ccb. [](commit_id = ea30ccb, deletion_comment = False) |
Fixes #1504 .