class
RandomForest extends Model
Instance Constructors
-
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
val
ICat: Int
-
val
IFeat: Int
-
val
INode: Int
-
val
ITree: Int
-
val
IVFeat: Int
-
val
JFeat: Int
-
var
_modelmats: Array[Mat]
-
def
addSVecs(a: Array[SVec], totals: Array[SVTree]): Unit
-
def
addV(ind1: LMat, counts1: IMat, ind2: LMat, counts2: IMat): (LMat, IMat)
-
final
def
asInstanceOf[T0]: T0
-
var
batchSize: Int
-
-
var
blockv: SVec
-
def
clone(): AnyRef
-
def
copyMats(from: Array[Mat], to: Array[Mat]): Unit
-
def
copyTo(mod: Model): Unit
-
def
copycounts(cnts: IMat, tmpc: IMat): IMat
-
def
copyinds(inds: LMat, tmp: LMat): LMat
-
def
countV(ind1: LMat, counts1: IMat, ind2: LMat, counts2: IMat): Int
-
var
ctrees: FMat
-
-
def
doblock(gmats: Array[Mat], ipass: Int, i: Long): Unit
-
def
doblockg(amats: Array[Mat], ipass: Int, here: Long): Unit
-
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
evalblock(mats: Array[Mat], ipass: Int, here: Long): FMat
-
def
evalblockg(amats: Array[Mat], ipass: Int, here: Long): FMat
-
def
extractAbove(fieldNum: Int, packedFields: Long, fieldshifts: Array[Int]): Int
-
def
extractField(fieldNum: Int, packedFields: Long, fieldshifts: Array[Int], fieldmasks: Array[Int]): Int
-
val
fieldlengths: IMat
-
var
fieldmasks: Array[Int]
-
var
fieldshifts: Array[Int]
-
def
finalize(): Unit
-
def
findBoundaries(keys: LMat, jc: IMat): (IMat, IMat)
-
def
findIndex(blockv: SVec, itree: Int): Int
-
def
floatConvert(a: Float): Int
-
def
floatConvert2(a: Float): Int
-
var
ftrees: IMat
-
def
gaddV(gix: GLMat, gcx: GIMat, gmidinds: GLMat, gmidcounts: GIMat, gmergedinds: GLMat, gmergedcounts: GIMat): (GLMat, GIMat)
-
var
gains: FMat
-
var
gctrees: GMat
-
final
def
getClass(): Class[_]
-
def
getFieldMasks(fL: IMat): Array[Int]
-
def
getFieldShifts(fL: IMat): Array[Int]
-
def
getSum(totals: Array[SVTree]): Array[SVec]
-
var
gfieldlengths: GIMat
-
var
gfnodes: GMat
-
var
gftree: GIMat
-
var
gftrees: GIMat
-
-
var
gitree: GIMat
-
var
gitrees: GIMat
-
def
gjfeatsToIfeats(itree: Int, inodes: IMat, ifeats: IMat, seed: Int, gitree: GIMat, gftree: GIMat): Unit
-
def
gmakeV(keys: GLMat, vals: GIMat, tmpkeys: GLMat, tmpcounts: GIMat): SVec
-
var
gmats: Array[Mat]
-
var
gout: GLMat
-
var
gpiones: GIMat
-
def
gpsort(gout: GLMat): Int
-
var
gtmpcounts: GIMat
-
var
gtmpinds: GLMat
-
var
gtnodes: GIMat
-
def
gtreePack(gdata: GMat, gtnodes: GIMat, gcats: GMat, gout: GLMat, seed: Int): GLMat
-
def
gtreePack(gdata: GMat, gtnodes: GIMat, gcats: GIMat, gout: GLMat, seed: Int): GLMat
-
def
gtreePack(fdata: FMat, tnodes: IMat, icats: IMat, gout: GLMat, seed: Int): GLMat
-
def
gtreeStep(gdata: GMat, tnodes: GIMat, fnodes: GMat, itrees: GIMat, ftrees: GIMat, vtrees: GIMat, ctrees: GMat, getcat: Boolean): Unit
-
def
gtreeWalk(fdata: GMat, tnodes: GIMat, fnodes: GMat, itrees: GIMat, ftrees: GIMat, vtrees: GIMat, ctrees: GMat, depth: Int, getcat: Boolean): Unit
-
var
gvtrees: GIMat
-
def
hashCode(): Int
-
var
igains: FMat
-
val
imptyFunArray: Array[imptyType]
-
def
init(): Unit
-
final
def
isInstanceOf[T0]: Boolean
-
var
itrees: IMat
-
var
jc: IMat
-
def
jfeatsToIfeats(itree: Int, inodes: IMat, ifeats: IMat, seed: Int, gitree: GIMat, gftree: GIMat): Unit
-
var
lens0: Long
-
var
lens1: Long
-
def
load(fname: String): Unit
-
var
lout: LMat
-
final
val
magnitude: Int
-
def
makeV(ind: LMat): SVec
-
var
mats: Array[Mat]
-
def
minImpurity(keys: LMat, cnts: IMat, outv: IMat, outf: IMat, outn: IMat, outg: FMat, outc: FMat, outleft: FMat, outright: FMat, jc: IMat, jtree: IMat, itree: Int, fnum: Int, regression: Boolean): (FMat, Double)
-
def
minImpurity_thread(keys: LMat, cnts: IMat, outv: IMat, outf: IMat, outn: IMat, outg: FMat, outc: FMat, outleft: FMat, outright: FMat, jc: IMat, jtree: IMat, itree: Int, fnum: Int, regression: Boolean, ithread: Int, nthreads: Int): (FMat, Double)
-
def
minImpurityx(keys: LMat, cnts: IMat, outv: IMat, outf: IMat, outn: IMat, outg: FMat, outc: FMat, outleft: FMat, outright: FMat, jc: IMat, jtree: IMat, itree: Int, fnum: Int, regression: Boolean): (FMat, Double)
-
def
modelmats: Array[Mat]
-
var
nbits: Int
-
var
ncats: Int
-
final
def
ne(arg0: AnyRef): Boolean
-
var
nfeats: Int
-
var
nnodes: Int
-
var
nodecounts: IMat
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
var
nsamps: Int
-
var
ntrees: Int
-
val
opts: Opts
-
var
outc: FMat
-
var
outf: IMat
-
var
outg: FMat
-
var
outleft: FMat
-
var
outn: IMat
-
var
outright: FMat
-
var
outv: IMat
-
def
packFields(itree: Int, inode: Int, jfeat: Int, ifeat: Int, ivfeat: Int, icat: Int, fieldlengths: Array[Int]): Long
-
var
parent_model: Model
-
var
putBack: Int
-
var
refresh: Boolean
-
def
regressVar(sumsq: Double, tott: Int, acc: Double, tot: Int, acct: Double, tot2: Int): Double
-
def
rhash(v1: Int, v2: Int, v3: Int, v4: Int, nb: Int): Int
-
def
rhash(v1: Int, v2: Int, v3: Int, nb: Int): Int
-
val
runtimes: FMat
-
def
save(fname: String): Unit
-
var
seed: Int
-
def
setmodelmats(a: Array[Mat]): Unit
-
final
val
signbit: Int
-
def
splittableNodes(blockv: SVec): Array[SVec]
-
def
splittableNodes_thread(blockv: SVec, itree: Int): SVec
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
var
t0: Float
-
var
t1: Float
-
var
t2: Float
-
var
t3: Float
-
var
t4: Float
-
var
t5: Float
-
var
t6: Float
-
def
tally(nodes: FMat): IMat
-
def
tallyv(nodes: FMat): FMat
-
def
toString(): String
-
def
tochildren(itree: Int, inodes: IMat, left: FMat, right: FMat): Unit
-
var
totals: Array[SVTree]
-
def
treePack(fdata: FMat, treenodes: IMat, fcats: FMat, out: LMat, seed: Int): LMat
-
def
treePack(fdata: FMat, treenodes: IMat, cats: IMat, out: LMat, seed: Int): LMat
-
def
treeStep(fdata: FMat, tnodes: IMat, fnodes: FMat, itrees: IMat, ftrees: IMat, vtrees: IMat, ctrees: FMat, getcat: Boolean): Unit
-
def
treeWalk(fdata: FMat, tnodes: IMat, fnodes: FMat, itrees: IMat, ftrees: IMat, vtrees: IMat, ctrees: FMat, depth: Int, getcat: Boolean): FMat
-
def
unpackFields(im: Long, fieldlengths: Array[Int]): (Int, Int, Int, Int, Int, Int)
-
def
updatePass(ipass: Int): Unit
-
var
updatemats: Array[Mat]
-
var
useDouble: Boolean
-
var
useGPU: Boolean
-
var
useIfeats: Boolean
-
var
vtrees: IMat
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
var
x: Mat
-
var
xnodes: IMat
-
var
y: Mat
-
var
ynodes: FMat
Inherited from AnyRef
Inherited from Any
Random Forests. Given a datasource of data and labels, compute a random classification or regression Forest.
* Options
NOTE: The algorithm uses a packed representation of the dataset statistics with fixed precision fields. Setting nbits selects how many bits to use from each input data. For integer data, the lower nbits are used. For floating point data, the leading nbits are used. So e.g. 16 float bits gives sign, 8 bits of exponent, and 7 bits of mantissa with a leading 1.
For regression, discrete (integer) target values should be used in the training data. The output will be continuous values interpolated from them.
Other key parameters inherited from the learner, datasource and updater:
Example:
a is an nfeats x ninstances data matrix, c is a 1 x ninstances vector of labels