public class MathUtility extends Object
| Constructor and Description |
|---|
MathUtility() |
| Modifier and Type | Method and Description |
|---|---|
static double |
average(double[] array) |
static double |
calculateWeight(Vertex from,
Vertex to)
从一个词到另一个词的词的花费
|
static void |
normalizeExp(double[] predictionScores) |
static void |
normalizeExp(Map<String,Double> predictionScores)
使用log-sum-exp技巧来归一化一组对数值
|
static double |
percentage(double current,
double total) |
static float |
sum(float... var) |
static int |
sum(int... var) |
public static int sum(int... var)
public static float sum(float... var)
public static double percentage(double current,
double total)
public static double average(double[] array)
public static void normalizeExp(Map<String,Double> predictionScores)
predictionScores - public static void normalizeExp(double[] predictionScores)
Copyright © 2014–2021 码农场. All rights reserved.