func New(nstage, ntree, percentboot, nfeature int,
	tprate, tnrate float64,
	samples tabula.ClasetInterface,
) (
	crf *Runtime,
) {
	crf = &Runtime{
		NStage:         nstage,
		NTree:          ntree,
		PercentBoot:    percentboot,
		NRandomFeature: nfeature,
		TPRate:         tprate,
		TNRate:         tnrate,
	}
	return crf
}
New create and return new input for cascaded random-forest.
package crf
import (
	"errors"
	"fmt"
	"math"
	"sort"
	"github.com/shuLhan/share/lib/debug"
	"github.com/shuLhan/share/lib/floats64"
	"github.com/shuLhan/share/lib/mining/classifier"
	"github.com/shuLhan/share/lib/mining/classifier/rf"
	"github.com/shuLhan/share/lib/numbers"
	libstrings "github.com/shuLhan/share/lib/strings"
	"github.com/shuLhan/share/lib/tabula"
)
const (
	tag = "[crf]"
	DefStage = 200
	DefTPRate = 0.9
	DefTNRate = 0.7
	DefNumTree = 1
	DefPercentBoot = 66
	DefPerfFile = "crf.perf"
	DefStatFile = "crf.stat"
)
var (
	ErrNoInput = errors.New("rf: input samples is empty")
)
type Runtime struct {
	classifier.Runtime
	NStage int `json:"NStage"`
	TPRate float64 `json:"TPRate"`
	TNRate float64 `json:"TNRate"`
	NTree int `json:"NTree"`
	NRandomFeature int `json:"NRandomFeature"`
	PercentBoot int `json:"PercentBoot"`
	forests []*rf.Runtime
	weights []float64
	tnset *tabula.Claset
}