本文整理了Java中gov.sandia.cognition.math.matrix.Vector.toString()
方法的一些代码示例,展示了Vector.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.toString()
方法的具体详情如下:
包路径:gov.sandia.cognition.math.matrix.Vector
类名称:Vector
方法名:toString
[英]Converts the vector to a String, using the given formatter.
[中]使用给定的格式化程序将向量转换为字符串。
代码示例来源:origin: gov.sandia.foundry/gov-sandia-cognition-text-core
public void stepStarted(
final IterativeAlgorithm algorithm)
{
final ProbabilisticLatentSemanticAnalysis plsa =
(ProbabilisticLatentSemanticAnalysis) algorithm;
NumberFormat format = new DecimalFormat("0.00");
out.println("Iteration " + plsa.getIteration());
for (ProbabilisticLatentSemanticAnalysis.LatentData latent
: plsa.result.latents)
{
out.println(" Latent " + latent.index);
out.println(" p(z) = " + format.format(latent.pLatent));
out.println(" p(t|z) = " + latent.pTermGivenLatent.toString(format));
out.println(" p(d|z) = " + latent.pDocumentGivenLatent.toString(format));
}
}
代码示例来源:origin: algorithmfoundry/Foundry
public void stepStarted(
final IterativeAlgorithm algorithm)
{
final ProbabilisticLatentSemanticAnalysis plsa =
(ProbabilisticLatentSemanticAnalysis) algorithm;
NumberFormat format = new DecimalFormat("0.00");
out.println("Iteration " + plsa.getIteration());
for (ProbabilisticLatentSemanticAnalysis.LatentData latent
: plsa.result.latents)
{
out.println(" Latent " + latent.index);
out.println(" p(z) = " + format.format(latent.pLatent));
out.println(" p(t|z) = " + latent.pTermGivenLatent.toString(format));
out.println(" p(d|z) = " + latent.pDocumentGivenLatent.toString(format));
}
}
代码示例来源:origin: algorithmfoundry/Foundry
public void stepStarted(
final IterativeAlgorithm algorithm)
{
final ProbabilisticLatentSemanticAnalysis plsa =
(ProbabilisticLatentSemanticAnalysis) algorithm;
NumberFormat format = new DecimalFormat("0.00");
out.println("Iteration " + plsa.getIteration());
for (ProbabilisticLatentSemanticAnalysis.LatentData latent
: plsa.result.latents)
{
out.println(" Latent " + latent.index);
out.println(" p(z) = " + format.format(latent.pLatent));
out.println(" p(t|z) = " + latent.pTermGivenLatent.toString(format));
out.println(" p(d|z) = " + latent.pDocumentGivenLatent.toString(format));
}
}
代码示例来源:origin: algorithmfoundry/Foundry
/**
* Writes the given vector to the Java-based writer
* @param vector Vector to write to the Java-based writer
* @throws java.io.IOException on bad write
*/
public void write(
Vector vector )
throws IOException
{
this.getWriter().write( vector.toString() );
this.getWriter().write( "\n" );
this.getWriter().flush();
}
代码示例来源:origin: algorithmfoundry/Foundry
/**
* Writes the given vector to the Java-based writer
* @param vector Vector to write to the Java-based writer
* @throws java.io.IOException on bad write
*/
public void write(
Vector vector )
throws IOException
{
this.getWriter().write( vector.toString() );
this.getWriter().write( "\n" );
this.getWriter().flush();
}
代码示例来源:origin: gov.sandia.foundry/gov-sandia-cognition-common-core
/**
* Writes the given vector to the Java-based writer
* @param vector Vector to write to the Java-based writer
* @throws java.io.IOException on bad write
*/
public void write(
Vector vector )
throws IOException
{
this.getWriter().write( vector.toString() );
this.getWriter().write( "\n" );
this.getWriter().flush();
}
内容来源于网络,如有侵权,请联系作者删除!