Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateClusters ¶
func GenerateClusters(rows, cols, clusters int, max, min, maxOffset float64, randSeed int64) *mat.Dense
GenerateClusters generates random data samples clustered in the given number of clusters. The samples are located in a hypercube given by the max and min parameters. The clusters are hypercubes (not hyperspheres) around randomly picked cluster centres. There is the same number of data samples in each cluster (rows/clusters) rows - how many data rows to generate cols - dimension of data clusters - how many clusters max,min - maximum and minimum coordinates (applies to all dimensions) maxOffset - this is the maximum distance of a sample from its cluster centre in any dimension. randSeed - random seed
func IntCumProduct ¶
IntCumProduct calculates a cumulative product of all items in slice as a parameter and returns it in a new slice. The origin slice remains unmodified It returns empty slice if either the supplied slice is empty or nil
func IntProduct ¶
IntProduct calculates a product of all items in slice passed in as a parameter It returns 1.0 if the slice is nil or empty.
func ParseDims ¶
ParseDims expects a string that contains comma-separated integer values. It tries to convert the parameters to their numerical values and returns them. If empty string is supplied, it allocates 2-dims slice and returns it. It returns error if a non-empty string is passed in as a parameter and the values it contains can not be converted to integers.
Types ¶
This section is empty.