Package trust.jfcm

Examples of trust.jfcm.SigmoidActivator


          paramElem.setAttribute("name", "threshold");
          paramElem.setAttribute("value", Double.toString(act.getThreshold()));
          elemConcept.appendChild(paramElem);

        } else if (c.getConceptActivator() instanceof SigmoidActivator) {
          SigmoidActivator act = (SigmoidActivator) c.getConceptActivator();
          elemConcept.setAttribute("act", "SIGMOID");
          Element paramElem = doc.createElement("param");
          paramElem.setAttribute("name", "k");
          paramElem.setAttribute("value", Double.toString(act.getK()));
          elemConcept.appendChild(paramElem);

        } else if (c.getConceptActivator() instanceof HyperbolicTangentActivator) {
          HyperbolicTangentActivator act = (HyperbolicTangentActivator) c
              .getConceptActivator();
          elemConcept.setAttribute("act", "TANH");
          Element paramElem = doc.createElement("param");
          paramElem.setAttribute("name", "threshold");
          paramElem.setAttribute("value", Double.toString(act.getThreshold()));
          elemConcept.appendChild(paramElem);
        }
      }
      if (c.getInput() != null) {
        elemConcept.setAttribute("input", c.getInput().toString());
View Full Code Here


        act.setThreshold(threshold);
      }
      c.setConceptActivator(act);

    } else if ("SIGMOID".equals(actAttr)) {
      SigmoidActivator act = new SigmoidActivator();
      Element kParam = (Element) xpath.evaluate("param[@name='k']", conceptElem,
          XPathConstants.NODE);
      Double k = null;
      if (kParam != null) {
        k = Double.parseDouble(xpath.evaluate("@value", kParam));
      }
      if (k != null) {
        act.setK(k);
      }
      c.setConceptActivator(act);

    } else if ("TANH".equals(actAttr)) {
      HyperbolicTangentActivator act = new HyperbolicTangentActivator();
      //add alpha parameter
      Element alphaParam = (Element) xpath.evaluate("param[@name='alpha']", conceptElem,
          XPathConstants.NODE);
      Double alpha = null;
      if (alphaParam != null) {
        alpha = Double.parseDouble(xpath.evaluate("@value", alphaParam));
      }
      if (alpha != null) {
        act.setAlpha(alpha);
      }
     
      if (threshold != null) {
        act.setThreshold(threshold);
      }
      c.setConceptActivator(act);
    } else if ("IDENTITY".equals(actAttr)) {
      IdentityActivator act = new IdentityActivator();
      c.setConceptActivator(act);
View Full Code Here

        act.setThreshold(threshold);
      }
      c.setConceptActivator(act);
   
    } else if ("SIGMOID".equals(actAttr)) {
      SigmoidActivator act = new SigmoidActivator();
      Element kParam = (Element) xpath.evaluate("param[@name='k']", conceptElem,
          XPathConstants.NODE);
      Double k = null;
      if (kParam != null) {
        k = Double.parseDouble(xpath.evaluate("@value", kParam));
      }
      if (k != null) {
        act.setK(k);
      }
      c.setConceptActivator(act);
   
    } else if ("TANH".equals(actAttr)) {
      HyperbolicTangentActivator act = new HyperbolicTangentActivator();
      /* add alpha parameter */
      Element alphaParam = (Element) xpath.evaluate("param[@name='alpha']", conceptElem,
          XPathConstants.NODE);
      Double alpha = null;
      if (alphaParam != null) {
        alpha = Double.parseDouble(xpath.evaluate("@value", alphaParam));
      }
      if (alpha != null) {
        act.setAlpha(alpha);
      }
     
      if (threshold != null) {
        act.setThreshold(threshold);
      }
      c.setConceptActivator(act);
    } else if ("IDENTITY".equals(actAttr)) {
      IdentityActivator act = new IdentityActivator();
      c.setConceptActivator(act);
View Full Code Here

TOP

Related Classes of trust.jfcm.SigmoidActivator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.