원클릭으로
sklearn-eval-patterns
scikit-learn patterns for single-feature LR and RF evaluation with cross-validation and AUC scoring.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
scikit-learn patterns for single-feature LR and RF evaluation with cross-validation and AUC scoring.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | sklearn-eval-patterns |
| description | scikit-learn patterns for single-feature LR and RF evaluation with cross-validation and AUC scoring. |
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import StratifiedKFold, cross_val_predict
from sklearn.metrics import roc_auc_score
from sklearn.preprocessing import StandardScaler
def single_feature_model(X, y, n_folds=5):
cv = StratifiedKFold(n_splits=n_folds, shuffle=True, random_state=42)
# LR (needs scaling)
X_scaled = StandardScaler().fit_transform(X)
lr_probs = cross_val_predict(
LogisticRegression(max_iter=1000, random_state=42),
X_scaled, y, cv=cv, method="predict_proba",
)[:, 1]
# RF (no scaling needed)
rf_probs = cross_val_predict(
RandomForestClassifier(
n_estimators=100, max_depth=5, min_samples_leaf=10,
class_weight="balanced", random_state=42,
),
X, y, cv=cv, method="predict_proba",
)[:, 1]
return {
"auc_lr": roc_auc_score(y, lr_probs),
"auc_rf": roc_auc_score(y, rf_probs),
}
class_weight="balanced" — groups are heavily imbalancedmax_depth=None for RF — will overfit on small strataTesting conventions, patterns, and best practices for kreview. MANDATORY reading before adding or modifying tests.
nbdev cell directives, module export conventions, editing workflow, and testing patterns for notebook-first development. MANDATORY reading before editing any kreview Python module.
5-tier ctDNA labeling hierarchy with IMPACT tissue rescue, CH hotspot filtering, configurable VAF/variant thresholds, and continuous VAF regression stats.
How to parse cBioPortal MAF, SV, CNA, and clinical files for the labeling pipeline.
Structured debugging framework for kreview data pipeline issues
DuckDB glob scan patterns, connection management, and performance for kreview