Skip to content

InteractionsProfile

Samuel Gomes edited this page Jun 23, 2020 · 12 revisions

InteractionsProfile

This class adds to the data model of an Interactions Profile some utility methods used to calculate distances. The profile is intended to be normalized before use.

Constructor

InteractionsProfile(dimensions: object): void

Attributes

Name: expected type Default value Description
dimensions: object {} The dictionary of dimension keys to values.

Methods

reset(): void

Description

Sets all dimensions to 0.

init(): void

Description

Resets and normalizes the profile.

generateCopy(): InteractionsProfile

Description

Returns a copy of the caller.

normalization(profile: InteractionsProfile): InteractionsProfile

Description

(Auxiliary) returns a normalized copy of profile.

normalize(): InteractionsProfile

Description

Normalizes the caller and returns it.

normalized(): InteractionsProfile

Description

Returns a normalized copy of the caller.

randomization(profile: InteractionsProfile): InteractionsProfile

Description

(Auxiliary) returns a randomized copy of profile.

randomize(): InteractionsProfile

Description

Randomizes the caller and returns it.

randomized(): InteractionsProfile

Description

Returns a randomized copy of the caller.

distanceBetween(profileToTest: InteractionsProfile): float

Description

Calculates the euclidean distance between this and other profile.

sqrDistanceBetween(profileToTest: InteractionsProfile): float

Description

Calculates the squared euclidean distance between this and other profile.

Clone this wiki locally