FluidUMAP:
Filter:
Classes (extension) | Libraries > FluidCorpusManipulation

FluidUMAP : FluidModelObject : FluidDataObject : FluidServerObject : Object
ExtensionExtension

Dimensionality Reduction with Uniform Manifold Approximation and Projection
Source: FluidUMAP.sc

Description

Reduce the dimensions of a FluidDataSet using the Uniform Manifold Approximation and Projection (UMAP) algorithm.

Performs dimensionality reduction of a FluidDataSet using Uniform Manifold Approximation and Projection (UMAP)

Please refer to https://umap-learn.readthedocs.io/ and https://learn.flucoma.org/reference/umap for more information on the algorithm.

Read more about FluidUMAP on the learn platform.

Class Methods

FluidUMAP.new(server, numDimensions: 2, numNeighbours: 15, minDist: 0.1, iterations: 200, learnRate: 0.1)

Arguments:

server

The Server on which to construct this object

numDimensions

The number of dimensions to reduce to

Constraints

  • Minimum: 1
numNeighbours

The number of neighbours considered by the algorithm to balance local vs global structures to conserve. Low values will prioritise preservation of the local structure while high values will prioritise preservation of the global structure.

Constraints

  • Minimum: 1
minDist

The minimum distance each point is allowed to be from the others in the low dimension space. Low values will make tighter clumps, and higher will spread the points more.

Constraints

  • Minimum: 0
iterations

The number of iterations that the algorithm will go through to optimise the new representation

Constraints

  • Minimum: 1
learnRate

The learning rate of the algorithm, aka how much of the error it uses to estimate the next iteration.

Constraints

  • Minimum: 0.0
  • Maximum: 1.0

Inherited class methods

Instance Methods

.numDimensions

.numDimensions = value

Property for numDimensions. See new

.numNeighbours

.numNeighbours = value

Property for numNeighbours. See new

.minDist

.minDist = value

Property for minDist. See new

.iterations

.iterations = value

Property for iterations. See new

.learnRate

.learnRate = value

Property for learnRate. See new

.fitTransform(sourceDataSet, destDataSet, action)

Fit the model to a FluidDataSet and write the new projected data to a destination FluidDataSet.

Arguments:

sourceDataSet

Source data, or the DataSet name

destDataSet

Destination data, or the DataSet name

action

A function to execute when the server has completed running fitTransform

.fit(dataSet, action)

Train this model on a FluidDataSet but don't transform the data

Arguments:

dataSet

A FluidDataSet to analyse

action

A function to execute when the server has completed running fit

.transform(sourceDataSet, destDataSet, action)

Given a trained model, apply the reduction to a source FluidDataSet and write to a destination. Can be the same for both input and output (in-place).

Arguments:

sourceDataSet

Source data, or the DataSet name

destDataSet

Destination data, or the DataSet name

action

A function to execute when the server has completed running transform

.transformPoint(sourceBuffer, destBuffer, action)

Transform a new data point to the reduced number of dimensions using the projection learned from previous fit call to FluidUMAP.

Arguments:

sourceBuffer

A Buffer with the new data point.

destBuffer

A Buffer to contain the dimensionally reduced data point.

action

A function to execute when the server has completed running transformPoint

.cols(action)

The number of columns (dimensions) in this model or dataset / labeset

Arguments:

action

A function to execute when the server has completed running cols

.clear

From superclass: Object

Resets the internal state of the model

Arguments:

(action)

A function to execute when the server has completed running clear

.size(action)

The number of data points (entries / observations) in this model or dataset / labeset

Arguments:

action

A function to execute when the server has completed running size

.load(dict, action)

From superclass: FluidDataObject

Replace the internal state of the object from a Dictionary.

Arguments:

dict
action

A function to execute when the server has completed running load

.dump(action)

From superclass: FluidDataObject

Dump the state of this object as a Dictionary, which will be passed to the action function provided. This object must first be fit``ted before ``dump can be called.

Arguments:

action

A function to execute when the server has completed running dump

.write(filename, action)

From superclass: FluidDataObject

Save the internal state of the object to a JSON file on disk. This object must first be fit before write can be called.

Arguments:

filename

Path of the file to load from

action

A function to execute when the server has completed running write

.read(filename, action)

From superclass: FluidDataObject

Replace the internal state of the object from a JSON file on disk.

Arguments:

filename

Path of the file to load from

action

A function to execute when the server has completed running read

Inherited instance methods

Undocumented instance methods

.fitMsg(dataSet)

.fitTransformMsg(sourceDataSet, destDataSet)

.kr(trig, inputBuffer, outputBuffer)

.prGetParams

.transformMsg(sourceDataSet, destDataSet)

.transformPointMsg(sourceBuffer, destBuffer)

Examples

Reducing a 3 dimensional colour space to 2 dimensional space

Retrieving values on the server