using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace BotSharp.MachineLearning.CRFLite.Encoder
{
public class EncoderOptions
{
///
/// Maximum iteration
///
public int MaxIteration { get; set; }
///
/// Minimum feature frequency, if one feature's frequency is less than this value, the feature will be dropped.
///
public int MinFeatureFreq = 2;
///
/// Minimum diff value, when diff less than the value consecutive 3 times, the process will be ended.
///
public double MinDifference;
///
/// The maximum slot usage rate threshold when building feature set.
///
public double SlotUsageRateThreshold { get; set; }
///
/// The amount of threads used to train model.
///
public int ThreadsNum { get; set; }
///
/// Regularization type
///
public CRFEncoder.REG_TYPE RegType { get; set; }
///
/// Template file name
///
[Required]
public string TemplateFileName { get; set; }
///
/// Training corpus file name
///
[Required]
public string TrainingCorpusFileName { get; set; }
///
/// Encoded model file name
///
[Required]
public string ModelFileName { get; set; }
///
/// The model file name for re-training
///
public string RetrainModelFileName { get; set; }
///
/// Debug level
///
public int DebugLevel { get; set; }
///
///
///
public uint HugeLexMemLoad { get; set; }
///
/// cost factor, too big or small value may lead encoded model over tune or under tune
///
public double CostFactor { get; set; }
///
/// If we build vector quantization model for feature weights
///
public bool BVQ { get; set; }
public EncoderOptions()
{
MaxIteration = 100;
MinFeatureFreq = 2;
MinDifference = 0.0001;
SlotUsageRateThreshold = 0.95;
ThreadsNum = 1;
RegType = CRFEncoder.REG_TYPE.L2;
CostFactor = 1.0;
}
}
}