本文整理汇总了C#中IInputField类的典型用法代码示例。如果您正苦于以下问题:C# IInputField类的具体用法?C# IInputField怎么用?C# IInputField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IInputField类属于命名空间,在下文中一共展示了IInputField类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OutputFieldGrouped
/// <summary>
/// Construct a grouped output field.
/// </summary>
/// <param name="group">The group that this field belongs to.</param>
/// <param name="sourceField">The source field for this output field.</param>
protected OutputFieldGrouped(IOutputFieldGroup group,
IInputField sourceField)
{
_group = group;
_sourceField = sourceField;
_group.GroupedFields.Add(this);
}
示例2: NominalItem
/// <summary>
/// Create a nominal item.
/// </summary>
/// <param name="inputField">The field that this item is based on.</param>
/// <param name="high">The high value.</param>
/// <param name="low">The low value.</param>
public NominalItem(IInputField inputField, double high,
double low)
{
this.high = high;
this.low = low;
this.inputField = inputField;
}
示例3: OutputFieldRangeMapped
/// <summary>
/// Construct a range mapped output field.
/// </summary>
/// <param name="field">The input field to base this on.</param>
/// <param name="low">The low value.</param>
/// <param name="high">The high value.</param>
public OutputFieldRangeMapped(IInputField field, double low,
double high)
{
_field = field;
_low = low;
_high = high;
}
示例4: OutputFieldGrouped
/// <summary>
/// Construct a grouped output field.
/// </summary>
/// <param name="group">The group that this field belongs to.</param>
/// <param name="sourceField">The source field for this output field.</param>
public OutputFieldGrouped(IOutputFieldGroup group,
IInputField sourceField)
{
this.group = group;
this.sourceField = sourceField;
this.group.GroupedFields.Add(this);
}
示例5: OutputFieldRangeMapped
/// <summary>
/// Construct a range mapped output field.
/// </summary>
/// <param name="field">The input field to base this on.</param>
/// <param name="low">The low value.</param>
/// <param name="high">The high value.</param>
public OutputFieldRangeMapped(IInputField field, double low,
double high)
{
this.field = field;
this.low = low;
this.high = high;
}
示例6: NominalItem
/// <summary>
/// Create a nominal item.
/// </summary>
/// <param name="inputField">The field that this item is based on.</param>
/// <param name="high">The high value.</param>
/// <param name="low">The low value.</param>
public NominalItem(IInputField inputField, double low,
double high)
{
_high = high;
_low = low;
_inputField = inputField;
}
示例7: OutputFieldMultiplicative
public OutputFieldMultiplicative(IOutputFieldGroup group, IInputField field)
: base(group, field)
{
while (!(group is MultiplicativeGroup))
{
throw new NormalizationError("Must use MultiplicativeGroup with OutputFieldMultiplicative.");
}
}
示例8: OutputFieldZAxis
public OutputFieldZAxis(IOutputFieldGroup group, IInputField field)
: base(group, field)
{
while (!(group is ZAxisGroup))
{
throw new NormalizationError("Must use ZAxisGroup with OutputFieldZAxis.");
}
}
示例9: BuildOutputOneOf
public void BuildOutputOneOf(DataNormalization norm, IInputField coverType)
{
var outType = new OutputOneOf();
outType.AddItem(coverType, 1);
outType.AddItem(coverType, 2);
outType.AddItem(coverType, 3);
outType.AddItem(coverType, 4);
outType.AddItem(coverType, 5);
outType.AddItem(coverType, 6);
outType.AddItem(coverType, 7);
norm.AddOutputField(outType, true);
}
示例10: Copy
public void Copy(FileInfo source, FileInfo target, int start, int stop, int size)
{
var inputField = new IInputField[55];
var norm = new DataNormalization {Report = this, Storage = new NormalizationStorageCSV(target.ToString())};
for (int i = 0; i < 55; i++)
{
inputField[i] = new InputFieldCSV(true, source.ToString(), i);
norm.AddInputField(inputField[i]);
IOutputField outputField = new OutputFieldDirect(inputField[i]);
norm.AddOutputField(outputField);
}
// load only the part we actually want, i.e. training or eval
var segregator2 = new IndexSampleSegregator(start, stop, size);
norm.AddSegregator(segregator2);
norm.Process();
}
示例11: Narrow
public void Narrow(FileInfo source, FileInfo target, int field, int count)
{
var inputField = new IInputField[55];
var norm = new DataNormalization {Report = this, Storage = new NormalizationStorageCSV(target.ToString())};
for (int i = 0; i < 55; i++)
{
inputField[i] = new InputFieldCSV(true, source.ToString(), i);
norm.AddInputField(inputField[i]);
IOutputField outputField = new OutputFieldDirect(inputField[i]);
norm.AddOutputField(outputField);
}
var segregator = new IntegerBalanceSegregator(inputField[field], count);
norm.AddSegregator(segregator);
norm.Process();
Console.WriteLine(@"Samples per tree type:");
Console.WriteLine(segregator.DumpCounts());
}
示例12: DetermineInputFieldValue
/// <summary>
/// Called internally to obtain the current value for an input field.
/// </summary>
/// <param name="field">The input field to determine.</param>
/// <param name="index">The current index.</param>
/// <returns>The value for this input field.</returns>
private void DetermineInputFieldValue(IInputField field, int index)
{
double result;
if (field is InputFieldCSV)
{
var fieldCSV = (InputFieldCSV)field;
ReadCSV csv = _csvMap[field];
result = csv.GetDouble(fieldCSV.Offset);
}
else if (field is InputFieldMLDataSet)
{
var mlField = (InputFieldMLDataSet)field;
MLDataFieldHolder holder = _dataSetFieldMap
[field];
IMLDataPair pair = holder.Pair;
int offset = mlField.Offset;
if (offset < pair.Input.Count)
{
result = pair.Input[offset];
}
else
{
offset -= pair.Input.Count;
result = pair.Ideal[offset];
}
}
else
{
result = field.GetValue(index);
}
field.CurrentValue = result;
return;
}
示例13: IntegerBalanceSegregator
/// <summary>
/// Construct a balanced segregator.
/// </summary>
/// <param name="target">The input field to base this on, should
/// be an integer value.</param>
/// <param name="count">The number of rows to accept from each
/// unique value for the input.</param>
public IntegerBalanceSegregator(IInputField target, int count)
{
_target = target;
_count = count;
}
示例14: OutputFieldEncode
/// <summary>
/// Construct an encoded field.
/// </summary>
/// <param name="sourceField">The field that this is based on.</param>
public OutputFieldEncode(IInputField sourceField)
{
this.sourceField = sourceField;
}
示例15: AddInputField
/// <summary>
/// Add an input field.
/// </summary>
/// <param name="f">The input field to add.</param>
public void AddInputField(IInputField f)
{
_inputFields.Add(f);
}