<commit_before>package com.telmomenezes.synthetic.cli;

import java.io.BufferedWriter;
import java.io.FileWriter;

import com.telmomenezes.synthetic.Net;
import com.telmomenezes.synthetic.Evo;
import com.telmomenezes.synthetic.Generator;
import com.telmomenezes.synthetic.samplers.DownSampler;


public class Evolve extends Command {

    @Override
    public boolean run() throws SynCliException {
        
        String netfile = getStringParam("inet");
        String outdir = getStringParam("odir");
        int generations = getIntegerParam("gens", 1000);
        double sr = getDoubleParam("sr", 0.0006);
        int bins = getIntegerParam("bins", 100);
        int maxNodes = getIntegerParam("maxnodes", 999999999);
        int maxEdges = getIntegerParam("maxedges", 999999999);
        boolean directed = !paramExists("undir");
        double tolerance = getDoubleParam("tolerance", 0.1);
        
        Net net = Net.load(netfile, directed);
        
        // down sampling if needed
        Net sampleNet = DownSampler.sample(net, maxNodes, maxEdges);
        
     	Generator baseGenerator = new Generator(sampleNet.getNodeCount(), sampleNet.getEdgeCount(), directed, sr);
     	
        Evo evo = new Evo(sampleNet, generations, bins, tolerance, baseGenerator, outdir);
        
        System.out.println("target net: " + netfile);
        System.out.println(evo.infoString());
        System.out.println(baseGenerator);
        
        // write experiment params to file
        try {
            FileWriter fstream = new FileWriter(outdir + "/params.txt");
            BufferedWriter out = new BufferedWriter(fstream);
            out.write(evo.infoString());
            out.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        
        evo.run();
        
        return true;
    }
}<commit_msg>updating default config<commit_after>package com.telmomenezes.synthetic.cli;

import java.io.BufferedWriter;
import java.io.FileWriter;

import com.telmomenezes.synthetic.Net;
import com.telmomenezes.synthetic.Evo;
import com.telmomenezes.synthetic.Generator;
import com.telmomenezes.synthetic.samplers.DownSampler;


public class Evolve extends Command {

    @Override
    public boolean run() throws SynCliException {
        
        String netfile = getStringParam("inet");
        String outdir = getStringParam("odir");
        int generations = getIntegerParam("gens", 1000);
        double sr = getDoubleParam("sr", 0.0006);
        int bins = getIntegerParam("bins", 100);
        int maxNodes = getIntegerParam("maxnodes", 999999999);
        int maxEdges = getIntegerParam("maxedges", 999999999);
        boolean directed = !paramExists("undir");
        double tolerance = getDoubleParam("tolerance", 0.01);
        
        Net net = Net.load(netfile, directed);
        
        // down sampling if needed
        Net sampleNet = DownSampler.sample(net, maxNodes, maxEdges);
        
     	Generator baseGenerator = new Generator(sampleNet.getNodeCount(), sampleNet.getEdgeCount(), directed, sr);
     	
        Evo evo = new Evo(sampleNet, generations, bins, tolerance, baseGenerator, outdir);
        
        System.out.println("target net: " + netfile);
        System.out.println(evo.infoString());
        System.out.println(baseGenerator);
        
        // write experiment params to file
        try {
            FileWriter fstream = new FileWriter(outdir + "/params.txt");
            BufferedWriter out = new BufferedWriter(fstream);
            out.write(evo.infoString());
            out.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        
        evo.run();
        
        return true;
    }
}
{'fraction_non_alphanumeric': 0.10686615014694095, 'fraction_numerical': 0.017365749398877906, 'mean_word_length': 2.502338634237605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '5387465', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1024, 'n_words': 234}