This commit is contained in:
Jonathan Tims 2023-10-05 15:20:37 +01:00
Родитель e941d29a21
Коммит 2fa8e109d7
23 изменённых файлов: 0 добавлений и 350 удалений

Просмотреть файл

@ -527,21 +527,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveBernoulliDistributions,
this.expectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "DenseBinaryNativeClassifier-2015-03-20.bin") };
CheckBinaryNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryNativeMapping,
this.denseNativeTrainingData,
this.denseNativePredictionData,
this.expectedPredictiveBernoulliDistributions,
this.expectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
}
/// <summary>
@ -828,21 +813,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveBernoulliDistributions,
this.expectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "SparseBinaryNativeClassifier-2015-03-20.bin") };
CheckBinaryNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryNativeMapping,
this.sparseNativeTrainingData,
this.sparseNativePredictionData,
this.expectedPredictiveBernoulliDistributions,
this.expectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
}
/// <summary>
@ -1088,21 +1058,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveDiscreteDistributions,
this.expectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "DenseMulticlassNativeClassifier-2015-03-20.bin") };
CheckMulticlassNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassNativeMapping,
this.denseNativeTrainingData,
this.denseNativePredictionData,
this.expectedPredictiveDiscreteDistributions,
this.expectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
}
/// <summary>
@ -1371,21 +1326,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveDiscreteDistributions,
this.expectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "SparseMulticlassNativeClassifier-2015-03-20.bin") };
CheckMulticlassNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassNativeMapping,
this.sparseNativeTrainingData,
this.sparseNativePredictionData,
this.expectedPredictiveDiscreteDistributions,
this.expectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
}
/// <summary>
@ -1582,21 +1522,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveBernoulliStandardDistributions,
this.expectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "DenseBinaryStandardClassifier-2015-03-20.bin") };
CheckBinaryStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryStandardMapping,
this.denseStandardTrainingData,
this.denseStandardPredictionData,
this.expectedPredictiveBernoulliStandardDistributions,
this.expectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
}
/// <summary>
@ -1863,21 +1788,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveBernoulliStandardDistributions,
this.expectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "SparseBinaryStandardClassifier-2015-03-20.bin") };
CheckBinaryStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryStandardMapping,
this.sparseStandardTrainingData,
this.sparseStandardPredictionData,
this.expectedPredictiveBernoulliStandardDistributions,
this.expectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
}
/// <summary>
@ -2087,21 +1997,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveDiscreteStandardDistributions,
this.expectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "DenseMulticlassStandardClassifier-2015-03-20.bin") };
CheckMulticlassStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassStandardMapping,
this.denseStandardTrainingData,
this.denseStandardPredictionData,
this.expectedPredictiveDiscreteStandardDistributions,
this.expectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
}
/// <summary>
@ -2330,21 +2225,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.expectedPredictiveDiscreteStandardDistributions,
this.expectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "SparseMulticlassStandardClassifier-2015-03-20.bin") };
CheckMulticlassStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassStandardMapping,
this.sparseStandardTrainingData,
this.sparseStandardPredictionData,
this.expectedPredictiveDiscreteStandardDistributions,
this.expectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
}
/// <summary>
@ -2584,21 +2464,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveBernoulliDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorDenseBinaryNativeClassifier-2015-03-20.bin") };
CheckGaussianPriorBinaryNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryNativeMapping,
this.denseNativeTrainingData,
this.denseNativePredictionData,
this.gaussianPriorExpectedPredictiveBernoulliDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
}
/// <summary>
@ -2855,21 +2720,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveBernoulliDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorSparseBinaryNativeClassifier-2015-03-20.bin") };
CheckGaussianPriorBinaryNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryNativeMapping,
this.sparseNativeTrainingData,
this.sparseNativePredictionData,
this.gaussianPriorExpectedPredictiveBernoulliDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliDistributions,
CheckPredictedBernoulliDistributionNativeTestingDataset);
}
/// <summary>
@ -3116,21 +2966,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveDiscreteDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorDenseMulticlassNativeClassifier-2015-03-20.bin") };
CheckGaussianPriorMulticlassNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassNativeMapping,
this.denseNativeTrainingData,
this.denseNativePredictionData,
this.gaussianPriorExpectedPredictiveDiscreteDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
}
/// <summary>
@ -3400,21 +3235,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveDiscreteDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorSparseMulticlassNativeClassifier-2015-03-20.bin") };
CheckGaussianPriorMulticlassNativeClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassNativeMapping,
this.sparseNativeTrainingData,
this.sparseNativePredictionData,
this.gaussianPriorExpectedPredictiveDiscreteDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteDistributions,
CheckPredictedDiscreteDistributionNativeTestingDataset);
}
/// <summary>
@ -3612,21 +3432,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveBernoulliStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorDenseBinaryStandardClassifier-2015-03-20.bin") };
CheckGaussianPriorBinaryStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryStandardMapping,
this.denseStandardTrainingData,
this.denseStandardPredictionData,
this.gaussianPriorExpectedPredictiveBernoulliStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
}
/// <summary>
@ -3846,21 +3651,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveBernoulliStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorSparseBinaryStandardClassifier-2015-03-20.bin") };
CheckGaussianPriorBinaryStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.binaryStandardMapping,
this.sparseStandardTrainingData,
this.sparseStandardPredictionData,
this.gaussianPriorExpectedPredictiveBernoulliStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveBernoulliStandardDistributions,
CheckPredictedBernoulliDistributionStandardTestingDataset);
}
/// <summary>
@ -4071,21 +3861,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveDiscreteStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorDenseMulticlassStandardClassifier-2015-03-20.bin") };
CheckGaussianPriorMulticlassStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassStandardMapping,
this.denseStandardTrainingData,
this.denseStandardPredictionData,
this.gaussianPriorExpectedPredictiveDiscreteStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
}
/// <summary>
@ -4315,21 +4090,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
this.gaussianPriorExpectedPredictiveDiscreteStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
// Ensure backward compatibility for all classifier versions
string[] serializedClassifiers = { Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(BayesPointMachineClassifierTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-03-20", "GaussianPriorSparseMulticlassStandardClassifier-2015-03-20.bin") };
CheckGaussianPriorMulticlassStandardClassiferCustomSerializationBackwardCompatibility(
serializedClassifiers,
this.multiclassStandardMapping,
this.sparseStandardTrainingData,
this.sparseStandardPredictionData,
this.gaussianPriorExpectedPredictiveDiscreteStandardDistributions,
this.gaussianPriorExpectedIncrementalPredictiveDiscreteStandardDistributions,
CheckPredictedDiscreteDistributionStandardTestingDataset);
}
/// <summary>

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -64,66 +64,6 @@
<ProjectReference Include="..\..\..\src\Learners\Runners\Common\Common.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="CustomSerializedLearners\2015-03-20\SparseBinaryNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\DenseBinaryNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\DenseMulticlassNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\SparseMulticlassNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\DenseBinaryStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\SparseBinaryStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\DenseMulticlassStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\SparseMulticlassStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorDenseBinaryNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorSparseBinaryNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorDenseMulticlassStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorSparseMulticlassStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorDenseMulticlassNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorSparseMulticlassNativeClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorDenseBinaryStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-03-20\GaussianPriorSparseBinaryStandardClassifier-2015-03-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-11-20\NativeRecommender-2015-11-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2015-11-20\StandardRecommender-2015-11-20.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2018-07-27\NativeRecommender-2018-07-27.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="CustomSerializedLearners\2018-07-27\StandardRecommender-2018-07-27.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Data\W5ANormalized.csv.gz">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

Просмотреть файл

@ -824,32 +824,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
// Check that trained classifier still protects settings
Assert.Throws<InvalidOperationException>(() => { trainedRecommender.Settings.Training.IterationCount = 10; }); // Guarded: Throw
}
{
// Ensure backward compatibility for all recommender versions
string[] serializedRecommenderFileNames =
{
Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(MatchboxRecommenderTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-11-20", "NativeRecommender-2015-11-20.bin"),
Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(MatchboxRecommenderTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2018-07-27", "NativeRecommender-2018-07-27.bin")
};
foreach (var recommenderFileName in serializedRecommenderFileNames)
{
var deserializedRecommender = MatchboxRecommender.LoadBackwardCompatible(recommenderFileName, this.nativeMapping);
this.VerifyNativeRatingDistributionOfUserOneAndItemThree(deserializedRecommender.PredictDistribution(1, 3, this.nativeTrainingData));
Assert.Equal(MaxStarRating - MinStarRating, deserializedRecommender.Predict(1, 3, this.nativeTrainingData));
Assert.Throws<InvalidOperationException>(() => { deserializedRecommender.Settings.Training.IterationCount = 10; }); // Guarded: Throw
}
}
}
/// <summary>
@ -907,30 +881,6 @@ namespace Microsoft.ML.Probabilistic.Learners.Tests
// Check that trained classifier still protects settings
Assert.Throws<InvalidOperationException>(() => { trainedRecommender.Settings.Training.IterationCount = 10; }); // Guarded: Throw
}
{
// Ensure backward compatibility for all recommender versions
string[] serializedRecommenderFileNames =
{
Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(MatchboxRecommenderTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2015-11-20", "StandardRecommender-2015-11-20.bin"),
Path.Combine(
#if NETCOREAPP
Path.GetDirectoryName(typeof(MatchboxRecommenderTests).Assembly.Location), // work dir is not the one with Microsoft.ML.Probabilistic.Learners.Tests.dll on netcore and neither is .Location on netfull
#endif
"CustomSerializedLearners", "2018-07-27", "StandardRecommender-2018-07-27.bin")
};
foreach (var recommenderFileName in serializedRecommenderFileNames)
{
var deserializedRecommender = MatchboxRecommender.LoadBackwardCompatible(recommenderFileName, this.standardMapping);
CheckStandardRatingPrediction(deserializedRecommender, this.standardTrainingDataFeatures);
Assert.Throws<InvalidOperationException>(() => { deserializedRecommender.Settings.Training.IterationCount = 10; }); // Guarded: Throw
}
}
}
/// <summary>