ouse(&#39;test_data_small&#39;)</span>
<span class="sd">        model = Match.CaliperMatching(0.5)</span>
<span class="sd">        tmp = model.fit(df, treatment=&#39;treatment&#39;, score=&#39;weight&#39;, exacts=[&#39;x_cat1&#39;])</span>
<span class="sd">        match_df = tmp.filter(&quot;matching_index!=0&quot;) # filter out the unmatched records</span>
<span class="sd">    &gt;&gt;&gt; print(&#39;sample size Before match: &#39;)</span>
<span class="sd">    &gt;&gt;&gt; df.count().show()</span>
<span cl