[ 
https://issues.apache.org/jira/browse/MADLIB-835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frank McQuillan updated MADLIB-835:
-----------------------------------
    Assignee:     (was: Nandish Jayaram)

> Improved error message for Elastic Net predict()
> ------------------------------------------------
>
>                 Key: MADLIB-835
>                 URL: https://issues.apache.org/jira/browse/MADLIB-835
>             Project: Apache MADlib
>          Issue Type: Bug
>            Reporter: Srivatsan
>            Priority: Minor
>              Labels: gsoc2016, starter
>
> 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.
> {noformat}
> 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
> {noformat}
> The error is in passing "coef_nonzero" as input instead of "coef_all" from 
> the model.
> {noformat}
>       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
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to