Codota Logo
SpTree.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.deeplearning4j.clustering.sptree.SpTree
constructor

Best Java code snippets using org.deeplearning4j.clustering.sptree.SpTree.<init> (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: org.deeplearning4j/deeplearning4j-core

@Override
public Gradient gradient() {
  if (yIncs == null)
    yIncs = zeros(Y.shape());
  if (gains == null)
    gains = ones(Y.shape());
  AtomicDouble sumQ = new AtomicDouble(0);
  /* Calculate gradient based on barnes hut approximation with positive and negative forces */
  INDArray posF = Nd4j.create(Y.shape());
  INDArray negF = Nd4j.create(Y.shape());
  if (tree == null)
    tree = new SpTree(Y);
  tree.computeEdgeForces(rows, cols, vals, N, posF);
  for (int n = 0; n < N; n++)
    tree.computeNonEdgeForces(n, theta, negF.slice(n), sumQ);
  INDArray dC = posF.subi(negF.divi(sumQ));
  Gradient ret = new DefaultGradient();
  ret.gradientForVariable().put(Y_GRAD, dC);
  return ret;
}
origin: org.deeplearning4j/nearestneighbor-core

children[i] = new SpTree(this, data, newCorner, newWidth, indices);
origin: org.deeplearning4j/deeplearning4j-tsne

@Override
public Gradient gradient() {
  MemoryWorkspace workspace =
      workspaceMode == WorkspaceMode.NONE ? new DummyWorkspace()
          : Nd4j.getWorkspaceManager().getWorkspaceForCurrentThread(
          workspaceConfigurationExternal,
          workspaceExternal);
  try (MemoryWorkspace ws = workspace.notifyScopeEntered()) {
    if (yIncs == null)
      yIncs = zeros(Y.shape());
    if (gains == null)
      gains = ones(Y.shape());
    AtomicDouble sumQ = new AtomicDouble(0);
    /* Calculate gradient based on barnes hut approximation with positive and negative forces */
    INDArray posF = Nd4j.create(Y.shape());
    INDArray negF = Nd4j.create(Y.shape());
    if (tree == null) {
      tree = new SpTree(Y);
      tree.setWorkspaceMode(workspaceMode);
    }
    tree.computeEdgeForces(rows, cols, vals, N, posF);
    for (int n = 0; n < N; n++)
      tree.computeNonEdgeForces(n, theta, negF.slice(n), sumQ);
    INDArray dC = posF.subi(negF.divi(sumQ));
    Gradient ret = new DefaultGradient();
    ret.gradientForVariable().put(Y_GRAD, dC);
    return ret;
  }
}
org.deeplearning4j.clustering.sptreeSpTree<init>

Popular methods of SpTree

  • computeNonEdgeForces
    Compute non edge forces using barnes hut
  • computeEdgeForces
    Compute edge forces using barns hut
  • depth
    The depth of the node
  • fill
  • init
  • insert
  • isCorrect
    Verifies the structure of the tree (does bounds checking on each node)
  • isLeaf
  • setWorkspaceMode
  • subDivide
    Subdivide the node in to 4 children

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JTextField (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now