本文整理汇总了C#中IDataSet.GetTrainingSamplesCount方法的典型用法代码示例。如果您正苦于以下问题:C# IDataSet.GetTrainingSamplesCount方法的具体用法?C# IDataSet.GetTrainingSamplesCount怎么用?C# IDataSet.GetTrainingSamplesCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataSet
的用法示例。
在下文中一共展示了IDataSet.GetTrainingSamplesCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LogisticRegressionClassifierTraining
public LogisticRegressionClassifierTraining(int featuresCount, double regularizationParameter, IDataSet<bool, double> dataSet)
{
if (featuresCount <= 0)
{
throw new ArgumentOutOfRangeException("featuresCount", featuresCount, "Features count must be positive number.");
}
if (regularizationParameter < 0)
{
throw new ArgumentOutOfRangeException("regularizationParameter", regularizationParameter, "Regularization parameter must be non negative number.");
}
if (dataSet == null)
{
throw new ArgumentNullException("dataSet");
}
this.featuresCount = featuresCount;
this.regularizationParameter = regularizationParameter;
this.dataSet = dataSet;
this.samplesCount = dataSet.GetTrainingSamplesCount();
if (this.samplesCount <= 0)
{
throw new ArgumentOutOfRangeException("dataSet.GetTrainingSamplesCount()", this.samplesCount, "Samples count must be positive integer.");
}
}