Package regress

Class RegInducer

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

public class RegInducer extends Object implements util.Executable
Class for inducing multivariate polynomial regression models.
Since:
2007.05.14
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    the copyright information for this program
    static final String
    the program description
    static final String
    the version of this program
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a regression model inducer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Abort a regression model induction.
    void
    Execute the model induction.
    Get the induced regression model.
    int
    Get the number of processed table rows.
    void
    Induce a regression model.
    static void
    main(String[] args)
    Main function for command line execution.
    void
    setDegree(int deg)
    Set the degree of the regression polynomial.
    void
    Set the domain description file.
    void
    setDomains(table.Table tab)
    Set the domain descriptions.
    void
    setDomains(util.Scanner scan)
    Set the scanner to read the domain descriptions from.
    void
    setInput(String fn_tab)
    Set the table input file and corresponding parameters.
    void
    setInput(String fn_tab, int mode)
    Set the table input file and corresponding parameters.
    void
    setInput(String fn_tab, String recseps, String fldseps, String blanks, String comment)
    Set the table input file and corresponding parameters.
    void
    setInput(String fn_tab, String recseps, String fldseps, String blanks, String comment, int mode)
    Set the table input file and corresponding parameters.
    void
    setInput(table.Table tab)
    Set the input data table.
    void
    setInput(util.TableReader reader)
    Set the table reader and read mode.
    void
    setInput(util.TableReader reader, int mode)
    Set the table reader and read mode.
    void
    setLim(double lim)
    Set the limit for the Tikhonov regularization.
    void
    setMax(double max)
    Set the maximum for a logit transformation.
    void
    setMin(double min)
    Set the minimum for a logit transformation.
    void
    setMinMax(double min, double max)
    Set the range for a logit transformation.
    void
    setOutput(Writer writer)
    Set the output file writer.
    void
    setOutput(String fn_reg)
    Set the output file.
    void
    setReg(double reg)
    Set the initial Tikhonov regularization.
    void
    setRegLim(double reg, double lim)
    Set initial value and limit for the Tikhonov regularization.
    void
    setTarget(int trgid)
    Set the id of the target column.
    void
    setTarget(String target)
    Set the name of the target column.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • RegInducer

      public RegInducer()
      Create a regression model inducer.
      Since:
      2007.05.16 (Christian Borgelt)
  • Method Details

    • setDomains

      public void setDomains(String fn_dom)
      Set the domain description file.
      Parameters:
      fn_dom - the name of the domain description file
      Since:
      2007.05.17 (Christian Borgelt)
    • setDomains

      public void setDomains(util.Scanner scan)
      Set the scanner to read the domain descriptions from.
      Parameters:
      scan - the scanner to read the domain descriptions from
      Since:
      2007.05.18 (Christian Borgelt)
    • setDomains

      public void setDomains(table.Table tab)
      Set the domain descriptions.
      Parameters:
      tab - the domain descriptions
      Since:
      2007.05.17 (Christian Borgelt)
    • setTarget

      public void setTarget(String target)
      Set the name of the target column.
      Parameters:
      target - the name of the target column
      Since:
      2007.05.17 (Christian Borgelt)
    • setTarget

      public void setTarget(int trgid)
      Set the id of the target column.
      Parameters:
      trgid - the id of the target column
      Since:
      2007.05.17 (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.17 (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.17 (Christian Borgelt)
    • setInput

      public void setInput(util.TableReader reader)
      Set the table reader and read mode.
      Parameters:
      reader - the table reader
      Since:
      2007.05.17 (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.17 (Christian Borgelt)
    • setInput

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

      public void setDegree(int deg)
      Set the degree of the regression polynomial.

      The default degree is 1.

      Parameters:
      deg - the degree of the regression polynomial
      Since:
      2007.05.16 (Christian Borgelt)
    • setMin

      public void setMin(double min)
      Set the minimum for a logit transformation.
      Parameters:
      min - the maximum for a logit transformation
      Since:
      2015.08.12 (Christian Borgelt)
    • setMax

      public void setMax(double max)
      Set the maximum for a logit transformation.
      Parameters:
      max - the maximum for a logit transformation
      Since:
      2007.05.16 (Christian Borgelt)
    • setMinMax

      public void setMinMax(double min, double max)
      Set the range for a logit transformation.
      Parameters:
      min - the minimum for a logit transformation
      max - the maximum for a logit transformation
      Since:
      2015.08.12 (Christian Borgelt)
    • setReg

      public void setReg(double reg)
      Set the initial Tikhonov regularization.
      Parameters:
      reg - the initial regularization value
      Since:
      2015.08.12 (Christian Borgelt)
    • setLim

      public void setLim(double lim)
      Set the limit for the Tikhonov regularization.
      Parameters:
      lim - the limit for the regularization value
      Since:
      2015.08.12 (Christian Borgelt)
    • setRegLim

      public void setRegLim(double reg, double lim)
      Set initial value and limit for the Tikhonov regularization.
      Parameters:
      reg - the initial regularization value
      lim - the limit for the regularization value
      Since:
      2015.08.12 (Christian Borgelt)
    • setOutput

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

      public void setOutput(Writer writer)
      Set the output file writer.
      Parameters:
      writer - the output file writer
      Since:
      2007.05.17 (Christian Borgelt)
    • getRegression

      public Regression getRegression()
      Get the induced regression model.
      Returns:
      the induced regression model
      Since:
      2007.05.16 (Christian Borgelt)
    • induce

      public void induce() throws IOException, RegException
      Induce a regression model.
      Throws:
      IOException - if an i/o error occurs
      RegException - if there are too many regression terms
      Since:
      2007.05.16 (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.16 (Christian Borgelt)
    • abort

      public void abort()
      Abort a regression model induction.
      Specified by:
      abort in interface util.Executable
      Since:
      2007.05.16 (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.16 (Christian Borgelt)