Skip to content

Commit

Permalink
new SGVector system changes
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed May 5, 2012
1 parent 49cccd0 commit 20e72f4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/shogun/statistics/LinearTimeMMD.cpp
Expand Up @@ -91,10 +91,6 @@ float64_t CLinearTimeMMD::compute_statistic()
for (index_t i=m_2; i<m; ++i)
third+=tr_K_xy.vector[i-m_2];

tr_K_x.destroy_vector();
tr_K_y.destroy_vector();
tr_K_xy.destroy_vector();

return 1.0/m_2*(first+second)+1.0/m*third;
}

Expand Down Expand Up @@ -143,16 +139,12 @@ float64_t CLinearTimeMMD::bootstrap_threshold(float64_t confidence)
m_p_and_q->remove_subset();
}

/* clean up */
ind_permutation.destroy_vector();

/* compute threshold, sort elements and return the one that corresponds to
* confidence niveau */
CMath::qsort(results.vector, results.vlen);
index_t result_idx=CMath::round((1-confidence)*results.vlen);
float64_t result=results.vector[result_idx];

/* clean up and return */
results.destroy_vector();
return result;
}

0 comments on commit 20e72f4

Please sign in to comment.