Package com.hw.langchain.math.utils
Class MathUtils
java.lang.Object
com.hw.langchain.math.utils.MathUtils
Math utils.
- Author:
- HamaWhite
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.nd4j.linalg.api.ndarray.INDArray
cosineSimilarity
(List<List<Float>> X, org.nd4j.linalg.api.ndarray.INDArray yArray) Row-wise cosine similarity between two equal-width matrices.static org.nd4j.linalg.api.ndarray.INDArray
cosineSimilarity
(org.nd4j.linalg.api.ndarray.INDArray xArray, List<List<Float>> Y) Row-wise cosine similarity between two equal-width matrices.static org.nd4j.linalg.api.ndarray.INDArray
cosineSimilarity
(org.nd4j.linalg.api.ndarray.INDArray xArray, org.nd4j.linalg.api.ndarray.INDArray yArray) Row-wise cosine similarity between two equal-width matrices.
-
Method Details
-
cosineSimilarity
public static org.nd4j.linalg.api.ndarray.INDArray cosineSimilarity(List<List<Float>> X, org.nd4j.linalg.api.ndarray.INDArray yArray) Row-wise cosine similarity between two equal-width matrices. -
cosineSimilarity
public static org.nd4j.linalg.api.ndarray.INDArray cosineSimilarity(org.nd4j.linalg.api.ndarray.INDArray xArray, List<List<Float>> Y) Row-wise cosine similarity between two equal-width matrices. -
cosineSimilarity
public static org.nd4j.linalg.api.ndarray.INDArray cosineSimilarity(org.nd4j.linalg.api.ndarray.INDArray xArray, org.nd4j.linalg.api.ndarray.INDArray yArray) Row-wise cosine similarity between two equal-width matrices.
-