Skip to content

Fixed all typos in word Transform. #463

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
merged 4 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Microsoft.ML.PipelineInference/RecipeInference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ public abstract class Recipe
public virtual List<Type> AllowedPredictorTypes() => MacroUtils.PredictorTypes.ToList();

protected virtual TransformInference.SuggestedTransform[] GetSuggestedTransforms(
TransformInference.InferenceResult tranformInferenceResult, Type predictorType)
TransformInference.InferenceResult transformInferenceResult, Type predictorType)
{
List<Type> allowedTransforms = AllowedTransforms();
List<Type> qualifierTransforms = QualifierTransforms();

if (AllowedPredictorTypes().Any(type => type == predictorType) &&
tranformInferenceResult.SuggestedTransforms.Any(transform => qualifierTransforms.Contains(transform.ExpertType)))
transformInferenceResult.SuggestedTransforms.Any(transform => qualifierTransforms.Contains(transform.ExpertType)))
{
return tranformInferenceResult.SuggestedTransforms
return transformInferenceResult.SuggestedTransforms
.Where(transform => allowedTransforms.Contains(transform.ExpertType) || qualifierTransforms.Contains(transform.ExpertType))
.ToArray();
}
Expand All @@ -174,10 +174,10 @@ protected virtual TransformInference.SuggestedTransform[] GetSuggestedTransforms
}

public virtual IEnumerable<SuggestedRecipe> Apply(
TransformInference.InferenceResult tranformInferenceResult, Type predictorType, IChannel ch)
TransformInference.InferenceResult transformInferenceResult, Type predictorType, IChannel ch)
{
TransformInference.SuggestedTransform[] transforms = GetSuggestedTransforms(
tranformInferenceResult, predictorType);
transformInferenceResult, predictorType);

if (transforms?.Length > 0)
{
Expand Down Expand Up @@ -431,7 +431,7 @@ public static SuggestedRecipe[] InferRecipesFromData(IHostEnvironment env, strin
}
}

public static InferenceResult InferRecipes(IHostEnvironment env, TransformInference.InferenceResult tranformInferenceResult,
public static InferenceResult InferRecipes(IHostEnvironment env, TransformInference.InferenceResult transformInferenceResult,
Type predictorType)
{
Contracts.CheckValue(env, nameof(env));
Expand All @@ -441,7 +441,7 @@ public static InferenceResult InferRecipes(IHostEnvironment env, TransformInfere
{
var list = new List<SuggestedRecipe>();
foreach (var recipe in GetRecipes())
list.AddRange(recipe.Apply(tranformInferenceResult, predictorType, ch));
list.AddRange(recipe.Apply(transformInferenceResult, predictorType, ch));

if (list.Count == 0)
ch.Info("No recipes are needed for the data.");
Expand Down
16 changes: 8 additions & 8 deletions src/Microsoft.ML.PipelineInference/TransformInference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ public static StringBuilder GetTextTransformBigramTriCharArgument(string columnN
}

public static SuggestedTransform ConcatColumnsIntoOne(List<string> columnNames, string concatColumnName,
Type tranformType, bool isNumeric)
Type transformType, bool isNumeric)
{
StringBuilder columnArgument = new StringBuilder();
StringBuilder columnNameQuoted = new StringBuilder();
Expand Down Expand Up @@ -843,10 +843,10 @@ public static SuggestedTransform ConcatColumnsIntoOne(List<string> columnNames,
new SuggestedTransform(
$"Concatenate {columnsToConcat} columns into column {concatColumnName}",
new SubComponent<IDataTransform, SignatureDataTransform>("Concat",
new[] { arguments }), tranformType, new TransformPipelineNode(epInput), -1, routingStructure);
new[] { arguments }), transformType, new TransformPipelineNode(epInput), -1, routingStructure);
}

public static SuggestedTransform TextTransformUnigramTriChar(string srcColumn, string dstColumn, string arg, Type tranformType)
public static SuggestedTransform TextTransformUnigramTriChar(string srcColumn, string dstColumn, string arg, Type transformType)
{
StringBuilder columnArgument = InferenceHelpers.GetTextTransformUnigramTriCharArgument(srcColumn, dstColumn);

Expand All @@ -862,10 +862,10 @@ public static SuggestedTransform TextTransformUnigramTriChar(string srcColumn, s
};

return TextTransform(srcColumn, dstColumn, columnArgument.ToString(), "Unigram plus Trichar",
tranformType, new TransformPipelineNode(nodeInput));
transformType, new TransformPipelineNode(nodeInput));
}

public static SuggestedTransform TextTransformBigramTriChar(string srcColumn, string dstColumn, string arg, Type tranformType)
public static SuggestedTransform TextTransformBigramTriChar(string srcColumn, string dstColumn, string arg, Type transformType)
{
StringBuilder columnArgument = InferenceHelpers.GetTextTransformBigramTriCharArgument(srcColumn, dstColumn);

Expand All @@ -880,11 +880,11 @@ public static SuggestedTransform TextTransformBigramTriChar(string srcColumn, st
};

return TextTransform(srcColumn, dstColumn, columnArgument.ToString(), "Bigram plus Trichar",
tranformType, new TransformPipelineNode(nodeInput));
transformType, new TransformPipelineNode(nodeInput));
}

public static SuggestedTransform TextTransform(string srcColumn, string dstColumn, string arg,
string outputMsg, Type tranformType, TransformPipelineNode pipelineNode)
string outputMsg, Type transformType, TransformPipelineNode pipelineNode)
{
ColumnRoutingStructure.AnnotatedName[] columnsSource =
{ new ColumnRoutingStructure.AnnotatedName { IsNumeric = false, Name = srcColumn } };
Expand All @@ -898,7 +898,7 @@ public static SuggestedTransform TextTransform(string srcColumn, string dstColum
") for column '{0}' and output to column '{1}'",
srcColumn, dstColumn),
new SubComponent<IDataTransform, SignatureDataTransform>("Text", arg),
tranformType, pipelineNode, -1, routingStructure);
transformType, pipelineNode, -1, routingStructure);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Transforms/CategoricalTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static IDataTransform CreateTransformCore(
Contracts.CheckValue(columnOutputKinds, nameof(columnOutputKinds));
Contracts.CheckParam(columns.Length == columnOutputKinds.Count, nameof(columns));

using (var ch = h.Start("Create Tranform Core"))
using (var ch = h.Start("Create Transform Core"))
{
// Create the KeyToVectorTransform, if needed.
List<KeyToVectorTransform.Column> cols = new List<KeyToVectorTransform.Column>();
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML/ILearningPipelineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public interface ILearningPipelineLoader : ILearningPipelineItem

/// <summary>
/// An item that can be added to the Learning Pipeline that can be trained and or return a IDataView.
/// This encapsulates an IDataView(input) and ITranformModel(output) object for a transform and
/// This encapsulates an IDataView(input) and ITransformModel(output) object for a transform and
/// for a learner it will encapsulate IDataView(input) and IPredictorModel(output).
/// </summary>
public interface ILearningPipelineStep
Expand Down