Class DataReadObservationVectorXF

java.lang.Object
com.polytechnik.utils.DataReadObservationVectorXF

public class DataReadObservationVectorXF extends Object
A class to store read sample data.
  • Field Details

  • Constructor Details

  • Method Details

    • printData

      public void printData()
    • getReplacedData

      Create a dataset with observations replaced.
    • addConstantToBasis

      XXMatrs addConstantToBasis(int n, int ngoodx, double[] fmatrnorm, double[] basisfun, double[] fXaverage)
      Add attribute x=const to basis.
    • createAttributeTextualRepresentation

      String createAttributeTextualRepresentation(double[] psiorigbasis, int[] indexes, double[] norm, double[] xorig_average)
    • getDataRegularized_EV

      public RegularizedVectorXF getDataRegularized_EV()
      Remove duplicated data from x attributes.
    • getDataRegularized_LIN

      public RegularizedVectorXF getDataRegularized_LIN()
      Remove duplicated data from x attributes, similar to getDataRegularized_EV but a regular Gaussian elimination with pivoting is used instead of the eigenproblem. Similar to getGramSchmidtOrthogonalized with pivoting.
    • getCovarianceMatrix

      XXMatrs getCovarianceMatrix()
      Covariance matrix (without normalizing to total weight).
    • getFun1Fun2Averaged

      XXMatrs getFun1Fun2Averaged(Function<ObservationVectorXF,double[]> observationToFun1, Function<ObservationVectorXF,double[]> observationToFun2)
      Calculate <observationToFun1(o)[j]|observationToFun2(o)[k]> and <observationToFun1(o)[j]|f|observationToFun2(o)[k]> averages. This is a more general version than getXXandXfX that works only with symmetric matrices.
      Parameters:
      observationToFun1 - a function to obtain first arg to average.
      observationToFun2 - a function to obtain second arg to average.
      Returns:
      Two matrices matrix[j][k] of Fun1.length rows and Fun2.length columns of product averages with and without f.
    • getXXandXfX

      XXMatrs getXXandXfX(Function<double[],double[]> convertxFromOriginalToX)
    • getXXandXfX

      XXMatrs getXXandXfX(Function<double[],double[]> convertxFromOriginalToX, ToDoubleFunction<double[]> getFactorToDivide)
      For unit test.
    • getRadonNikodymSpectralModel_WithoutRegularization

      public RadonNikodymSpectralModel getRadonNikodymSpectralModel_WithoutRegularization()
      For unit tests. Use with a big care. The method 1) may be unstable for redundant data 2) if there is no const among x_k linear combinations the result is incorrect.
    • getAttribsProductsMultiIndexed_WithoutRegularization

      public DataReadObservationVectorXF getAttribsProductsMultiIndexed_WithoutRegularization(int d)
      For unit tests. Use with a big care. The method 1) may be unstabele for redundant data 2) if there is no const among x_k linear combinations the result is incorrect.
    • getObservations

      public static DataReadObservationVectorXF getObservations(String filename, int columns_number, int[] indcol_x, int indcol_f, int indcol_weight, int indcol_label) throws IOException
      Read observations sequence from a file. The lines starting with "|" are considered as comments. If the first line starts with "|#", then it considered as attributes names.
      Throws:
      IOException