Skip to content

C# samples should probably use C# and not Python naming conventions #2155

Closed
@TomFinley

Description

@TomFinley

I was reading a PR when suddenly I saw something a bit odd.

var customized_pipeline = new WordTokenizingEstimator(ml, "Review")
.Append(new ValueToKeyMappingEstimator(ml, "Review", customizedColumnName, maxNumTerms: 10, sort: ValueToKeyMappingTransformer.SortOrder.Value));
// The transformed data.
var transformedData_default = default_pipeline.Fit(trainData).Transform(trainData);
var transformedData_customized = customized_pipeline.Fit(trainData).Transform(trainData);

Note the underscores in the middle of a variable name. While in private we might elect to bend the rules a little bit, in our public API and also probably our samples, we probably ought to write them with consideration of standard practices. This does not seem to be a justifiable or explainable diversion from the recommended practice, and I'm guessing it was added by mistake.

Each individual renaming is probably not huge, but might span several files, since the example listed above is just one of many examples I see in our samples project. So not a "hard" change, except possibly in scale?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationRelated to documentation of ML.NETgood first issueGood for newcomersup-for-grabsA good issue to fix if you are trying to contribute to the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions