<commit_before>package hex;

import hex.nn.NN;
import hex.nn.NNModel;
import junit.framework.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import water.JUnitRunnerDebug;
import water.Key;
import water.TestUtil;
import water.UKV;
import water.fvec.Frame;
import water.fvec.NFSFileVec;
import water.fvec.ParseDataset2;
import water.util.Log;

public class NeuralNetSpiralsTest2 extends TestUtil {
  @BeforeClass public static void stall() {
    stall_till_cloudsize(JUnitRunnerDebug.NODES);
  }

  @Test public void run() {
    Key file = NFSFileVec.make(find_test_file("smalldata/neural/two_spiral.data"));
    Frame frame = ParseDataset2.parse(Key.make(), new Key[]{file});

    Key dest = Key.make("spirals2");

    // build the model
    {
      NN p = new NN();
      p.seed = 0xDADAAAA;
      p.rate = 0.007;
      p.rate_annealing = 0;
      p.epochs = 3000;
      p.hidden = new int[]{100};
      p.activation = NN.Activation.Tanh;
      p.max_w2 = Double.MAX_VALUE;
      p.l1 = 0;
      p.l2 = 0;
      p.momentum_start = 0;
      p.momentum_ramp = 0;
      p.momentum_stable = 0;
      p.initial_weight_distribution = NN.InitialWeightDistribution.Normal;
      p.initial_weight_scale = 2.5;
      p.loss = NN.Loss.CrossEntropy;
      p.source = frame;
      p.response = frame.lastVec();
      p.validation = null;
      p.score_interval = 10;
      p.ignored_cols = null;<commit_msg>Change of random seed for NN test to achieve the same behavior for Java6 and Java7.<commit_after>package hex;

import hex.nn.NN;
import hex.nn.NNModel;
import junit.framework.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import water.JUnitRunnerDebug;
import water.Key;
import water.TestUtil;
import water.UKV;
import water.fvec.Frame;
import water.fvec.NFSFileVec;
import water.fvec.ParseDataset2;
import water.util.Log;

public class NeuralNetSpiralsTest2 extends TestUtil {
  @BeforeClass public static void stall() {
    stall_till_cloudsize(JUnitRunnerDebug.NODES);
  }

  @Test public void run() {
    Key file = NFSFileVec.make(find_test_file("smalldata/neural/two_spiral.data"));
    Frame frame = ParseDataset2.parse(Key.make(), new Key[]{file});

    Key dest = Key.make("spirals2");

    // build the model
    {
      NN p = new NN();
      p.seed = 0xbabe;
      p.rate = 0.007;
      p.rate_annealing = 0;
      p.epochs = 3000;
      p.hidden = new int[]{100};
      p.activation = NN.Activation.Tanh;
      p.max_w2 = Double.MAX_VALUE;
      p.l1 = 0;
      p.l2 = 0;
      p.momentum_start = 0;
      p.momentum_ramp = 0;
      p.momentum_stable = 0;
      p.initial_weight_distribution = NN.InitialWeightDistribution.Normal;
      p.initial_weight_scale = 2.5;
      p.loss = NN.Loss.CrossEntropy;
      p.source = frame;
      p.response = frame.lastVec();
      p.validation = null;
      p.score_interval = 10;
      p.ignored_cols = null;
{'fraction_non_alphanumeric': 0.11689212625737079, 'fraction_numerical': 0.02081165452653486, 'mean_word_length': 2.9779310344827588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1551813', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1001, 'n_words': 218}