Examples of UpdateAction


Examples of org.apache.commons.math3.ml.neuralnet.UpdateAction

        final DistanceMeasure dist = new EuclideanDistance();
        final LearningFactorFunction learning
            = LearningFactorFunctionFactory.exponentialDecay(1, 0.1, 100);
        final NeighbourhoodSizeFunction neighbourhood
            = NeighbourhoodSizeFunctionFactory.exponentialDecay(3, 1, 100);
        final UpdateAction update = new KohonenUpdateAction(dist, learning, neighbourhood);

        // The following test ensures that, after one "update",
        // 1. when the initial learning rate equal to 1, the best matching
        //    neuron's features are mapped to the input's features,
        // 2. when the initial neighbourhood is larger than the network's size,
        //    all neuron's features get closer to the input's features.

        final double[] features = new double[] { 0.3 };
        final double[] distancesBefore = new double[netSize];
        int count = 0;
        for (Neuron n : net) {
            distancesBefore[count++] = dist.compute(n.getFeatures(), features);
        }
        final Neuron bestBefore = MapUtils.findBest(features, net, dist);

        // Initial distance from the best match is larger than zero.
        Assert.assertTrue(dist.compute(bestBefore.getFeatures(), features) >= 0.2);

        update.update(net, features);

        final double[] distancesAfter = new double[netSize];
        count = 0;
        for (Neuron n : net) {
            distancesAfter[count++] = dist.compute(n.getFeatures(), features);
View Full Code Here

Examples of org.apache.directory.ldapstudio.actions.UpdateAction

        preferencesAction = ActionFactory.PREFERENCES.create( window );
        preferencesAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SHOW_PREFERENCES ) );
        register( preferencesAction );

        updateAction = new UpdateAction( window );
        updateAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SEARCH_UPDATES ) );
        register( updateAction );

        manageConfigurationAction = new ManageConfigurationAction( window );
View Full Code Here

Examples of org.apache.directory.studio.actions.UpdateAction

        preferencesAction = ActionFactory.PREFERENCES.create( window );
        preferencesAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SHOW_PREFERENCES ) );
        register( preferencesAction );

        updateAction = new UpdateAction( window );
        updateAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SEARCH_UPDATES ) );
        register( updateAction );

        manageConfigurationAction = new ManageConfigurationAction( window );
View Full Code Here

Examples of org.apache.directory.studio.actions.UpdateAction

        preferencesAction = ActionFactory.PREFERENCES.create( window );
        preferencesAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SHOW_PREFERENCES ) );
        register( preferencesAction );

        updateAction = new UpdateAction( window );
        updateAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SEARCH_UPDATES ) );
        register( updateAction );

        manageConfigurationAction = new ManageConfigurationAction( window );
View Full Code Here

Examples of org.apache.directory.studio.actions.UpdateAction

        preferencesAction = ActionFactory.PREFERENCES.create( window );
        preferencesAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SHOW_PREFERENCES ) );
        register( preferencesAction );

        updateAction = new UpdateAction( window );
        updateAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SEARCH_UPDATES ) );
        register( updateAction );

        addExtensionAction = new AddExtensionAction( window );
View Full Code Here

Examples of org.apache.directory.studio.actions.UpdateAction

        preferencesAction = ActionFactory.PREFERENCES.create( window );
        preferencesAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SHOW_PREFERENCES ) );
        register( preferencesAction );

        updateAction = new UpdateAction( window );
        updateAction.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
            ImageKeys.SEARCH_UPDATES ) );
        register( updateAction );

        manageConfigurationAction = new ManageConfigurationAction( window );
View Full Code Here

Examples of org.apache.felix.sigil.common.runtime.io.UpdateAction

                            break;
                        case UNINSTALL:
                            task = new UninstallAction(in, out);
                            break;
                        case UPDATE:
                            task = new UpdateAction(in, out);
                            break;
                        case STATUS:
                            task = new StatusAction(in, out);
                            break;
                        case REFRESH:
View Full Code Here

Examples of org.apache.felix.sigil.common.runtime.io.UpdateAction

    public void update(long bundle) throws IOException, BundleException
    {
        if (socket == null)
            throw new IllegalStateException("Not connected");
        Update update = new UpdateAction.Update(bundle, null);
        new UpdateAction(in, out).client(update);
    }
View Full Code Here

Examples of org.apache.felix.sigil.common.runtime.io.UpdateAction

    public void update(long bundle, String url) throws IOException, BundleException
    {
        if (socket == null)
            throw new IllegalStateException("Not connected");
        Update update = new UpdateAction.Update(bundle, url);
        new UpdateAction(in, out).client(update);
    }
View Full Code Here

Examples of org.dmlite.model.action.UpdateAction

   * @throws dmLite
   *             action exception if there is a problem
   */
  public boolean update(T entity, T updateEntity)
      throws ActionException {
    EntitiesAction entitiesUpdateAction = new UpdateAction();
    entitiesUpdateAction.setEntities(this);
    entitiesUpdateAction.setEntity(entity);
    entitiesUpdateAction.setUpdateEntity(updateEntity);
    try {
      if (entity == updateEntity) {
        String error = "The before update entity and the after update entity cannot be the same object.";
        throw new ActionException(error, entitiesUpdateAction);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.