本文整理匯總了Golang中github.com/xlvector/hector/util.StringBuilder.WriteToFile方法的典型用法代碼示例。如果您正苦於以下問題:Golang StringBuilder.WriteToFile方法的具體用法?Golang StringBuilder.WriteToFile怎麽用?Golang StringBuilder.WriteToFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/xlvector/hector/util.StringBuilder
的用法示例。
在下文中一共展示了StringBuilder.WriteToFile方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: SaveModel
func (algo *LinearRegression) SaveModel(path string) {
sb := util.StringBuilder{}
for f, g := range algo.Model {
sb.Int64(f)
sb.Write("\t")
sb.Float(g)
sb.Write("\n")
}
sb.WriteToFile(path)
}
示例2: SaveModel
func (lr *LROWLQN) SaveModel(path string) {
sb := util.StringBuilder{}
for key, val := range lr.Model.Data {
sb.Int64(key)
sb.Write("\t")
sb.Float(val)
sb.Write("\n")
}
sb.WriteToFile(path)
}
示例3: SaveModel
func (self *LinearSVM) SaveModel(path string) {
sb := util.StringBuilder{}
for f, g := range self.w.Data {
sb.Int64(f)
sb.Write("\t")
sb.Float(g)
sb.Write("\n")
}
sb.WriteToFile(path)
}
示例4: SaveModel
func (algo *EPLogisticRegression) SaveModel(path string) {
sb := util.StringBuilder{}
for f, g := range algo.Model {
sb.Int64(f)
sb.Write("\t")
sb.Float(g.Mean)
sb.Write("\t")
sb.Float(g.Vari)
sb.Write("\n")
}
sb.WriteToFile(path)
}