Uploaded image for project: 'Apache MADlib'
  1. Apache MADlib
  2. MADLIB-835

Improved error message for Elastic Net predict()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When we pass the selected coefficients to elastic net's "predict()" function, it throws as ugly error message which is not indicative of the real error.

      NOTICE:  table "regression_elastic_net_predictions" does not exist, skipping
      
      ERROR:  Function "madlib.elastic_net_gaussian_predict(double precision[],double precision,double precision[])": Internal error. Eigen assertion failed (index >= 0 && index < size()) in function typename Eigen::internal::conditional<(bool)((Eigen::internal::traits<T>::Flags & Eigen::LvalueBit)), const typename Eigen::internal::traits<T>::Scalar&, typename Eigen::internal::conditional<Eigen::internal::is_arithmetic<typename Eigen::internal::traits<T>::Scalar>::value, typename Eigen::internal::traits<T>::Scalar, const typename Eigen::internal::traits<T>::Scalar>::type>::type Eigen::DenseCoeffsBase<Derived, 0>::operator()(typename Eigen::internal::traits<T>::Index) const [with Derived = Eigen::Map<const Eigen::Matrix<double, -0x00000000000000001, 1, 0, -0x00000000000000001, 1>, 0, Eigen::Stride<0, 0> >] at /data/home/gpdbchina/pulse2-data/agents/agent1/work/MADlib%20Build%20%28Release%29/rhel5_x86_64/build/third_party/src/EP_eigen/Eigen/src/Core/DenseCoeffsBase.h:173 (UDF_impl.hpp:208)  (seg40 sdw6:1025 pid=21706) (cdbdisp.c:1477)
      
      
      DETAIL:  PL/pgSQL function "elastic_net_predict" line 8 at return
      

      The error is in passing "coef_nonzero" as input instead of "coef_all" from the model.

      	select test.person_uid, 
      			       test.gpa as actual_gpa,
      			       madlib.elastic_net_predict(
      				    'gaussian', 
      				    mdl.coef_nonzero, 
      				    mdl.intercept, 
      				    feat_vect_normalized
      			       ) as predicted_gpa
      			from modeling.regression_test test, 
      			     modeling.regression_elastic_net_mdl mdl
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vatsan Srivatsan Ramanujam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: