Skip to content

Commit f269adc

Browse files
authored
Towards 2326: Microsoft.ML.Ensemble and Microsoft.ML.TimeSeries namespace rationalization (#2491)
* moving Microsoft.ML.TimeSeriesProcessing, and Microsoft.ML.TimeSeries to Microsoft.ML.Transforms.TimeSeries * Microsoft.ML.Ensemble to Microsoft.ML.Trainers.Ensemble
1 parent 8444a5a commit f269adc

File tree

103 files changed

+224
-253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+224
-253
lines changed

docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
using System;
66
using System.Collections.Generic;
77
using System.IO;
8-
using System.Linq;
98
using Microsoft.ML.Core.Data;
109
using Microsoft.ML.Data;
11-
using Microsoft.ML.TimeSeries;
12-
using Microsoft.ML.TimeSeriesProcessing;
10+
using Microsoft.ML.Transforms.TimeSeries;
1311

1412
namespace Microsoft.ML.Samples.Dynamic
1513
{

docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4-
using System.Linq;
54
using Microsoft.ML.Core.Data;
65
using Microsoft.ML.Data;
7-
using Microsoft.ML.TimeSeries;
8-
using Microsoft.ML.TimeSeriesProcessing;
6+
using Microsoft.ML.Transforms.TimeSeries;
97

108
namespace Microsoft.ML.Samples.Dynamic
119
{

docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4-
using System.Linq;
54
using Microsoft.ML.Core.Data;
65
using Microsoft.ML.Data;
7-
using Microsoft.ML.TimeSeries;
8-
using Microsoft.ML.TimeSeriesProcessing;
6+
using Microsoft.ML.Transforms.TimeSeries;
97

108
namespace Microsoft.ML.Samples.Dynamic
119
{

docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4-
using System.Linq;
54
using Microsoft.ML.Core.Data;
65
using Microsoft.ML.Data;
7-
using Microsoft.ML.TimeSeries;
8-
using Microsoft.ML.TimeSeriesProcessing;
6+
using Microsoft.ML.Transforms.TimeSeries;
97

108
namespace Microsoft.ML.Samples.Dynamic
119
{

src/Microsoft.ML.Ensemble/Batch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
using Microsoft.ML.Data;
66

7-
namespace Microsoft.ML.Ensemble
7+
namespace Microsoft.ML.Trainers.Ensemble
88
{
99
internal sealed class Batch
1010
{

src/Microsoft.ML.Ensemble/EnsembleUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.ML.Data;
88
using Microsoft.ML.Internal.Utilities;
99

10-
namespace Microsoft.ML.Ensemble
10+
namespace Microsoft.ML.Trainers.Ensemble
1111
{
1212
internal static class EnsembleUtils
1313
{

src/Microsoft.ML.Ensemble/EntryPoints/CreateEnsemble.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
using Microsoft.ML;
1111
using Microsoft.ML.CommandLine;
1212
using Microsoft.ML.Data;
13-
using Microsoft.ML.Ensemble;
14-
using Microsoft.ML.Ensemble.OutputCombiners;
1513
using Microsoft.ML.EntryPoints;
1614
using Microsoft.ML.Internal.Utilities;
15+
using Microsoft.ML.Trainers.Ensemble;
1716

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

20-
namespace Microsoft.ML.Ensemble
19+
namespace Microsoft.ML.Trainers.Ensemble
2120
{
2221
/// <summary>
2322
/// A component to combine given models into an ensemble model.

src/Microsoft.ML.Ensemble/EntryPoints/DiversityMeasure.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.ML.Ensemble;
6-
using Microsoft.ML.Ensemble.Selector;
7-
using Microsoft.ML.Ensemble.Selector.DiversityMeasure;
85
using Microsoft.ML.EntryPoints;
6+
using Microsoft.ML.Trainers.Ensemble;
7+
using Microsoft.ML.Trainers.Ensemble.DiversityMeasure;
98

109
[assembly: EntryPointModule(typeof(DisagreementDiversityFactory))]
1110
[assembly: EntryPointModule(typeof(RegressionDisagreementDiversityFactory))]
1211
[assembly: EntryPointModule(typeof(MultiDisagreementDiversityFactory))]
1312

14-
namespace Microsoft.ML.Ensemble
13+
namespace Microsoft.ML.Trainers.Ensemble
1514
{
1615
[TlcModule.Component(Name = DisagreementDiversityMeasure.LoadName, FriendlyName = DisagreementDiversityMeasure.UserName)]
1716
internal sealed class DisagreementDiversityFactory : ISupportBinaryDiversityMeasureFactory

src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// See the LICENSE file in the project root for more information.
44

55
using Microsoft.ML;
6-
using Microsoft.ML.Ensemble;
76
using Microsoft.ML.EntryPoints;
7+
using Microsoft.ML.Trainers.Ensemble;
88

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

11-
namespace Microsoft.ML.Ensemble
11+
namespace Microsoft.ML.Trainers.Ensemble
1212
{
1313
internal static class Ensemble
1414
{

src/Microsoft.ML.Ensemble/EntryPoints/FeatureSelector.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.ML.Ensemble;
6-
using Microsoft.ML.Ensemble.Selector;
7-
using Microsoft.ML.Ensemble.Selector.FeatureSelector;
85
using Microsoft.ML.EntryPoints;
6+
using Microsoft.ML.Trainers.Ensemble;
7+
using Microsoft.ML.Trainers.Ensemble.FeatureSelector;
98

109
[assembly: EntryPointModule(typeof(AllFeatureSelectorFactory))]
1110
[assembly: EntryPointModule(typeof(RandomFeatureSelector))]
1211

13-
namespace Microsoft.ML.Ensemble
12+
namespace Microsoft.ML.Trainers.Ensemble
1413
{
1514
[TlcModule.Component(Name = AllFeatureSelector.LoadName, FriendlyName = AllFeatureSelector.UserName)]
1615
public sealed class AllFeatureSelectorFactory : ISupportFeatureSelectorFactory

src/Microsoft.ML.Ensemble/EntryPoints/OutputCombiner.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.ML.Ensemble;
6-
using Microsoft.ML.Ensemble.OutputCombiners;
75
using Microsoft.ML.EntryPoints;
6+
using Microsoft.ML.Trainers.Ensemble;
87

98
[assembly: EntryPointModule(typeof(AverageFactory))]
109
[assembly: EntryPointModule(typeof(MedianFactory))]
@@ -18,7 +17,7 @@
1817
[assembly: EntryPointModule(typeof(VotingFactory))]
1918
[assembly: EntryPointModule(typeof(WeightedAverage))]
2019

21-
namespace Microsoft.ML.Ensemble
20+
namespace Microsoft.ML.Trainers.Ensemble
2221
{
2322
[TlcModule.Component(Name = Average.LoadName, FriendlyName = Average.UserName)]
2423
public sealed class AverageFactory : ISupportBinaryOutputCombinerFactory, ISupportRegressionOutputCombinerFactory

src/Microsoft.ML.Ensemble/EntryPoints/PipelineEnsemble.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
using Microsoft.Data.DataView;
66
using Microsoft.ML.Data;
7-
using Microsoft.ML.Ensemble;
87
using Microsoft.ML.EntryPoints;
98
using Microsoft.ML.Internal.Calibration;
9+
using Microsoft.ML.Trainers.Ensemble;
1010

1111
[assembly: EntryPointModule(typeof(PipelineEnsemble))]
1212

13-
namespace Microsoft.ML.Ensemble
13+
namespace Microsoft.ML.Trainers.Ensemble
1414
{
1515
internal static class PipelineEnsemble
1616
{

src/Microsoft.ML.Ensemble/EntryPoints/SubModelSelector.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.ML.Ensemble;
6-
using Microsoft.ML.Ensemble.Selector;
7-
using Microsoft.ML.Ensemble.Selector.SubModelSelector;
85
using Microsoft.ML.EntryPoints;
6+
using Microsoft.ML.Trainers.Ensemble;
7+
using Microsoft.ML.Trainers.Ensemble.SubModelSelector;
98

109
[assembly: EntryPointModule(typeof(AllSelectorFactory))]
1110
[assembly: EntryPointModule(typeof(AllSelectorMultiClassFactory))]
@@ -16,7 +15,7 @@
1615
[assembly: EntryPointModule(typeof(BestPerformanceSelector))]
1716
[assembly: EntryPointModule(typeof(BestPerformanceSelectorMultiClass))]
1817

19-
namespace Microsoft.ML.Ensemble
18+
namespace Microsoft.ML.Trainers.Ensemble
2019
{
2120
[TlcModule.Component(Name = AllSelector.LoadName, FriendlyName = AllSelector.UserName)]
2221
public sealed class AllSelectorFactory : ISupportBinarySubModelSelectorFactory, ISupportRegressionSubModelSelectorFactory

src/Microsoft.ML.Ensemble/FeatureSubsetModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Collections.Generic;
77
using Microsoft.ML.Internal.Utilities;
88

9-
namespace Microsoft.ML.Ensemble
9+
namespace Microsoft.ML.Trainers.Ensemble
1010
{
1111
internal sealed class FeatureSubsetModel<TOutput>
1212
{

src/Microsoft.ML.Ensemble/OutputCombiners/Average.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
using System;
66
using Microsoft.ML;
7-
using Microsoft.ML.Ensemble.OutputCombiners;
87
using Microsoft.ML.Model;
8+
using Microsoft.ML.Trainers.Ensemble;
99

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

13-
namespace Microsoft.ML.Ensemble.OutputCombiners
13+
namespace Microsoft.ML.Trainers.Ensemble
1414
{
1515
public sealed class Average : BaseAverager, IRegressionOutputCombiner
1616
{

src/Microsoft.ML.Ensemble/OutputCombiners/BaseAverager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using Microsoft.ML.Model;
77

8-
namespace Microsoft.ML.Ensemble.OutputCombiners
8+
namespace Microsoft.ML.Trainers.Ensemble
99
{
1010
public abstract class BaseAverager : IBinaryOutputCombiner, ICanSaveModel
1111
{

src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Microsoft.ML.Model;
99
using Microsoft.ML.Numeric;
1010

11-
namespace Microsoft.ML.Ensemble.OutputCombiners
11+
namespace Microsoft.ML.Trainers.Ensemble
1212
{
1313
public abstract class BaseMultiAverager : BaseMultiCombiner
1414
{

src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Microsoft.ML.Model;
1010
using Microsoft.ML.Numeric;
1111

12-
namespace Microsoft.ML.Ensemble.OutputCombiners
12+
namespace Microsoft.ML.Trainers.Ensemble
1313
{
1414
public abstract class BaseMultiCombiner : IMultiClassOutputCombiner, ICanSaveModel
1515
{

src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.ML.Internal.Utilities;
88
using Microsoft.ML.Model;
99

10-
namespace Microsoft.ML.Ensemble.OutputCombiners
10+
namespace Microsoft.ML.Trainers.Ensemble
1111
{
1212
internal abstract class BaseScalarStacking : BaseStacking<Single>
1313
{

src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using Microsoft.ML.Model;
1414
using Microsoft.ML.Training;
1515

16-
namespace Microsoft.ML.Ensemble.OutputCombiners
16+
namespace Microsoft.ML.Trainers.Ensemble
1717
{
1818
internal abstract class BaseStacking<TOutput> : IStackingTrainer<TOutput>, ICanSaveModel
1919
{

src/Microsoft.ML.Ensemble/OutputCombiners/IOutputCombiner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.ML.Data;
88
using Microsoft.ML.EntryPoints;
99

10-
namespace Microsoft.ML.Ensemble.OutputCombiners
10+
namespace Microsoft.ML.Trainers.Ensemble
1111
{
1212
/// <summary>
1313
/// Signature for combiners.

src/Microsoft.ML.Ensemble/OutputCombiners/Median.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
using System;
66
using Microsoft.ML;
7-
using Microsoft.ML.Ensemble.OutputCombiners;
87
using Microsoft.ML.Internal.Utilities;
98
using Microsoft.ML.Model;
9+
using Microsoft.ML.Trainers.Ensemble;
1010

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

14-
namespace Microsoft.ML.Ensemble.OutputCombiners
14+
namespace Microsoft.ML.Trainers.Ensemble
1515
{
1616
/// <summary>
1717
/// Generic interface for combining outputs of multiple models

src/Microsoft.ML.Ensemble/OutputCombiners/MultiAverage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
using System;
66
using Microsoft.ML;
77
using Microsoft.ML.Data;
8-
using Microsoft.ML.Ensemble.OutputCombiners;
98
using Microsoft.ML.EntryPoints;
109
using Microsoft.ML.Model;
10+
using Microsoft.ML.Trainers.Ensemble;
1111

1212
[assembly: LoadableClass(typeof(MultiAverage), typeof(MultiAverage.Arguments), typeof(SignatureCombiner),
1313
Average.UserName, MultiAverage.LoadName)]
1414
[assembly: LoadableClass(typeof(MultiAverage), null, typeof(SignatureLoadModel), Average.UserName,
1515
MultiAverage.LoadName, MultiAverage.LoaderSignature)]
1616

17-
namespace Microsoft.ML.Ensemble.OutputCombiners
17+
namespace Microsoft.ML.Trainers.Ensemble
1818
{
1919
public sealed class MultiAverage : BaseMultiAverager
2020
{

src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
using System;
66
using Microsoft.ML;
77
using Microsoft.ML.Data;
8-
using Microsoft.ML.Ensemble.OutputCombiners;
98
using Microsoft.ML.EntryPoints;
109
using Microsoft.ML.Internal.Utilities;
1110
using Microsoft.ML.Model;
11+
using Microsoft.ML.Trainers.Ensemble;
1212

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

17-
namespace Microsoft.ML.Ensemble.OutputCombiners
17+
namespace Microsoft.ML.Trainers.Ensemble
1818
{
1919
/// <summary>
2020
/// Generic interface for combining outputs of multiple models

src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
using Microsoft.ML;
77
using Microsoft.ML.CommandLine;
88
using Microsoft.ML.Data;
9-
using Microsoft.ML.Ensemble.OutputCombiners;
109
using Microsoft.ML.EntryPoints;
1110
using Microsoft.ML.Internal.Internallearn;
1211
using Microsoft.ML.Model;
12+
using Microsoft.ML.Trainers.Ensemble;
1313

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

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

20-
namespace Microsoft.ML.Ensemble.OutputCombiners
20+
namespace Microsoft.ML.Trainers.Ensemble
2121
{
2222
using TVectorPredictor = IPredictorProducing<VBuffer<Single>>;
2323
internal sealed class MultiStacking : BaseStacking<VBuffer<Single>>, IMultiClassOutputCombiner

src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
using System;
66
using Microsoft.ML;
77
using Microsoft.ML.Data;
8-
using Microsoft.ML.Ensemble.OutputCombiners;
98
using Microsoft.ML.Internal.Utilities;
109
using Microsoft.ML.Model;
1110
using Microsoft.ML.Numeric;
11+
using Microsoft.ML.Trainers.Ensemble;
1212

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

16-
namespace Microsoft.ML.Ensemble.OutputCombiners
16+
namespace Microsoft.ML.Trainers.Ensemble
1717
{
1818
// REVIEW: Why is MultiVoting based on BaseMultiCombiner? Normalizing the model outputs
1919
// is senseless, so the base adds no real functionality.

src/Microsoft.ML.Ensemble/OutputCombiners/MultiWeightedAverage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
using Microsoft.ML;
77
using Microsoft.ML.CommandLine;
88
using Microsoft.ML.Data;
9-
using Microsoft.ML.Ensemble.OutputCombiners;
109
using Microsoft.ML.EntryPoints;
1110
using Microsoft.ML.Internal.Internallearn;
1211
using Microsoft.ML.Model;
12+
using Microsoft.ML.Trainers.Ensemble;
1313

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

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

20-
namespace Microsoft.ML.Ensemble.OutputCombiners
20+
namespace Microsoft.ML.Trainers.Ensemble
2121
{
2222
/// <summary>
2323
/// Generic interface for combining outputs of multiple models

0 commit comments

Comments
 (0)