@Test
public void demoSomeMethod() {

    int n=10000;
    int[] y=new int[n];
    for (int i=0; i<y.length; ++i){
        y[i]=i<n/2 ? 0 :1;
    }
    
    Matrix M =new Matrix(n, 100);
    M.randomize();
    M.add(-.5);
    M.column(0).set(1);
    
    DiscreteModel model=new DiscreteModel(new Probit());
    //LbfgsMinimizer min=new LbfgsMinimizer();
    //min.setMemoryLength(3);
    //model.setMinimizer(min);
    DiscreteModelEvaluation rslt = model.process(y, M);
    IReadDataBlock parameters = rslt.getParameters();
    System.out.println(parameters);
    System.out.println(new DataBlock(rslt.gradient()));
    model=new DiscreteModel(new Logit());
    rslt = model.process(y, M);
    parameters = rslt.getParameters();
    System.out.println(parameters);
    System.out.println(new DataBlock(rslt.gradient()));
}