question: public IndependenceTest indTestSubset ( List < Node > vars ) { if ( vars . isEmpty ( ) ) { throw new IllegalArgumentException ( "Subset may not be empty." ) ; } for ( Node var : vars ) { if ( ! variables . contains ( var ) ) { throw new IllegalArgumentException ( "All vars must be original vars" ) ; } } int [ ] indices = new int [ vars . size ( ) ] ; for ( int i = 0 ; i < indices . length ; i ++ ) { indices [ i ] = indexMap . get ( vars . get ( i ) ) ; } DataSet newDataSet = dataSet . subsetColumns ( indices ) ; return new IndTestDirichletScore ( newDataSet , getSamplePrior ( ) , getStructurePrior ( ) ) ; }
target:  Creates a new independence test instance for a subset of the variables.