* @brief Compute the log likelihood and gradient vector for each tuple */
| 848 | * @brief Compute the log likelihood and gradient vector for each tuple |
| 849 | */ |
| 850 | AnyType |
| 851 | lincrf_lbfgs_step_transition::run(AnyType &args) { |
| 852 | LinCrfLBFGSTransitionState<MutableArrayHandle<double> > state = args[0]; |
| 853 | MappedColumnVector sparse_r = args[1].getAs<MappedColumnVector>(); |
| 854 | MappedColumnVector dense_m = args[2].getAs<MappedColumnVector>(); |
| 855 | MappedColumnVector sparse_m = args[3].getAs<MappedColumnVector>(); |
| 856 | if (state.numRows == 0) { |
| 857 | state.initialize(*this, static_cast<uint32_t>(args[4].getAs<double>()), static_cast<uint32_t>(args[5].getAs<double>())); |
| 858 | if (!args[6].isNull()) { |
| 859 | LinCrfLBFGSTransitionState<ArrayHandle<double> > previousState = args[6]; |
| 860 | state = previousState; |
| 861 | state.reset(); |
| 862 | } |
| 863 | } |
| 864 | state.numRows++; |
| 865 | compute_logli_gradient(state, sparse_r, dense_m, sparse_m); |
| 866 | return state; |
| 867 | } |
| 868 | |
| 869 | /** |
| 870 | * @brief Perform the perliminary aggregation function: Merge transition states |
nothing calls this directly
no test coverage detected