public class CosineSimilarity extends BaseAccumulation
currentComplexResult, currentResult, initial, initialComplex, otherAccum, otherAccumComplex
extraArgs, n, numProcessed, passThrough, x, y, z
Constructor and Description |
---|
CosineSimilarity(INDArray x) |
CosineSimilarity(INDArray x,
INDArray y) |
CosineSimilarity(INDArray x,
INDArray y,
INDArray z,
int n) |
CosineSimilarity(INDArray x,
INDArray y,
int n) |
Modifier and Type | Method and Description |
---|---|
void |
init(INDArray x,
INDArray y,
INDArray z,
int n)
Initialize the operation based on the parameters
|
String |
name()
The name of this operation
|
double |
op(double origin,
double other)
Pairwise op (applicable with an individual element in y)
|
float |
op(float origin,
float other)
Pairwise op (applicable with an individual element in y)
|
IComplexNumber |
op(IComplexNumber origin,
double other)
Pairwise op (applicable with an individual element in y)
|
IComplexNumber |
op(IComplexNumber origin,
float other)
Pairwise op (applicable with an individual element in y)
|
IComplexNumber |
op(IComplexNumber origin,
IComplexNumber other)
Pairwise op (applicable with an individual element in y)
|
Op |
opForDimension(int index,
int dimension)
A copy of this operation for a particular dimension of the input
|
void |
update(IComplexNumber result)
Update the current result to be this result
|
void |
update(Number result)
Update the current result to be this result
|
currentResult, currentResultComplex, numProcessed, op, op, op, otherAccum, otherAccumComplex, setCurrentResult, setCurrentResultComplex, zero, zeroComplex
exec, extraArgs, isPassThrough, n, setX, setY, setZ, toString, x, y, z
public CosineSimilarity(INDArray x)
public void update(Number result)
Accumulation
result
- the resultpublic void update(IComplexNumber result)
Accumulation
result
- the resultpublic String name()
Op
public IComplexNumber op(IComplexNumber origin, double other)
Op
op
in interface Op
op
in class BaseAccumulation
origin
- the origin numberother
- the other numberpublic IComplexNumber op(IComplexNumber origin, float other)
Op
op
in interface Op
op
in class BaseAccumulation
origin
- the origin numberother
- the other numberpublic IComplexNumber op(IComplexNumber origin, IComplexNumber other)
Op
op
in interface Op
op
in class BaseAccumulation
origin
- the origin numberother
- the other numberpublic float op(float origin, float other)
Op
op
in interface Op
op
in class BaseAccumulation
origin
- the origin numberother
- the other numberpublic double op(double origin, double other)
Op
op
in interface Op
op
in class BaseAccumulation
origin
- the origin numberother
- the other numberpublic Op opForDimension(int index, int dimension)
Op
index
- the index of the op to iterate overdimension
- the dimension to ge the input forpublic void init(INDArray x, INDArray y, INDArray z, int n)
Op
init
in interface Op
init
in class BaseAccumulation
x
- the inputy
- the pairwise transform ndarrayz
- the resulting ndarrayn
- the number of elementsCopyright © 2015. All Rights Reserved.