MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / run

Method run

JSAT/src/jsat/datatransform/visualization/MDS.java:221–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219 {
220
221 @Override
222 public void run()
223 {
224 //we need to set B correctly
225 for (int i = ID; i < B.rows(); i += SystemInfo.LogicalCores)
226 for (int j = i + 1; j < B.rows(); j++)
227 {
228 double d_ij = embedMetric.dist(i, j, X_views, X_rowCache);
229
230 if(d_ij > 1e-5)//avoid creating silly huge values
231 {
232 double b_ij = -delta.get(i, j)/d_ij;//-w_ij if we support weights in the future
233 B.set(i, j, b_ij);
234 B.set(j, i, b_ij);
235 }
236 else
237 {
238 B.set(i, j, 0);
239 B.set(j, i, 0);
240 }
241 }
242 latch.countDown();
243 }
244 });
245 }
246

Callers

nothing calls this directly

Calls 6

countDownMethod · 0.80
distMethod · 0.65
rowsMethod · 0.45
getMethod · 0.45
setMethod · 0.45
addAndGetMethod · 0.45

Tested by

no test coverage detected