C# Class Encog.Util.Simple.EncogUtility

ファイルを表示 Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
CalculateClassificationError ( IMLClassification method, IMLDataSet data ) : double

Calculate an error for a method that makes use of classification.

CalculateRegressionError ( IMLRegression method, IMLDataSet data ) : double

Calculate a regression error.

ConvertCSV2Binary ( FileInfo csvFile, CSVFormat format, FileInfo binFile, int input, int ideal, bool headers ) : void

Convert a CSV file to binary.

ConvertCSV2Binary ( String csvFile, CSVFormat format, String binFile, int inputCount, int outputCount, bool headers, bool expectSignificance ) : void

Convert a CSV file to a binary training file.

Evaluate ( IMLRegression network, IMLDataSet training ) : void

Evaluate the network and display (to the console) the output for every value in the training set. Displays ideal and actual.

LoadCSV2Memory ( String filename, int input, int ideal, bool headers, CSVFormat format, bool expectSignificance ) : IMLDataSet

Load CSV to memory.

LoadEGB2Memory ( FileInfo filename ) : IMLDataSet

Load an EGB file to memory.

SaveCSV ( FileInfo targetFile, CSVFormat format, IMLDataSet set ) : void

Save the dataset to a CSV file.

SaveEGB ( FileInfo egbFile, IMLDataSet data ) : void

Save the training set to an EGB file.

SimpleFeedForward ( int input, int hidden1, int hidden2, int output, bool tanh ) : BasicNetwork

Create a simple feedforward neural network.

TrainConsole ( BasicNetwork network, IMLDataSet trainingSet, int minutes ) : void

Train the neural network, using SCG training, and output status to the console.

TrainConsole ( IMLTrain train, BasicNetwork network, IMLDataSet trainingSet, int minutes ) : void

Train the network, using the specified training algorithm, and send the output to the console.

TrainDialog ( BasicNetwork network, IMLDataSet trainingSet ) : void

Train using RPROP and display progress to a dialog box.

TrainDialog ( IMLTrain train, BasicNetwork network, IMLDataSet trainingSet ) : void

Train, using the specified training method, display progress to a dialog box.

TrainToError ( BasicNetwork network, IMLDataSet trainingSet, double error ) : void

Train the network, to a specific error, send the output to the console.

TrainToError ( IMLTrain train, IMLDataSet trainingSet, double error ) : void

Train to a specific error, using the specified training method, send the output to the console.

TrainToError ( IMLTrain train, double error ) : void

Train to a specific error, using the specified training method, send the output to the console.

Private Methods

Method Description
EncogUtility ( ) : System

Private constructor.

FormatNeuralData ( IMLData data ) : String

Format neural data as a list of numbers.

Method Details

CalculateClassificationError() public static method

Calculate an error for a method that makes use of classification.
public static CalculateClassificationError ( IMLClassification method, IMLDataSet data ) : double
method IMLClassification The method to check.
data IMLDataSet The data to check.
return double

CalculateRegressionError() public static method

Calculate a regression error.
public static CalculateRegressionError ( IMLRegression method, IMLDataSet data ) : double
method IMLRegression The method to check.
data IMLDataSet The data to check.
return double

ConvertCSV2Binary() public static method

Convert a CSV file to binary.
public static ConvertCSV2Binary ( FileInfo csvFile, CSVFormat format, FileInfo binFile, int input, int ideal, bool headers ) : void
csvFile System.IO.FileInfo The CSV file to convert.
format Encog.Util.CSV.CSVFormat The format.
binFile System.IO.FileInfo The binary file.
input int The input.
ideal int The ideal.
headers bool True, if headers are present.
return void

ConvertCSV2Binary() public static method

Convert a CSV file to a binary training file.
public static ConvertCSV2Binary ( String csvFile, CSVFormat format, String binFile, int inputCount, int outputCount, bool headers, bool expectSignificance ) : void
csvFile String The CSV file.
format Encog.Util.CSV.CSVFormat The format.
binFile String The binary file.
inputCount int The number of input values.
outputCount int The number of output values.
headers bool True, if there are headers on the3 CSV.
expectSignificance bool Should a significance column be expected.
return void

Evaluate() public static method

Evaluate the network and display (to the console) the output for every value in the training set. Displays ideal and actual.
public static Evaluate ( IMLRegression network, IMLDataSet training ) : void
network IMLRegression The network to evaluate.
training IMLDataSet The training set to evaluate.
return void

LoadCSV2Memory() public static method

Load CSV to memory.
public static LoadCSV2Memory ( String filename, int input, int ideal, bool headers, CSVFormat format, bool expectSignificance ) : IMLDataSet
filename String The CSV file to load.
input int The input count.
ideal int The ideal count.
headers bool True, if headers are present.
format Encog.Util.CSV.CSVFormat The loaded dataset.
expectSignificance bool The loaded dataset.
return IMLDataSet

LoadEGB2Memory() public static method

Load an EGB file to memory.
public static LoadEGB2Memory ( FileInfo filename ) : IMLDataSet
filename System.IO.FileInfo The file to load.
return IMLDataSet

SaveCSV() public static method

Save the dataset to a CSV file.
public static SaveCSV ( FileInfo targetFile, CSVFormat format, IMLDataSet set ) : void
targetFile System.IO.FileInfo The target file.
format Encog.Util.CSV.CSVFormat The format to use.
set IMLDataSet The data set.
return void

SaveEGB() public static method

Save the training set to an EGB file.
public static SaveEGB ( FileInfo egbFile, IMLDataSet data ) : void
egbFile System.IO.FileInfo The EGB file to save to.
data IMLDataSet The training data to save.
return void

SimpleFeedForward() public static method

Create a simple feedforward neural network.
public static SimpleFeedForward ( int input, int hidden1, int hidden2, int output, bool tanh ) : BasicNetwork
input int The number of input neurons.
hidden1 int The number of hidden layer 1 neurons.
hidden2 int The number of hidden layer 2 neurons.
output int The number of output neurons.
tanh bool True to use hyperbolic tangent activation function, false to /// use the sigmoid activation function.
return Encog.Neural.Networks.BasicNetwork

TrainConsole() public static method

Train the neural network, using SCG training, and output status to the console.
public static TrainConsole ( BasicNetwork network, IMLDataSet trainingSet, int minutes ) : void
network Encog.Neural.Networks.BasicNetwork The network to train.
trainingSet IMLDataSet The training set.
minutes int The number of minutes to train for.
return void

TrainConsole() public static method

Train the network, using the specified training algorithm, and send the output to the console.
public static TrainConsole ( IMLTrain train, BasicNetwork network, IMLDataSet trainingSet, int minutes ) : void
train IMLTrain The training method to use.
network Encog.Neural.Networks.BasicNetwork The network to train.
trainingSet IMLDataSet The training set.
minutes int The number of minutes to train for.
return void

TrainDialog() public static method

Train using RPROP and display progress to a dialog box.
public static TrainDialog ( BasicNetwork network, IMLDataSet trainingSet ) : void
network Encog.Neural.Networks.BasicNetwork The network to train.
trainingSet IMLDataSet The training set to use.
return void

TrainDialog() public static method

Train, using the specified training method, display progress to a dialog box.
public static TrainDialog ( IMLTrain train, BasicNetwork network, IMLDataSet trainingSet ) : void
train IMLTrain The training method to use.
network Encog.Neural.Networks.BasicNetwork The network to train.
trainingSet IMLDataSet The training set to use.
return void

TrainToError() public static method

Train the network, to a specific error, send the output to the console.
public static TrainToError ( BasicNetwork network, IMLDataSet trainingSet, double error ) : void
network Encog.Neural.Networks.BasicNetwork The network to train.
trainingSet IMLDataSet The training set to use.
error double The error level to train to.
return void

TrainToError() public static method

Train to a specific error, using the specified training method, send the output to the console.
public static TrainToError ( IMLTrain train, IMLDataSet trainingSet, double error ) : void
train IMLTrain The training method.
trainingSet IMLDataSet The training set to use.
error double The desired error level.
return void

TrainToError() public static method

Train to a specific error, using the specified training method, send the output to the console.
public static TrainToError ( IMLTrain train, double error ) : void
train IMLTrain The training method.
error double The desired error level.
return void