Skip to content

Commit

Permalink
Towards 2326: Microsoft.ML.Ensemble and Microsoft.ML.TimeSeries names…
Browse files Browse the repository at this point in the history
…pace rationalization (#2491)

* moving Microsoft.ML.TimeSeriesProcessing, and Microsoft.ML.TimeSeries to Microsoft.ML.Transforms.TimeSeries

* Microsoft.ML.Ensemble to Microsoft.ML.Trainers.Ensemble
  • Loading branch information
sfilipi committed Feb 12, 2019
1 parent 8444a5a commit f269adc
Show file tree
Hide file tree
Showing 103 changed files with 224 additions and 253 deletions.
Expand Up @@ -5,11 +5,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.ML.Core.Data;
using Microsoft.ML.Data;
using Microsoft.ML.TimeSeries;
using Microsoft.ML.TimeSeriesProcessing;
using Microsoft.ML.Transforms.TimeSeries;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.ML.Core.Data;
using Microsoft.ML.Data;
using Microsoft.ML.TimeSeries;
using Microsoft.ML.TimeSeriesProcessing;
using Microsoft.ML.Transforms.TimeSeries;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.ML.Core.Data;
using Microsoft.ML.Data;
using Microsoft.ML.TimeSeries;
using Microsoft.ML.TimeSeriesProcessing;
using Microsoft.ML.Transforms.TimeSeries;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.ML.Core.Data;
using Microsoft.ML.Data;
using Microsoft.ML.TimeSeries;
using Microsoft.ML.TimeSeriesProcessing;
using Microsoft.ML.Transforms.TimeSeries;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Ensemble/Batch.cs
Expand Up @@ -4,7 +4,7 @@

using Microsoft.ML.Data;

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
internal sealed class Batch
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Ensemble/EnsembleUtils.cs
Expand Up @@ -7,7 +7,7 @@
using Microsoft.ML.Data;
using Microsoft.ML.Internal.Utilities;

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
internal static class EnsembleUtils
{
Expand Down
5 changes: 2 additions & 3 deletions src/Microsoft.ML.Ensemble/EntryPoints/CreateEnsemble.cs
Expand Up @@ -10,14 +10,13 @@
using Microsoft.ML;
using Microsoft.ML.CommandLine;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(void), typeof(EnsembleCreator), null, typeof(SignatureEntryPointModule), "CreateEnsemble")]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
/// <summary>
/// A component to combine given models into an ensemble model.
Expand Down
7 changes: 3 additions & 4 deletions src/Microsoft.ML.Ensemble/EntryPoints/DiversityMeasure.cs
Expand Up @@ -2,16 +2,15 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.ML.Ensemble;
using Microsoft.ML.Ensemble.Selector;
using Microsoft.ML.Ensemble.Selector.DiversityMeasure;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Trainers.Ensemble;
using Microsoft.ML.Trainers.Ensemble.DiversityMeasure;

[assembly: EntryPointModule(typeof(DisagreementDiversityFactory))]
[assembly: EntryPointModule(typeof(RegressionDisagreementDiversityFactory))]
[assembly: EntryPointModule(typeof(MultiDisagreementDiversityFactory))]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
[TlcModule.Component(Name = DisagreementDiversityMeasure.LoadName, FriendlyName = DisagreementDiversityMeasure.UserName)]
internal sealed class DisagreementDiversityFactory : ISupportBinaryDiversityMeasureFactory
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs
Expand Up @@ -3,12 +3,12 @@
// See the LICENSE file in the project root for more information.

using Microsoft.ML;
using Microsoft.ML.Ensemble;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(void), typeof(Ensemble), null, typeof(SignatureEntryPointModule), "TrainEnsemble")]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
internal static class Ensemble
{
Expand Down
7 changes: 3 additions & 4 deletions src/Microsoft.ML.Ensemble/EntryPoints/FeatureSelector.cs
Expand Up @@ -2,15 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.ML.Ensemble;
using Microsoft.ML.Ensemble.Selector;
using Microsoft.ML.Ensemble.Selector.FeatureSelector;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Trainers.Ensemble;
using Microsoft.ML.Trainers.Ensemble.FeatureSelector;

[assembly: EntryPointModule(typeof(AllFeatureSelectorFactory))]
[assembly: EntryPointModule(typeof(RandomFeatureSelector))]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
[TlcModule.Component(Name = AllFeatureSelector.LoadName, FriendlyName = AllFeatureSelector.UserName)]
public sealed class AllFeatureSelectorFactory : ISupportFeatureSelectorFactory
Expand Down
5 changes: 2 additions & 3 deletions src/Microsoft.ML.Ensemble/EntryPoints/OutputCombiner.cs
Expand Up @@ -2,9 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.ML.Ensemble;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Trainers.Ensemble;

[assembly: EntryPointModule(typeof(AverageFactory))]
[assembly: EntryPointModule(typeof(MedianFactory))]
Expand All @@ -18,7 +17,7 @@
[assembly: EntryPointModule(typeof(VotingFactory))]
[assembly: EntryPointModule(typeof(WeightedAverage))]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
[TlcModule.Component(Name = Average.LoadName, FriendlyName = Average.UserName)]
public sealed class AverageFactory : ISupportBinaryOutputCombinerFactory, ISupportRegressionOutputCombinerFactory
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/EntryPoints/PipelineEnsemble.cs
Expand Up @@ -4,13 +4,13 @@

using Microsoft.Data.DataView;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Calibration;
using Microsoft.ML.Trainers.Ensemble;

[assembly: EntryPointModule(typeof(PipelineEnsemble))]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
internal static class PipelineEnsemble
{
Expand Down
7 changes: 3 additions & 4 deletions src/Microsoft.ML.Ensemble/EntryPoints/SubModelSelector.cs
Expand Up @@ -2,10 +2,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.ML.Ensemble;
using Microsoft.ML.Ensemble.Selector;
using Microsoft.ML.Ensemble.Selector.SubModelSelector;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Trainers.Ensemble;
using Microsoft.ML.Trainers.Ensemble.SubModelSelector;

[assembly: EntryPointModule(typeof(AllSelectorFactory))]
[assembly: EntryPointModule(typeof(AllSelectorMultiClassFactory))]
Expand All @@ -16,7 +15,7 @@
[assembly: EntryPointModule(typeof(BestPerformanceSelector))]
[assembly: EntryPointModule(typeof(BestPerformanceSelectorMultiClass))]

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
[TlcModule.Component(Name = AllSelector.LoadName, FriendlyName = AllSelector.UserName)]
public sealed class AllSelectorFactory : ISupportBinarySubModelSelectorFactory, ISupportRegressionSubModelSelectorFactory
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Ensemble/FeatureSubsetModel.cs
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Microsoft.ML.Internal.Utilities;

namespace Microsoft.ML.Ensemble
namespace Microsoft.ML.Trainers.Ensemble
{
internal sealed class FeatureSubsetModel<TOutput>
{
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/OutputCombiners/Average.cs
Expand Up @@ -4,13 +4,13 @@

using System;
using Microsoft.ML;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.Model;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(Average), null, typeof(SignatureCombiner), Average.UserName)]
[assembly: LoadableClass(typeof(Average), null, typeof(SignatureLoadModel), Average.UserName, Average.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
public sealed class Average : BaseAverager, IRegressionOutputCombiner
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Ensemble/OutputCombiners/BaseAverager.cs
Expand Up @@ -5,7 +5,7 @@
using System;
using Microsoft.ML.Model;

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
public abstract class BaseAverager : IBinaryOutputCombiner, ICanSaveModel
{
Expand Down
Expand Up @@ -8,7 +8,7 @@
using Microsoft.ML.Model;
using Microsoft.ML.Numeric;

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
public abstract class BaseMultiAverager : BaseMultiCombiner
{
Expand Down
Expand Up @@ -9,7 +9,7 @@
using Microsoft.ML.Model;
using Microsoft.ML.Numeric;

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
public abstract class BaseMultiCombiner : IMultiClassOutputCombiner, ICanSaveModel
{
Expand Down
Expand Up @@ -7,7 +7,7 @@
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
internal abstract class BaseScalarStacking : BaseStacking<Single>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs
Expand Up @@ -13,7 +13,7 @@
using Microsoft.ML.Model;
using Microsoft.ML.Training;

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
internal abstract class BaseStacking<TOutput> : IStackingTrainer<TOutput>, ICanSaveModel
{
Expand Down
Expand Up @@ -7,7 +7,7 @@
using Microsoft.ML.Data;
using Microsoft.ML.EntryPoints;

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
/// <summary>
/// Signature for combiners.
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/OutputCombiners/Median.cs
Expand Up @@ -4,14 +4,14 @@

using System;
using Microsoft.ML;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(Median), null, typeof(SignatureCombiner), Median.UserName, Median.LoadName)]
[assembly: LoadableClass(typeof(Median), null, typeof(SignatureLoadModel), Median.UserName, Median.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
/// <summary>
/// Generic interface for combining outputs of multiple models
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/OutputCombiners/MultiAverage.cs
Expand Up @@ -5,16 +5,16 @@
using System;
using Microsoft.ML;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Model;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(MultiAverage), typeof(MultiAverage.Arguments), typeof(SignatureCombiner),
Average.UserName, MultiAverage.LoadName)]
[assembly: LoadableClass(typeof(MultiAverage), null, typeof(SignatureLoadModel), Average.UserName,
MultiAverage.LoadName, MultiAverage.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
public sealed class MultiAverage : BaseMultiAverager
{
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs
Expand Up @@ -5,16 +5,16 @@
using System;
using Microsoft.ML;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(MultiMedian), typeof(MultiMedian.Arguments), typeof(SignatureCombiner),
Median.UserName, MultiMedian.LoadName)]
[assembly: LoadableClass(typeof(MultiMedian), null, typeof(SignatureLoadModel), Median.UserName, MultiMedian.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
/// <summary>
/// Generic interface for combining outputs of multiple models
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs
Expand Up @@ -6,18 +6,18 @@
using Microsoft.ML;
using Microsoft.ML.CommandLine;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Internallearn;
using Microsoft.ML.Model;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(MultiStacking), typeof(MultiStacking.Arguments), typeof(SignatureCombiner),
Stacking.UserName, MultiStacking.LoadName)]

[assembly: LoadableClass(typeof(MultiStacking), null, typeof(SignatureLoadModel),
Stacking.UserName, MultiStacking.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
using TVectorPredictor = IPredictorProducing<VBuffer<Single>>;
internal sealed class MultiStacking : BaseStacking<VBuffer<Single>>, IMultiClassOutputCombiner
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs
Expand Up @@ -5,15 +5,15 @@
using System;
using Microsoft.ML;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Numeric;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(MultiVoting), null, typeof(SignatureCombiner), Voting.UserName, MultiVoting.LoadName)]
[assembly: LoadableClass(typeof(MultiVoting), null, typeof(SignatureLoadModel), Voting.UserName, MultiVoting.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
// REVIEW: Why is MultiVoting based on BaseMultiCombiner? Normalizing the model outputs
// is senseless, so the base adds no real functionality.
Expand Down
Expand Up @@ -6,18 +6,18 @@
using Microsoft.ML;
using Microsoft.ML.CommandLine;
using Microsoft.ML.Data;
using Microsoft.ML.Ensemble.OutputCombiners;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Internallearn;
using Microsoft.ML.Model;
using Microsoft.ML.Trainers.Ensemble;

[assembly: LoadableClass(typeof(MultiWeightedAverage), typeof(MultiWeightedAverage.Arguments), typeof(SignatureCombiner),
MultiWeightedAverage.UserName, MultiWeightedAverage.LoadName)]

[assembly: LoadableClass(typeof(MultiWeightedAverage), null, typeof(SignatureLoadModel),
MultiWeightedAverage.UserName, MultiWeightedAverage.LoaderSignature)]

namespace Microsoft.ML.Ensemble.OutputCombiners
namespace Microsoft.ML.Trainers.Ensemble
{
/// <summary>
/// Generic interface for combining outputs of multiple models
Expand Down

0 comments on commit f269adc

Please sign in to comment.