Package regress

Class RegApplier

java.lang.Object
regress.RegApplier
All Implemented Interfaces:
util.Executable

public class RegApplier extends Object implements util.Executable
Class for applying multivariate polynomial regression models.
Since:
2007.05.14
  • Field Details

  • Constructor Details

    • RegApplier

      public RegApplier()
      Create a regression model applier.
      Since:
      2007.05.18 (Christian Borgelt)
  • Method Details

    • setRegression

      public void setRegression(String fn_reg)
      Set the regression model file.
      Parameters:
      fn_reg - the name of the regression model file
      Since:
      2007.05.18 (Christian Borgelt)
    • setRegression

      public void setRegression(Regression reg)
      Set the regression model.
      Parameters:
      reg - the regression model
      Since:
      2007.05.18 (Christian Borgelt)
    • setPredName

      public void setPredName(String name)
      Set the name of the prediction column.
      Parameters:
      name - the name of the prediction column
      Since:
      2007.05.18 (Christian Borgelt)
    • setConfName

      public void setConfName(String name)
      Set the name of the confidence column.
      Parameters:
      name - the name of the confidence column
      Since:
      2007.05.18 (Christian Borgelt)
    • setThreshold

      public void setThreshold(double thresh)
      Set the classification threshold.
      Parameters:
      thresh - the classification threshold
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(String fn_tab)
      Set the table input file and corresponding parameters.
      Parameters:
      fn_tab - the name of the data table file
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(String fn_tab, int mode)
      Set the table input file and corresponding parameters.
      Parameters:
      fn_tab - the name of the data table file
      mode - the read mode
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(String fn_tab, String recseps, String fldseps, String blanks, String comment)
      Set the table input file and corresponding parameters.
      Parameters:
      fn_tab - the name of the data table file
      recseps - the record separators
      fldseps - the field separators
      blanks - the blank characters
      comment - the comment characters
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(String fn_tab, String recseps, String fldseps, String blanks, String comment, int mode)
      Set the table input file and corresponding parameters.
      Parameters:
      fn_tab - the name of the data table file
      recseps - the record separators
      fldseps - the field separators
      blanks - the blank characters
      comment - the comment characters
      mode - the read mode
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(util.TableReader reader)
      Set the table reader and read mode.
      Parameters:
      reader - the table reader
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(util.TableReader reader, int mode)
      Set the table reader and read mode.
      Parameters:
      reader - the table reader
      mode - the read mode
      Since:
      2007.05.18 (Christian Borgelt)
    • setInput

      public void setInput(table.Table tab)
      Set the input data table.
      Parameters:
      tab - the input data table
      Since:
      2007.05.18 (Christian Borgelt)
    • setOutput

      public void setOutput(String fn_tab)
      Set the output data table file.
      Parameters:
      fn_tab - the name of the output data table file
      Since:
      2007.05.18 (Christian Borgelt)
    • setOutput

      public void setOutput(util.TableWriter writer)
      Set the output file writer.
      Parameters:
      writer - the output file writer
      Since:
      2007.05.18 (Christian Borgelt)
    • getRegression

      public Regression getRegression()
      Get the regression model.
      Returns:
      the regression model
      Since:
      2007.05.18 (Christian Borgelt)
    • apply

      public void apply() throws IOException, RegException
      Apply a regression model.
      Throws:
      IOException - if an i/o error occurs
      RegException - if there are too many regression terms
      Since:
      2007.05.18 (Christian Borgelt)
    • exec

      public void exec() throws Exception
      Execute the model induction.
      Specified by:
      exec in interface util.Executable
      Throws:
      Exception - if a execution error occurs
      Since:
      2007.05.18 (Christian Borgelt)
    • abort

      public void abort()
      Abort a regression model induction.
      Specified by:
      abort in interface util.Executable
      Since:
      2007.05.18 (Christian Borgelt)
    • getSSE

      public double getSSE()
      Get the sum of squared errors.
      Returns:
      the sum of squared errors
      Since:
      2007.05.18 (Christian Borgelt)
    • getErrors

      public int getErrors()
      Get the number of misclassifications.
      Returns:
      the number of misclassifications
      Since:
      2007.05.18 (Christian Borgelt)
    • getRowCount

      public int getRowCount()
      Get the number of processed table rows.
      Returns:
      the number of processed table rows
      Since:
      2007.05.18 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main function for command line execution.
      Parameters:
      args - the command line arguments
      Since:
      2007.05.18 (Christian Borgelt)