Skip to content
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

Prevent learning pipeline from adding null transform model to the pipeline #154

Merged
merged 3 commits into from
May 15, 2018

Conversation

codemzs
Copy link
Member

@codemzs codemzs commented May 14, 2018

fixes #153

@@ -182,7 +182,9 @@ public LearningPipeline()

if (transformModels.Count > 0)
{
transformModels.Insert(0,lastTransformModel);
if (lastTransformModel != null)
transformModels.Insert(0, lastTransformModel);
Copy link
Contributor

Choose a reason for hiding this comment

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

transformModels [](start = 24, length = 15)

would be nice to add test coverage

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

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:

@codemzs codemzs requested review from TomFinley and zeahmed May 15, 2018 00:22
else
Assert.Equal(0, predictionModel.TransformedF1[index]);

predictionModel.TransformedF1 = null;
Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka May 15, 2018

Choose a reason for hiding this comment

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

predictionModel.TransformedF1 = null; [](start = 11, length = 38)

out of curiosity, why? #Closed

Copy link
Member Author

Choose a reason for hiding this comment

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

compiler warning that is treated as an error.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed.

public string F1;
}

class TransformedData
Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka May 15, 2018

Choose a reason for hiding this comment

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

explicit access modifer, same for class above #Closed

const string _dataPath = @"..\..\Data\breast-cancer.txt";
var pipeline = new LearningPipeline();
pipeline.Add(new TextLoader<InputData>(_dataPath, useHeader: false));
pipeline.Add(new CategoricalHashOneHotVectorizer("F1") { HashBits = 10, Seed = 314489979, OutputKind = CategoricalTransformOutputKind.Bag });
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this issue only affecting transforms only pipeline?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah

@codemzs codemzs merged commit 52ea962 into dotnet:master May 15, 2018
@codemzs codemzs deleted the bugfix branch May 15, 2018 00:53
eerhardt pushed a commit to eerhardt/machinelearning that referenced this pull request Jul 27, 2018
…eline (dotnet#154)

* Prevent learning pipeline from adding null transform model to the pipeline.
* Add test.
@ghost ghost locked as resolved and limited conversation to collaborators Mar 30, 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.

Learning pipeline adds a null model to the pipeline
3 participants