MCPcopy Create free account
hub / github.com/apache/madlib / stateToResult

Function stateToResult

src/modules/crf/linear_crf.cpp:963–977  ·  view source on GitHub ↗

* @brief Return the results for the L-BFGS method. */

Source from the content-addressed store, hash-verified

961 * @brief Return the results for the L-BFGS method.
962 */
963AnyType stateToResult(
964 const Allocator &inAllocator,
965 const HandleMap<const ColumnVector, TransparentHandle<double> > &incoef,
966 double loglikelihood, const uint32_t &iterations) {
967 // FIXME: We currently need to copy the coefficient to a native array
968 // This should be transparent to user code
969 MutableNativeColumnVector coef(
970 inAllocator.allocateArray<double>(incoef.size()));
971 coef = incoef;
972
973 // Return all coefficients, loglikelihood in a tuple
974 AnyType tuple;
975 tuple << coef << loglikelihood << iterations;
976 return tuple;
977}
978
979} // namespace crf
980

Callers 1

runMethod · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected