C# 클래스 Accord.Statistics.Visualizations.Histogram

상속: ICloneable
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
Add ( Histogram histogram ) : Histogram

Adds one histogram from the other, storing results in a new histogram, without changing the current instance.

Add ( int histogram ) : Histogram

Adds one histogram from the other, storing results in a new histogram, without changing the current instance.

Clone ( ) : object

Creates a new object that is a copy of the current instance.

Compute ( double values ) : void

Computes (populates) an Histogram mapping with values from a sample.

Compute ( double values, double binWidth ) : void

Computes (populates) an Histogram mapping with values from a sample.

Compute ( double values, int numberOfBins ) : void

Computes (populates) an Histogram mapping with values from a sample.

Compute ( double values, int numberOfBins, bool extraUpperBin ) : void

Computes (populates) an Histogram mapping with values from a sample.

Compute ( double values, int numberOfBins, double binWidth ) : void

Computes (populates) an Histogram mapping with values from a sample.

FromData ( double values ) : Histogram

Creates a histogram of values from a sample.

GetRange ( double percent ) : IntRange

Get range around median containing specified percentage of values.

The method calculates range of stochastic variable, which summary probability comprises the specified percentage of histogram's hits.

Sample usage:

// create histogram Histogram histogram = new Histogram( new int[10] { 0, 0, 1, 3, 6, 8, 11, 0, 0, 0 } ); // get 50% range IntRange range = histogram.GetRange( 0.5 ); // show the range ([4, 6]) Console.WriteLine( "50% range = [" + range.Min + ", " + range.Max + "]" );
Histogram ( ) : System

Constructs an empty histogram

Histogram ( int values ) : System

Constructs an empty histogram

Multiply ( int histogram ) : Histogram

Multiplies one histogram from the other, storing results in a new histogram, without changing the current instance.

NumberOfBins ( double values, DoubleRange range, BinAdjustmentRule rule ) : int

Computes the optimum number of bins based on a BinAdjustmentRule.

Subtract ( Histogram histogram ) : Histogram

Subtracts one histogram from the other, storing results in a new histogram, without changing the current instance.

Subtract ( int histogram ) : Histogram

Subtracts one histogram from the other, storing results in a new histogram, without changing the current instance.

ToArray ( ) : int[]

Converts this histogram into an integer array representation.

Update ( ) : void

Update statistical value of the histogram.

The method recalculates statistical values of the histogram, like mean, standard deviation, etc., in the case if histogram's values were changed directly. The method should be called only in the case if histogram's values were retrieved through Values property and updated after that.

this ( int index ) : int

Gets the Bin values of this Histogram.

비공개 메소드들

메소드 설명
Histogram ( double values ) : System
compute ( double values ) : void

Actually computes the histogram.

initialize ( double startValue, double width ) : void

Sets the histogram's bin ranges (edges).

initialize ( int numberOfBins ) : void

Initializes the histogram's bins.

메소드 상세

Add() 공개 메소드

Adds one histogram from the other, storing results in a new histogram, without changing the current instance.
public Add ( Histogram histogram ) : Histogram
histogram Histogram The histogram whose bin values will be added.
리턴 Histogram

Add() 공개 메소드

Adds one histogram from the other, storing results in a new histogram, without changing the current instance.
public Add ( int histogram ) : Histogram
histogram int The histogram whose bin values will be added.
리턴 Histogram

Clone() 공개 메소드

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
리턴 object

Compute() 공개 메소드

Computes (populates) an Histogram mapping with values from a sample.
public Compute ( double values ) : void
values double The values to be binned in the histogram.
리턴 void

Compute() 공개 메소드

Computes (populates) an Histogram mapping with values from a sample.
public Compute ( double values, double binWidth ) : void
values double The values to be binned in the histogram.
binWidth double The desired width for the histogram's bins.
리턴 void

Compute() 공개 메소드

Computes (populates) an Histogram mapping with values from a sample.
public Compute ( double values, int numberOfBins ) : void
values double The values to be binned in the histogram.
numberOfBins int The desired number of histogram's bins.
리턴 void

Compute() 공개 메소드

Computes (populates) an Histogram mapping with values from a sample.
public Compute ( double values, int numberOfBins, bool extraUpperBin ) : void
values double The values to be binned in the histogram.
numberOfBins int The desired number of histogram's bins.
extraUpperBin bool Whether to include an extra upper bin going to infinity.
리턴 void

Compute() 공개 메소드

Computes (populates) an Histogram mapping with values from a sample.
public Compute ( double values, int numberOfBins, double binWidth ) : void
values double The values to be binned in the histogram.
numberOfBins int The desired number of histogram's bins.
binWidth double The desired width for the histogram's bins.
리턴 void

FromData() 공개 메소드

Creates a histogram of values from a sample.
public FromData ( double values ) : Histogram
values double The values to be binned in the histogram.
리턴 Histogram

GetRange() 공개 메소드

Get range around median containing specified percentage of values.

The method calculates range of stochastic variable, which summary probability comprises the specified percentage of histogram's hits.

Sample usage:

// create histogram Histogram histogram = new Histogram( new int[10] { 0, 0, 1, 3, 6, 8, 11, 0, 0, 0 } ); // get 50% range IntRange range = histogram.GetRange( 0.5 ); // show the range ([4, 6]) Console.WriteLine( "50% range = [" + range.Min + ", " + range.Max + "]" );
public GetRange ( double percent ) : IntRange
percent double Values percentage around median.
리턴 AForge.IntRange

Histogram() 공개 메소드

Constructs an empty histogram
public Histogram ( ) : System
리턴 System

Histogram() 공개 메소드

Constructs an empty histogram
public Histogram ( int values ) : System
values int The values to be binned in the histogram.
리턴 System

Multiply() 공개 메소드

Multiplies one histogram from the other, storing results in a new histogram, without changing the current instance.
public Multiply ( int histogram ) : Histogram
histogram int The histogram whose bin values will be multiplied.
리턴 Histogram

NumberOfBins() 공개 정적인 메소드

Computes the optimum number of bins based on a BinAdjustmentRule.
public static NumberOfBins ( double values, DoubleRange range, BinAdjustmentRule rule ) : int
values double
range AForge.DoubleRange
rule BinAdjustmentRule
리턴 int

Subtract() 공개 메소드

Subtracts one histogram from the other, storing results in a new histogram, without changing the current instance.
public Subtract ( Histogram histogram ) : Histogram
histogram Histogram The histogram whose bin values will be subtracted.
리턴 Histogram

Subtract() 공개 메소드

Subtracts one histogram from the other, storing results in a new histogram, without changing the current instance.
public Subtract ( int histogram ) : Histogram
histogram int The histogram whose bin values will be subtracted.
리턴 Histogram

ToArray() 공개 메소드

Converts this histogram into an integer array representation.
public ToArray ( ) : int[]
리턴 int[]

Update() 공개 메소드

Update statistical value of the histogram.
The method recalculates statistical values of the histogram, like mean, standard deviation, etc., in the case if histogram's values were changed directly. The method should be called only in the case if histogram's values were retrieved through Values property and updated after that.
public Update ( ) : void
리턴 void

this() 공개 메소드

Gets the Bin values of this Histogram.
public this ( int index ) : int
index int Bin index.
리턴 int