BalanceCSV ClassEncog Machine Learning Framework for .Net
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.
Inheritance Hierarchy

System Object
  Encog.App.Analyst.CSV.Basic BasicFile
    Encog.App.Analyst.CSV.Balance BalanceCSV

Namespace: Encog.App.Analyst.CSV.Balance
Assembly: encog-core-cs (in encog-core-cs.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax

public class BalanceCSV : BasicFile

The BalanceCSV type exposes the following members.

Constructors

  NameDescription
Public methodBalanceCSV
Initializes a new instance of the BalanceCSV class
Top
Methods

  NameDescription
Public methodAnalyze
Analyze the data. This counts the records and prepares the data to be processed.
Public methodDumpCounts
Return a string that lists the counts per class.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPerformBasicCounts
Perform a basic analyze of the file. This method is used mostly internally.
(Inherited from BasicFile.)
Public methodPrepareOutputFile
Prepare the output file, write headers if needed.
(Inherited from BasicFile.)
Public methodProcess
Process and balance the data.
Public methodReadHeaders
Read the headers from a CSV file. Used mostly internally.
(Inherited from BasicFile.)
Public methodReportDone(Boolean)
Report that we are done. Used internally.
(Inherited from BasicFile.)
Public methodReportDone(String)
Report that we are done. Used internally.
(Inherited from BasicFile.)
Public methodRequestStop
Request a stop.
(Inherited from BasicFile.)
Public methodResetStatus
Reset the reporting stats. Used internally.
(Inherited from BasicFile.)
Public methodShouldStop (Inherited from BasicFile.)
Public methodToString
Returns a string that represents the current object.
(Inherited from BasicFile.)
Public methodUpdateStatus(Boolean)
Update the status. Used internally.
(Inherited from BasicFile.)
Public methodUpdateStatus(String)
Report the current status.
(Inherited from BasicFile.)
Public methodValidateAnalyzed
Validate that the file has been analyzed. Throw an error, if it has not.
(Inherited from BasicFile.)
Public methodWriteRow
Write a row to the output file.
(Inherited from BasicFile.)
Top
Properties

  NameDescription
Public propertyAnalyzed
Set to true, if the file has been analyzed.
(Inherited from BasicFile.)
Public propertyCount
Set the column count.
(Inherited from BasicFile.)
Public propertyCounts
Public propertyExpectInputHeaders
Set the flag to determine if we are expecting input headers.
(Inherited from BasicFile.)
Public propertyFormat
Set the format.
(Inherited from BasicFile.)
Public propertyInputFilename
Set the input filename.
(Inherited from BasicFile.)
Public propertyInputHeadings
Set the input headings.
(Inherited from BasicFile.)
Public propertyPrecision
Set the precision to use.
(Inherited from BasicFile.)
Public propertyProduceOutputHeaders (Inherited from BasicFile.)
Public propertyRecordCount
Set the record count.
(Inherited from BasicFile.)
Public propertyReport
Set the status reporting object.
(Inherited from BasicFile.)
Public propertyReportInterval
Set the reporting interval.
(Inherited from BasicFile.)
Public propertyScript (Inherited from BasicFile.)
Top
See Also