src/ModelParameterInfoTypes.cpp
/**
 * Calculates the arithmetic-scale value corresponding to given parameter-scale value.
 * 
 * @param x - parameter-scale value
 * @return - arithmetic-scale value
 */
Calculates the arithmetic-scale value corresponding to given parameter-scale value.

@param x - parameter-scale value
@return - arithmetic-scale value
Calculates the arithmetic - scale value corresponding to given parameter - scale value . @param x - parameter - scale value @return - arithmetic - scale value
dvariable NumberInfo::calcArithScaleVal(const prevariable& x){
    RETURN_ARRAYS_INCREMENT();
    if (debug) rpt::echo<<"starting NumberInfo::calcArithScaleVal(prevariable&) "<<this<<endl;
    dvariable z;
    switch (scaleType){
        case tcsam::SCALE_ARITHM:
            z = x;
            break;
        case tcsam::SCALE_LOG:
            z = mfexp(x);
            break;
        case tcsam::SCALE_LOGIT:
            z = 1.0/(1.0+mfexp(-x));
            break;
        default:
            cout<<"NumberInfo::calcArithScaleVal(dvariable&) "<<this<<endl;
            cout<<"Parameter scale type "<<scaleType<<" not recognized!!"<<endl;
            ad_exit(1);
            break;
    }
    if (debug) rpt::echo<<"finished NumberInfo::calcArithScaleVal(prevariable&) "<<this<<endl;
    RETURN_ARRAYS_DECREMENT();
    return z;
}
dvariable NumberInfo :: calcArithScaleVal ( const prevariable & x ) { RETURN_ARRAYS_INCREMENT ( ) ; if ( debug ) rpt :: echo << " " << this << endl ; dvariable z ; switch ( scaleType ) { case tcsam :: SCALE_ARITHM : z = x ; break ; case tcsam :: SCALE_LOG : z = mfexp ( x ) ; break ; case tcsam :: SCALE_LOGIT : z = 1.0 / ( 1.0 + mfexp ( - x ) ) ; break ; default : cout << " " << this << endl ; cout << " " << scaleType << " " << endl ; ad_exit ( 1 ) ; break ; } if ( debug ) rpt :: echo << " " << this << endl ; RETURN_ARRAYS_DECREMENT ( ) ; return z ; }
Calculates the arithmetic-scale value corresponding to given parameter-scale value.
Calculates the arithmetic - scale value corresponding to given parameter - scale value .
//scaled to [0,1] //scaled to [0,1]