MCPcopy
hub / github.com/ddbourgin/numpy-ml / bootstrap_sample

Function bootstrap_sample

numpy_ml/trees/rf.py:5–8  ·  view source on GitHub ↗
(X, Y)

Source from the content-addressed store, hash-verified

3
4
5def bootstrap_sample(X, Y):
6 N, M = X.shape
7 idxs = np.random.choice(N, N, replace=True)
8 return X[idxs], Y[idxs]
9
10
11class RandomForest:

Callers 1

fitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected