本文整理汇总了C#中IInputField类的典型用法代码示例。如果您正苦于以下问题:C# IInputField类的具体用法?C# IInputField怎么用?C# IInputField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IInputField类属于命名空间,在下文中一共展示了IInputField类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:johannsutherland,项目名称:encog-dotnet-core,代码行数:12,代码来源:OutputFieldGrouped.cs
示例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;
}
开发者ID:OperatorOverload,项目名称:encog-cs,代码行数:13,代码来源:NominalItem.cs
示例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;
}
开发者ID:CreativelyMe,项目名称:encog-dotnet-core,代码行数:13,代码来源:OutputFieldRangeMapped.cs
示例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);
}
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:12,代码来源:OutputFieldGrouped.cs
示例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;
}
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:13,代码来源:OutputFieldRangeMapped.cs
示例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;
}
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:13,代码来源:NominalItem.cs
示例7: OutputFieldMultiplicative
public OutputFieldMultiplicative(IOutputFieldGroup group, IInputField field)
: base(group, field)
{
while (!(group is MultiplicativeGroup))
{
throw new NormalizationError("Must use MultiplicativeGroup with OutputFieldMultiplicative.");
}
}
开发者ID:neismit,项目名称:emds,代码行数:8,代码来源:OutputFieldMultiplicative.cs
示例8: OutputFieldZAxis
public OutputFieldZAxis(IOutputFieldGroup group, IInputField field)
: base(group, field)
{
while (!(group is ZAxisGroup))
{
throw new NormalizationError("Must use ZAxisGroup with OutputFieldZAxis.");
}
}
开发者ID:neismit,项目名称:emds,代码行数:8,代码来源:OutputFieldZAxis.cs
示例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);
}
开发者ID:fxmozart,项目名称:encog-dotnet-core,代码行数:12,代码来源:GenerateData.cs
示例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();
}
开发者ID:johannsutherland,项目名称:encog-dotnet-core,代码行数:19,代码来源:GenerateData.cs
示例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());
}
开发者ID:JDFagan,项目名称:encog-dotnet-core,代码行数:20,代码来源:GenerateData.cs
示例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;
}
开发者ID:jongh0,项目名称:MTree,代码行数:42,代码来源:DataNormalization.cs
示例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;
}
开发者ID:CreativelyMe,项目名称:encog-dotnet-core,代码行数:12,代码来源:IntegerBalanceSegregator.cs
示例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;
}
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:8,代码来源:OutputFieldEncode.cs
示例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);
}
开发者ID:jongh0,项目名称:MTree,代码行数:8,代码来源:DataNormalization.cs
示例16: CreateTableColumn
/// <summary>
/// Creates a field column in a table.
/// </summary>
/// <param name="field">A field object</param>
/// <param name="tableName">Name of the table.</param>
public void CreateTableColumn(IInputField field, string tableName)
{
if (!dbDriver.ColumnExists(tableName, ((Epi.INamedObject)field).Name))
{
string fieldLength = string.Empty;
string fieldType = field.GetDbSpecificColumnType();
Query query;
switch (fieldType)
{
case "nvarchar":
case "nchar":
fieldLength = "(4000)";
break;
case "text":
fieldLength = "(255)";
break;
case "double":
break;
default:
break;
}
query = dbDriver.CreateQuery("alter table [" + tableName + "] add [" + ((Epi.INamedObject)field).Name + "] " + fieldType + fieldLength);
dbDriver.ExecuteNonQuery(query);
}
}
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:33,代码来源:CollectedDataProvider.cs
示例17: RangeSegregator
/// <summary>
/// Construct a range segregator.
/// </summary>
/// <param name="sourceField">The source field.</param>
/// <param name="include">Default action, if the data is not in any of the ranges,
/// should it be included.</param>
public RangeSegregator(IInputField sourceField, bool include)
{
_sourceField = sourceField;
_include = include;
}
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:11,代码来源:RangeSegregator.cs
示例18: DetermineInputFieldValue
private void DetermineInputFieldValue(IInputField field, int index)
{
double num;
InputFieldCSV dcsv;
if (field is InputFieldCSV)
{
goto Label_00F5;
}
if (field is InputFieldMLDataSet)
{
InputFieldMLDataSet set = (InputFieldMLDataSet) field;
MLDataFieldHolder holder = this._dataSetFieldMap[field];
IMLDataPair pair = holder.Pair;
int offset = set.Offset;
if ((((uint) index) >= 0) && (offset >= pair.Input.Count))
{
offset -= pair.Input.Count;
num = pair.Ideal[offset];
if ((((uint) index) + ((uint) num)) > uint.MaxValue)
{
return;
}
if (((uint) offset) >= 0)
{
if (0 != 0)
{
return;
}
goto Label_0022;
}
goto Label_00F5;
}
num = pair.Input[offset];
}
else
{
num = field.GetValue(index);
}
Label_0022:
field.CurrentValue = num;
return;
Label_00F5:
dcsv = (InputFieldCSV) field;
num = this._csvMap[field].GetDouble(dcsv.Offset);
goto Label_0022;
}
开发者ID:neismit,项目名称:emds,代码行数:46,代码来源:DataNormalization.cs
示例19: OutputFieldDirect
/// <summary>
/// Construct a direct output field.
/// </summary>
/// <param name="sourceField">The source field to pass directly on.</param>
public OutputFieldDirect(IInputField sourceField)
{
_sourceField = sourceField;
}
开发者ID:benw408701,项目名称:MLHCTransactionPredictor,代码行数:8,代码来源:OutputFieldDirect.cs
示例20: 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)
{
this.target = target;
this.count = count;
}
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:12,代码来源:IntegerBalanceSegregator.cs
注:本文中的IInputField类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论