Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
X = check_array(X)
pred = []
for i in range(n_estimators):
estimator = clfs[i]
if verbose > 1:
print("predicting with estimator %d of %d for this parallel run "
"(total %d)..." % (i + 1, n_estimators, total_n_estimators))
# project matrix
X_scaled = jl_transform(X, rp_transformers[i])
# turn approximator scores to labels by outlier
if approx_flags[i] == 1:
raw_scores = approximators[i].predict(X_scaled)
predicted_scores = raw_score_to_proba(estimator.decision_scores_,
raw_scores)
else:
predicted_scores = estimator.predict_proba(X_scaled)
pred.append(predicted_scores[:, 1])
# pred.append(predicted_scores)
return pred