question: public void initializeAtomsForDP ( List < Datum > data , String filename , Random random ) { omega = new ArrayList < > ( K ) ; dof = new double [ K ] ; beta = new double [ K ] ; if ( filename != null ) { try { loc = BatchMixtureModel . initializeClustersFromFile ( filename , K ) ; log . debug ( "loc : {}" , loc ) ; if ( loc . size ( ) < K ) { loc = BatchMixtureModel . gonzalezInitializeMixtureCenters ( loc , data , K , random ) ; } } catch ( FileNotFoundException e ) { log . debug ( "failed to initialized from file" ) ; e . printStackTrace ( ) ; loc = BatchMixtureModel . gonzalezInitializeMixtureCenters ( data , K , random ) ; } } else { loc = BatchMixtureModel . gonzalezInitializeMixtureCenters ( data , K , random ) ; } for ( int i = 0 ; i < K ; i ++ ) { beta [ i ] = 1 ; dof [ i ] = baseNu ; omega . add ( 0 , AlgebraUtils . invertMatrix ( baseOmegaInverse ) ) ; } }
target:  Initializes atom (component) distributions. This method works great with DP mixture model.