Package cascading.pattern.model.generalregression.predictor

Examples of cascading.pattern.model.generalregression.predictor.FactorPredictor


      {
      String name = predictor.getName().getValue();
      String value = predictor.getValue();
      double coefficient = predictor.getCoefficient();

      generalRegressionTable.addParameter( new Parameter( "f" + count++, coefficient, new FactorPredictor( name, value ) ) );
      }

    for( NumericPredictor predictor : regressionTable.getNumericPredictors() )
      {
      String name = predictor.getName().getValue();
View Full Code Here


      String value = modelPPCell.getValue();

      cascading.pattern.model.generalregression.predictor.Predictor predictor;

      if( factorsList.contains( predictorName ) )
        predictor = new FactorPredictor( predictorName, value );
      else if( covariateList.contains( predictorName ) )
        predictor = new CovariantPredictor( predictorName, Long.parseLong( value ) );
      else
        throw new IllegalStateException( "unknown predictor name: " + predictorName );
View Full Code Here

    factorInvokers = new FactorInvoker[ parameter.getFactors().size() ];

    for( int i = 0; i < parameter.getFactors().size(); i++ )
      {
      FactorPredictor predictor = parameter.getFactors().get( i );
      int pos = argumentsFields.getPos( predictor.getFieldName() );

      factorInvokers[ i ] = new FactorInvoker( pos, predictor );
      }

    covariantInvokers = new CovariantInvoker[ parameter.getCovariants().size() ];

    for( int i = 0; i < parameter.getCovariants().size(); i++ )
      {
      CovariantPredictor predictor = parameter.getCovariants().get( i );
      int pos = argumentsFields.getPos( predictor.getFieldName() );

      covariantInvokers[ i ] = new CovariantInvoker( pos, predictor );
      }
    }
View Full Code Here

    regressionTable.addParameter( new Parameter( "p1", 0.53448203205212d, new CovariantPredictor( "sepal_width" ) ) );
    regressionTable.addParameter( new Parameter( "p2", 0.691035562908626d, new CovariantPredictor( "petal_length" ) ) );
    regressionTable.addParameter( new Parameter( "p3", -0.21488157609202d, new CovariantPredictor( "petal_width" ) ) );

    regressionTable.addParameter( new Parameter( "p4", 0d, new FactorPredictor( "species", "setosa" ) ) );
    regressionTable.addParameter( new Parameter( "p5", -0.43150751368126d, new FactorPredictor( "species", "versicolor" ) ) );
    regressionTable.addParameter( new Parameter( "p6", -0.61868924203063d, new FactorPredictor( "species", "virginica" ) ) );

    regressionSpec.addRegressionTable( regressionTable );

    PredictionRegressionFunction regressionFunction = new PredictionRegressionFunction( regressionSpec );
View Full Code Here

TOP

Related Classes of cascading.pattern.model.generalregression.predictor.FactorPredictor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.