C# Класс Encog.App.Analyst.CSV.Balance.BalanceCSV

Balance a CSV file. This utility is useful when you have several an unbalanced training set. You may have a large number of one particular class, and many fewer elements of other classes. This can hinder many Machine Learning methods. This class can be used to balance the data. Obviously this class cannot generate data. You must request how many items you want per class. Some classes will have lower than this number if they were already below the specified amount. Any class above this amount will be trimmed to that amount.
Наследование: Encog.App.Analyst.CSV.Basic.BasicFile
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Analyze ( FileInfo inputFile, bool headers, CSVFormat format ) : void

Analyze the data. This counts the records and prepares the data to be processed.

DumpCounts ( ) : String

Return a string that lists the counts per class.

Process ( FileInfo outputFile, int targetField, int countPer ) : void

Process and balance the data.

Описание методов

Analyze() публичный Метод

Analyze the data. This counts the records and prepares the data to be processed.
public Analyze ( FileInfo inputFile, bool headers, CSVFormat format ) : void
inputFile System.IO.FileInfo The input file to process.
headers bool True, if headers are present.
format Encog.Util.CSV.CSVFormat The format of the CSV file.
Результат void

DumpCounts() публичный Метод

Return a string that lists the counts per class.
public DumpCounts ( ) : String
Результат String

Process() публичный Метод

Process and balance the data.
public Process ( FileInfo outputFile, int targetField, int countPer ) : void
outputFile System.IO.FileInfo The output file to write data to.
targetField int
countPer int The desired count per class.
Результат void