MATLAB File Help: prtRvIndependent/prtRvIndependent
prtRvIndependent/prtRvIndependent
  prtRvIndependent  Independent random variables
 
    RV = prtRvIndependent creates a prtRvIndependent object.
    prtRvIndependent objects enable the training of independent
    versions of a base random variable type on each column of a data
    set.  By default, prtRvIndependent assumes Gaussian distributed
    random variables.
 
    RV = prtRvIndependent('baseRv', VALUE) specifies the type of RV to
    be trained on each column of input data.  VALUE must specify a
    valid prtRV class.  By default the baseRv field is a
    prtRvIndependent.
 
    RV = prtRvIndependent(PROPERTY1, VALUE1,...) creates a
    prtRvIndependent object RV with properties as specified by
    PROPERTY/VALUE pairs.
 
    A prtRvIndependent object inherits all properties from the prtRv
    class. In addition, it has the following properties:
 
    baseRv          - A prtRv object specifying the type of classifier
                      to create independent versions of.
 
    rvArray         - An array of objects of type baseRv that are
                      generated by calling the MLE method.  Can also be
                      manually set to specify particular parameters.
    
   A prtRvIndependent object inherits all methods from the prtRv class. 
   The MLE method can be used to estimate the distribution parameters from
   data.
 
   Example:
 
   dataSet    = prtDataGenUnimodal;   % Load a dataset consisting of 2
                                      % classes
   % Extract one of the classes from the dataSet
   dataSetOneClass = prtDataSetClass(dataSet.getObservationsByClass(1));
 
   mvnRv = prtRvIndependent;            % Create a prtRvIndependent
                                        % object, with mvn components
   mvnRv = mvnRv.mle(dataSetOneClass);  % Compute the maximum
                                        % likelihood estimate from the
                                        % data
 
   indepRv = prtRvIndependent;          %Created an indepednent RV
                                        %(default baseRv is gaussian)
 
   indepRv = indepRv.mle(dataSetOneClass);
 
   subplot(2,2,1); mvnRv.plotPdf; 
   hold on; dataSetOneClass.plot;
   title('MVN RV Pdf');
 
   subplot(2,2,2); indepRv.plotPdf; 
   hold on; dataSetOneClass.plot;
   title('Independent Gaussian RV Pdf');
See also