hscredit Logo
衡 公司官网 GitHub 仓库

入门

  • 功能总览
    • 适用场景
    • 数据探索与策略分析
    • 分箱、编码与筛选
    • 建模、评估与监控
    • 规则、报告与交付
    • 架构设计
  • 安装
    • 基础安装
    • 可选能力
    • 开发模式安装
    • 安装工具兼容
    • 验证安装
    • Agent Skills
    • 构建文档
  • 快速开始
    • 1. 准备数据并按时间切分
    • 2. 数据探索
    • 3. 分箱与变量筛选
    • 4. 评分卡建模
    • 5. 机器学习模型与概率校准
    • 6. 策略规则挖掘
    • 7. 模型报告和制品保存
    • 8. 规则表达式
  • 逾期标签与灰客户
    • 用法
    • 支持入口
    • 默认值、配置优先级和表头

建模实践

  • 损失函数:训练、评估与调参
    • 1. 先区分三个用途
    • 2. 准备训练集、验证集和测试集
    • 3. 每种损失对应什么指标
    • 4. HSCredit 模型:最少配置的用法
      • LightGBM:自动配套指标与早停
      • XGBoost:自动处理原始分数与评估方向
      • CatBoost:显式选择配套指标
      • 只更换评价口径,保留模型内置训练目标
    • 5. 独立评估、概率与原始分数
    • 6. 直接使用原生训练框架
      • XGBoost 原生训练与 sklearn 接口
      • LightGBM 原生训练与 sklearn 接口
      • CatBoost 原生接口
    • 7. CV、GridSearchCV、ModelTuner 与 Optuna
      • 评估任意 sklearn 二分类器
      • ModelTuner 自动继承指标名称和方向
      • 原生 Optuna:直接使用 direction
    • 8. 样本权重、放款金额和样本参数对齐
      • 固定类别权重与额外样本权重
      • 金额数组必须跟随数据切分
    • 9. 自定义指标、自定义损失与其他框架
      • 只需要新评价口径:先写普通函数
      • 需要可复用类:实现 BaseMetric
      • NGBoost 与 TabNet
      • 需要改变训练目标:实现 BaseLoss
    • 10. 数学限制与旧代码迁移
      • 框架适用范围
      • 行为变化
    • 11. 可运行样例与接口索引
  • 超参数搜索:入门、指标、损失与结果复盘
    • 先选对入口
      • 区分训练目标、搜索指标与试验函数
    • 环境与数据准备
    • 1. 已有模型:用 .tune() 获取最佳模型
    • 2. 独立调参器:理解 fit 的返回值
    • 3. 搜索空间:先学三种声明,再学条件空间
    • 4. 自定义评估指标:普通函数只需加名称和方向
    • 5. 需要封装状态:继承 BaseMetric
    • 6. 自定义 loss 训练,固定 metric 选择模型
    • 7. 从零实现一个自定义训练 loss
    • 8. 金额加权:区分训练权重和评估权重
    • 9. sklearn Pipeline:预处理在每折内部拟合
    • 10. 多目标:保留所有不能同时被超越的候选
    • 11. 时间交叉验证:按放款时间模拟向未来预测
    • 12. 结果复盘、OOF 和复训
    • 13. 保存与恢复:完整对象、SQLite 和推理模型
    • 14. 可视化与扩展入口
    • 15. 常见误用检查
    • 16. 常用参数按职责查阅
      • 默认空间与跨库写法
      • 分组验证
      • 每折独立生成原生回调
      • 内置指标与优化方向
    • 17. 留存、恢复与适用边界
    • 18. 本次整理后的使用约定

数据接入

  • 数据库
    • 安装
    • 建立连接池
    • 类外快捷操作
    • Redis 与 MongoDB 的统一 NoSQL 方法
    • 参数化查询与 SQL 执行
    • 流式读取、进度条与主动中断
      • 大 JSON 字段按路径读取
    • 自动建表
      • 字符串长度与 JSON 内容推断
    • 统一写入、流式写入与 mode
      • 后端写入能力
    • 导出数据库表结构
      • Excel 导出
    • 扩展其他数据库
    • 异常与集成验证

API 参考

  • API 参考
    • 核心模块
      • 分箱 hscredit.core.binning
        • 数值变量的箱数与样本约束
        • 类别变量分箱
        • 自定义类别分箱
          • BaseBinning
          • UniformBinning
          • QuantileBinning
          • TreeBinning
          • CartBinning
          • ChiMergeBinning
          • BestKSBinning
          • BestIVBinning
          • OptimalBinning
          • MDLPBinning
          • ORBinning
          • CustomObjectives
          • CPSATBinning
          • KMeansBinning
          • MonotonicBinning
          • GeneticBinning
          • SmoothBinning
          • KernelDensityBinning
          • BestLiftBinning
          • TargetBadRateBinning
          • OptimalBinning2D
          • BinSpec
      • 编码器 hscredit.core.encoders
        • BaseEncoder
          • BaseEncoder.artifact_kind
          • BaseEncoder.export_mapping()
          • BaseEncoder.fit()
          • BaseEncoder.fit_transform()
          • BaseEncoder.get_feature_names_out()
          • BaseEncoder.get_mapping()
          • BaseEncoder.import_mapping()
          • BaseEncoder.inverse_transform()
          • BaseEncoder.transform()
        • WOEEncoder
          • WOEEncoder.export()
          • WOEEncoder.get_iv()
          • WOEEncoder.get_mapping()
          • WOEEncoder.load()
          • WOEEncoder.summary()
        • TargetEncoder
        • CountEncoder
        • OneHotEncoder
          • OneHotEncoder.export_mapping()
          • OneHotEncoder.get_feature_names()
          • OneHotEncoder.get_feature_names_out()
          • OneHotEncoder.import_mapping()
          • OneHotEncoder.inverse_transform()
        • OrdinalEncoder
          • OrdinalEncoder.inverse_transform()
        • QuantileEncoder
        • CatBoostEncoder
        • GBMEncoder
          • GBMEncoder.export_mapping()
          • GBMEncoder.get_feature_importance()
          • GBMEncoder.get_feature_names_out()
          • GBMEncoder.get_missing_stats()
          • GBMEncoder.get_model()
          • GBMEncoder.import_mapping()
          • GBMEncoder.plot_tree()
        • CardinalityEncoder
          • CardinalityEncoder.get_summary()
          • CardinalityEncoder.get_top_categories()
          • CardinalityEncoder.inverse_transform()
      • 特征筛选 hscredit.core.selectors
        • 原始字段 KS 筛选
          • BaseFeatureSelector
          • SelectionReportCollector
          • SelectionReport
          • collect_selection_report()
          • TypeSelector
          • RegexSelector
          • NullSelector
          • ModeSelector
          • CardinalitySelector
          • VarianceSelector
          • CorrSelector
          • VIFSelector
          • IVSelector
          • KSSelector
          • LiftSelector
          • PSISelector
          • FeatureImportanceSelector
          • NullImportanceSelector
          • RFESelector
          • SequentialFeatureSelector
          • StepwiseSelector
          • BorutaSelector
          • MutualInfoSelector
          • Chi2Selector
          • FTestSelector
          • StabilityAwareSelector
          • ScorecardFeatureSelection
          • CompositeFeatureSelector
      • 指标 hscredit.core.metrics
        • ks()
        • auc()
        • gini()
        • accuracy()
        • precision()
        • recall()
        • f1()
        • ks_bucket()
        • roc_curve()
        • confusion_matrix()
        • classification_report()
        • ks_2samps()
        • iv()
        • iv_table()
        • chi2_test()
        • cramers_v()
        • feature_importance()
        • psi()
        • psi_table()
        • psi_rating()
        • csi()
        • csi_table()
        • batch_psi()
        • lift()
        • lift_at()
        • lift_table()
        • lift_curve()
        • lift_monotonicity_check()
        • rule_lift()
        • badrate()
        • badrate_by_group()
        • badrate_trend()
        • badrate_by_score_bin()
        • score_stats()
        • score_stability()
        • mse()
        • mae()
        • rmse()
        • r2()
        • compute_bin_stats()
        • add_margins()
        • quadratic_curve_coefficient()
        • composite_binning_quality()
        • MonitoringBaseline
          • MonitoringBaseline.artifact_kind
          • MonitoringBaseline.evaluate()
          • MonitoringBaseline.evaluate_batches()
          • MonitoringBaseline.fit()
          • MonitoringBaseline.transform()
        • BinStatsAccumulator
          • BinStatsAccumulator.finalize()
          • BinStatsAccumulator.merge()
          • BinStatsAccumulator.update()
        • MetricSpec
          • MetricSpec.binning_version
          • MetricSpec.feature
          • MetricSpec.grain
          • MetricSpec.positive_label
          • MetricSpec.target
          • MetricSpec.target_type
      • 特征衍生 hscredit.core.feature_engineering
        • NumExprDerive
          • NumExprDerive.fit()
          • NumExprDerive.transform()
      • 数据探索 hscredit.core.eda
        • data_info()
        • missing_analysis()
        • feature_summary()
        • numeric_summary()
        • category_summary()
        • data_quality_report()
        • feature_group_analysis()
        • population_stability_monitor()
        • target_distribution()
        • bad_rate_overall()
        • bad_rate_by_dimension()
        • bad_rate_trend()
        • bad_rate_by_bins()
        • sample_distribution()
        • feature_type_inference()
        • numeric_distribution()
        • categorical_distribution()
        • outlier_detection()
        • rare_category_detection()
        • concentration_analysis()
        • feature_stability_over_time()
        • iv_analysis()
        • batch_iv_analysis()
        • woe_analysis()
        • binning_bad_rate()
        • monotonicity_check()
        • univariate_auc()
        • feature_importance_ranking()
        • correlation_matrix()
        • high_correlation_pairs()
        • correlation_filter()
        • vif_analysis()
        • psi_analysis()
        • batch_psi_analysis()
        • csi_analysis()
        • time_psi_tracking()
        • stability_report()
        • psi_cross_analysis()
        • feature_drift_report()
        • score_drift_report()
        • model_drift_report()
        • population_profile()
        • population_shift_analysis()
        • population_monitoring_report()
        • segment_drift_analysis()
        • feature_cross_segment_effectiveness()
        • approval_badrate_tradeoff()
        • score_strategy_simulation()
        • vintage_performance_summary()
        • roll_rate_matrix()
        • label_leakage_check()
        • multi_label_correlation()
        • vintage_analysis()
        • vintage_summary()
        • roll_rate_analysis()
        • eda_summary()
        • generate_report()
        • export_report_to_excel()
      • 可视化 hscredit.core.viz
        • 推荐入口
        • 样式与调用契约
          • bin_plot()
          • bin_2d_plot()
          • corr_plot()
          • ks_plot()
          • hist_plot()
          • psi_plot()
          • dataframe_plot()
          • distribution_plot()
          • bin_trend_plot()
          • batch_bin_trend_plot()
          • bin_overdues_plot()
          • plot_weights()
          • plot_model_feature_importance()
          • plot_model_sample_shap()
          • roc_plot()
          • pr_plot()
          • lift_plot()
          • gain_plot()
          • confusion_matrix_plot()
          • calibration_plot()
          • score_dist_plot()
          • score_bin_plot()
          • threshold_analysis_plot()
          • strategy_compare_plot()
          • vintage_plot()
          • feature_importance_plot()
          • approval_rate_trend_plot()
          • bad_rate_trend_plot()
          • metric_comparison_plot()
          • variable_iv_plot()
          • variable_woe_trend_plot()
          • variable_psi_heatmap()
          • variable_importance_grouped_plot()
          • variable_missing_badrate_plot()
          • score_ks_plot()
          • score_distribution_comparison_plot()
          • score_badrate_bin_plot()
          • score_lift_plot()
          • score_approval_badrate_curve()
          • rule_swap_plot()
          • strategy_simulation_plot()
          • feature_trend_by_time()
          • feature_drift_comparison()
          • feature_effectiveness_by_segment()
          • feature_cross_heatmap()
          • population_drift_monitor()
          • segment_scorecard_comparison()
          • DecisionTreeViz
          • plot_tree()
          • plot_tree_matplotlib()
          • plot_tree_pyecharts()
          • plot_tree_graphviz()
          • tree_leaf_comparison_plot()
          • setup_axis_style()
          • save_figure()
          • get_or_create_ax()
          • create_legend()
          • format_bin_label()
          • get_series_colors()
          • get_psi_color()
          • make_colormap()
          • make_risk_cmap()
          • make_diverging_cmap()
          • set_style()
          • reset_style()
          • get_current_theme()
          • get_palette()
          • get_font_sizes()
          • get_defaults()
      • 规则引擎 hscredit.core.rules
        • Rule
          • Rule.aggregate()
          • Rule.filter()
          • Rule.predict()
          • Rule.predict_batches()
          • Rule.report()
          • Rule.result()
          • Rule.save()
        • RuleFlow
          • RuleFlow.compare()
          • RuleFlow.predict()
          • RuleFlow.report()
          • RuleFlow.summary()
        • RuleArtifact
          • RuleArtifact.ast
          • RuleArtifact.bins
          • RuleArtifact.from_dict()
          • RuleArtifact.load()
          • RuleArtifact.predict()
          • RuleArtifact.preprocessing_version
          • RuleArtifact.save()
          • RuleArtifact.to_dict()
          • RuleArtifact.to_rule()
          • RuleArtifact.validation
          • RuleArtifact.version
          • RuleArtifact.expression
          • RuleArtifact.target_spec
          • RuleArtifact.metrics
        • RuleAccumulator
          • RuleAccumulator.finalize()
          • RuleAccumulator.merge()
          • RuleAccumulator.update()
        • get_columns_from_query()
        • optimize_expr()
        • beautify_expr()
        • get_expr_variables()
        • RuleState
          • RuleState.INITIALIZED
          • RuleState.APPLIED
        • RuleStateError
        • RuleUnAppliedError
      • 金融计算 hscredit.core.financial
        • fv()
        • pv()
        • pmt()
        • nper()
        • ipmt()
        • ppmt()
        • rate()
        • npv()
        • irr()
        • mirr()
    • 模型
      • 模型训练、调参与保存
        • 1. 最短训练路径
        • 2. 参数如何复用
        • 3. 保存完整模型与训练过程
        • 4. 在 tune 中直接使用 Optuna
        • 5. 保留每折内容、继续搜索、复用最佳模型
        • 6. 两种调参入口都能查看完整搜索过程
        • 7. 可执行 Notebook 演示
      • models 模块设计复盘
        • 结论
        • 模块职责与设计取舍
        • 已复现的问题与修复
        • 调参与训练记录的边界
        • 兼容性验证与实际边界
        • 公共契约与资源保留的后续完善
        • 参考依据
      • 经典模型
        • LogisticRegression
          • LogisticRegression.artifact_kind
          • LogisticRegression.fit()
          • LogisticRegression.ensure_positive_woe_coefficients()
          • LogisticRegression.predict_proba()
          • LogisticRegression.predict_log_proba()
          • LogisticRegression.decision_function()
          • LogisticRegression.predict()
          • LogisticRegression.get_feature_importances()
          • LogisticRegression.feature_importances_
          • LogisticRegression.summary()
          • LogisticRegression.summary_with_desc()
          • LogisticRegression.get_significant_features()
          • LogisticRegression.check_multicollinearity()
          • LogisticRegression.evaluate()
          • LogisticRegression.predict_score()
          • LogisticRegression.report()
          • LogisticRegression.tune()
          • LogisticRegression.save()
          • LogisticRegression.load()
          • LogisticRegression.get_model_info()
          • LogisticRegression.get_native_model()
          • LogisticRegression.get_native_params()
        • BaseRiskModel
          • BaseRiskModel.artifact_kind
          • BaseRiskModel.SUPPORTED_METRICS
          • BaseRiskModel.DEFAULT_METRICS
          • BaseRiskModel.get_params()
          • BaseRiskModel.set_params()
          • BaseRiskModel.get_native_params()
          • BaseRiskModel.fit()
          • BaseRiskModel.predict()
          • BaseRiskModel.predict_proba()
          • BaseRiskModel.predict_score()
          • BaseRiskModel.best_iteration_
          • BaseRiskModel.best_score_
          • BaseRiskModel.evals_result_
          • BaseRiskModel.get_feature_importances()
          • BaseRiskModel.get_model_info()
          • BaseRiskModel.evaluate()
          • BaseRiskModel.generate_report()
          • BaseRiskModel.report()
          • BaseRiskModel.save()
          • BaseRiskModel.load()
          • BaseRiskModel.tune()
          • BaseRiskModel.get_native_model()
          • BaseRiskModel.plot_feature_importance()
          • BaseRiskModel.get_shap_explainer()
        • RandomForest
        • ExtraTrees
        • GradientBoosting
          • GradientBoosting.fit()
        • SVM
          • SVM.set_params()
        • DecisionTreeClassifier
      • Boosting
        • XGBoost
          • XGBoost.fit()
          • XGBoost.best_iteration_
          • XGBoost.best_score_
          • XGBoost.predict()
          • XGBoost.predict_proba()
          • XGBoost.get_feature_importances()
          • XGBoost.feature_importances_
          • XGBoost.get_booster()
          • XGBoost.plot_tree()
          • XGBoost.plot_importance()
          • XGBoost.get_leaf_indices()
          • XGBoost.save_model()
          • XGBoost.load_model()
        • LightGBM
          • LightGBM.fit()
          • LightGBM.predict()
          • LightGBM.predict_proba()
          • LightGBM.get_feature_importances()
          • LightGBM.feature_importances_
          • LightGBM.get_booster()
          • LightGBM.plot_tree()
          • LightGBM.plot_importance()
          • LightGBM.get_leaf_indices()
          • LightGBM.save_model()
          • LightGBM.load_model()
        • CatBoost
          • CatBoost.fit()
          • CatBoost.predict()
          • CatBoost.predict_proba()
          • CatBoost.get_feature_importances()
          • CatBoost.feature_importances_
          • CatBoost.plot_tree()
          • CatBoost.get_leaf_indices()
          • CatBoost.save_model()
          • CatBoost.load_model()
        • NGBoost
          • NGBoost.fit()
          • NGBoost.best_iteration_
          • NGBoost.best_score_
          • NGBoost.predict()
          • NGBoost.predict_proba()
          • NGBoost.pred_dist()
          • NGBoost.get_feature_importances()
          • NGBoost.feature_importances_
          • NGBoost.staged_predict()
          • NGBoost.staged_pred_dist()
          • NGBoost.plot_importance()
          • NGBoost.save_model()
          • NGBoost.load_model()
      • 规则器
        • RuleSet
          • RuleSet.add_rule()
          • RuleSet.remove_rule()
          • RuleSet.evaluate()
          • RuleSet.get_all_rules()
        • RulesClassifier
          • RulesClassifier.artifact_kind
          • RulesClassifier.fit()
          • RulesClassifier.get_feature_importances()
          • RulesClassifier.predict()
          • RulesClassifier.predict_proba()
          • RulesClassifier.get_rule_summary()
          • RulesClassifier.add_rule()
        • RuleResult
          • RuleResult.rule_id
          • RuleResult.rule_name
          • RuleResult.expression
          • RuleResult.matched
          • RuleResult.matched_indices
          • RuleResult.matched_count
          • RuleResult.details
          • RuleResult.to_dict()
        • LogicOperator
          • LogicOperator.AND
          • LogicOperator.OR
        • create_and_ruleset()
        • create_or_ruleset()
        • combine_rules()
      • 评分卡
        • ScoreCard
          • ScoreCard.coef_
          • ScoreCard.intercept_
          • ScoreCard.n_features_
          • ScoreCard.get_feature_importances()
          • ScoreCard.feature_importances_
          • ScoreCard.feature_names_
          • ScoreCard.fit()
          • ScoreCard.transform()
          • ScoreCard.inverse_transform()
          • ScoreCard.predict_score()
          • ScoreCard.predict()
          • ScoreCard.predict_proba()
          • ScoreCard.scorecard_scale()
          • ScoreCard.score_formula()
          • ScoreCard.scorecard_points()
          • ScoreCard.score_to_bad_rate_table()
          • ScoreCard.save_pickle()
          • ScoreCard.load_pickle()
          • ScoreCard.export_pmml()
          • ScoreCard.export_deployment_code()
          • ScoreCard.get_feature_importance()
          • ScoreCard.get_reason_codes()
          • ScoreCard.get_reason()
          • ScoreCard.score_to_probability_table()
          • ScoreCard.get_detailed_score()
          • ScoreCard.export()
          • ScoreCard.load_rules()
          • ScoreCard.load()
      • 概率校准
        • BaseCalibrator
          • BaseCalibrator.artifact_kind
          • BaseCalibrator.fit()
          • BaseCalibrator.calibrate()
          • BaseCalibrator.transform()
          • BaseCalibrator.predict_proba()
          • BaseCalibrator.compute_brier_score()
          • BaseCalibrator.compute_calibration_metrics()
          • BaseCalibrator.plot_reliability_diagram()
        • PlattCalibrator
          • PlattCalibrator.fit()
          • PlattCalibrator.calibrate()
        • IsotonicCalibrator
          • IsotonicCalibrator.fit()
          • IsotonicCalibrator.calibrate()
        • BetaCalibrator
          • BetaCalibrator.fit()
          • BetaCalibrator.calibrate()
        • HistogramCalibrator
          • HistogramCalibrator.fit()
          • HistogramCalibrator.calibrate()
        • ProbabilityCalibrator
          • ProbabilityCalibrator.CALIB_METHODS
          • ProbabilityCalibrator.artifact_kind
          • ProbabilityCalibrator.fit()
          • ProbabilityCalibrator.predict_proba()
          • ProbabilityCalibrator.predict()
          • ProbabilityCalibrator.get_calibration_metrics()
          • ProbabilityCalibrator.calibration_report()
          • ProbabilityCalibrator.report()
          • ProbabilityCalibrator.plot_reliability_diagram()
          • ProbabilityCalibrator.calibrate_proba()
        • CalibratedModel
          • CalibratedModel.artifact_kind
          • CalibratedModel.predict_proba()
          • CalibratedModel.predict()
          • CalibratedModel.predict_score()
          • CalibratedModel.evaluate()
        • calibrate_model()
        • plot_calibration_comparison()
      • 模型可解释性
        • ExplanationResult
          • ExplanationResult.target_class
          • ExplanationResult.output_index
          • ExplanationResult.model_output
          • ExplanationResult.explainer_type
          • ExplanationResult.background_summary
          • ExplanationResult.dataset_fingerprint
          • ExplanationResult.metadata
          • ExplanationResult.from_explanation()
          • ExplanationResult.explanation
          • ExplanationResult.data
          • ExplanationResult.sample_ids
          • ExplanationResult.values
          • ExplanationResult.base_values
          • ExplanationResult.feature_names
          • ExplanationResult.position_for()
        • ModelExplainer
          • ModelExplainer.explain()
          • ModelExplainer.compute_shap_values()
          • ModelExplainer.get_shap_importance()
          • ModelExplainer.get_global_report()
          • ModelExplainer.get_sample_report()
          • ModelExplainer.select_representative_samples()
          • ModelExplainer.get_correlation_report()
          • ModelExplainer.get_feature_clusters()
          • ModelExplainer.get_feature_interactions()
          • ModelExplainer.get_approximate_interactions()
          • ModelExplainer.get_stability_report()
          • ModelExplainer.get_reason_codes()
          • ModelExplainer.plot_decision()
          • ModelExplainer.plot_heatmap()
          • ModelExplainer.plot_distribution()
          • ModelExplainer.plot_correlation()
          • ModelExplainer.plot_feature_clustering()
          • ModelExplainer.plot_interaction_heatmap()
          • ModelExplainer.plot_interaction_bubble()
          • ModelExplainer.plot_importance_overview()
          • ModelExplainer.plot_explanation_overview()
          • ModelExplainer.plot_shap_summary()
          • ModelExplainer.plot_shap_bar()
          • ModelExplainer.plot_shap_dependence()
          • ModelExplainer.plot_combined_importance()
          • ModelExplainer.plot_shap_waterfall()
          • ModelExplainer.plot_shap_force()
        • CounterfactualExplainer
          • CounterfactualExplainer.generate()
        • model_explain_report()
        • build_reason_codes()
        • plot_feature_importance()
        • plot_shap_importance()
        • plot_importance_comparison()
      • 损失函数与评估指标
        • 统一接口
          • BaseLoss
          • LossMetric
        • 自定义评估函数
          • make_metric()
          • CallableMetric
        • 分类与类别不平衡损失
          • FocalLoss
          • AsymmetricFocalLoss
          • BalancedFocalLoss
          • WeightedBCELoss
          • CostSensitiveLoss
        • 审批、利润与金额损失
          • BadDebtLoss
          • ApprovalRateLoss
          • ProfitMaxLoss
          • ExpectedProfitLoss
          • AmountWeightedLoss
          • ExpectedValueLoss
        • 排序与头部效果损失
          • OrdinalRankLoss
          • LiftFocusedLoss
          • RankingAUCProxyLoss
          • KSFocusedLoss
          • TopKBadCaptureLoss
        • 独立业务评估指标
          • AUCMetric
          • TopKCaptureMetric
          • TopKLiftMetric
          • BadDebtMetric
          • ApprovalRateMetric
          • ClassificationCostMetric
          • ProfitMetric
        • 框架适配器
          • XGBoostLossAdapter
          • LightGBMLossAdapter
          • CatBoostLossAdapter
          • TabNetLossAdapter
          • NGBoostLossAdapter
      • 评估指标
        • BaseMetric
          • BaseMetric.direction
          • BaseMetric.evaluate()
          • BaseMetric.to_scorer()
          • BaseMetric.to_xgboost()
          • BaseMetric.to_lightgbm()
          • BaseMetric.to_catboost()
        • KSMetric
        • GiniMetric
        • PSIMetric
      • 超参数调优
        • 快速上手与自定义目标
        • 训练后的完整搜索过程
          • ModelTuner
          • AutoTuner
          • TuningObjective
          • Metric
    • 报告与工具
      • 报告 hscredit.report
        • ReportResult
          • ReportResult.complete
          • ReportResult.ensure_publishable()
          • ReportResult.failure()
          • ReportResult.plan()
          • ReportResult.run()
          • ReportResult.skip()
          • ReportResult.status_table()
          • ReportResult.success()
        • ReportSectionResult
          • ReportSectionResult.elapsed_seconds
          • ReportSectionResult.input_rows
          • ReportSectionResult.output_rows
          • ReportSectionResult.reason
          • ReportSectionResult.required
          • ReportSectionResult.status
          • ReportSectionResult.name
          • ReportSectionResult.sampling
        • ReportGenerationError
        • save_selection_report()
        • load_selection_report()
        • feature_bin_stats()
        • feature_bin_stats_2d()
        • feature_binning_summary()
        • feature_group_binning_summary()
        • feature_efficiency_analysis()
        • auto_feature_analysis()
        • ruleset_analysis()
        • multi_label_rule_analysis()
        • rule_swap_analysis()
        • rule_report_table()
        • rule_target_analysis()
        • rule_target_table()
        • rule_group_hit_table()
        • rule_group_compare()
        • swap_out_report()
        • ReferenceDataProvider
          • ReferenceDataProvider.fit()
          • ReferenceDataProvider.predict_bad_rate()
        • SwapAnalyzer
          • SwapAnalyzer.analyze()
        • SwapAnalysisResult
          • SwapAnalysisResult.get_detail_report()
          • SwapAnalysisResult.get_risk_rejection_report_by_target()
          • SwapAnalysisResult.get_summary_report()
          • SwapAnalysisResult.pass_rate_report
          • SwapAnalysisResult.risk_rejection_report
          • SwapAnalysisResult.summary_report_amount
          • SwapAnalysisResult.summary_report_count
        • SwapRiskConfig
          • SwapRiskConfig.amount_col
          • SwapRiskConfig.bin_method
          • SwapRiskConfig.custom_bins
          • SwapRiskConfig.max_n_bins
          • SwapRiskConfig.original_pass_rate
          • SwapRiskConfig.out_in_uplift
          • SwapRiskConfig.score_col
          • SwapRiskConfig.swap_type_col
          • SwapRiskConfig.target_aliases
          • SwapRiskConfig.targets
        • create_swap_dataset()
        • create_swap_dataset_from_rules()
        • swap_analysis()
        • SwapType
          • SwapType.IN_IN
          • SwapType.IN_OUT
          • SwapType.OUT_IN
          • SwapType.OUT_OUT
        • OverduePredictor
          • OverduePredictor.fit()
          • OverduePredictor.get_report()
          • OverduePredictor.predict()
          • OverduePredictor.set_coefficients()
          • OverduePredictor.transform()
        • overdue_prediction_report()
        • ModelReport
          • ModelReport.add_dataset()
          • ModelReport.get_bin_table()
          • ModelReport.get_feature_bin_table()
          • ModelReport.get_feature_importance()
          • ModelReport.get_features_corr()
          • ModelReport.get_features_describe()
          • ModelReport.get_metrics()
          • ModelReport.get_model_explanation()
          • ModelReport.print_report()
          • ModelReport.summary()
          • ModelReport.to_dict()
          • ModelReport.to_excel()
        • QuickModelReport
        • auto_model_report()
        • compare_models()
        • population_drift()
        • 规则挖掘 hscredit.report.mining
          • SingleFeatureRuleMiner
          • MultiFeatureRuleMiner
          • MultiLabelRuleMiner
          • TreeRuleExtractor
          • DecisionTreeAnalyzer
          • ManualTreeExtractor
          • RuleMetrics
          • calculate_rule_metrics()
      • 数据库 hscredit.database
        • 数据库门面
          • Database
        • 类外快捷操作
          • query()
          • execute()
          • executemany()
          • stream_query()
          • read_query()
          • export_schema()
          • create_table()
          • stream_write()
          • read_one()
          • read_many()
          • read()
          • write_one()
          • write_many()
          • write()
          • delete_one()
          • delete_many()
          • delete()
          • exists()
        • 流式查询
          • QueryStream
          • RESULT_TYPES
        • JSON 投影扩展
          • BaseDatabaseAdapter
        • 适配器注册
          • register_adapter()
          • get_adapter_class()
          • available_adapters()
        • 公共类型
          • PoolOptions
          • RedisPoolOptions
          • MongoPoolOptions
          • DatabaseCapabilities
          • WriteResult
          • NoSQLWriteResult
          • StreamState
          • QualifiedTarget
          • MetadataInspection
        • 异常
          • DatabaseError
          • DatabaseConnectionError
          • DatabaseQueryError
          • DatabaseWriteError
          • DatabaseMetadataError
          • DatabaseCapabilityError
      • Excel hscredit.excel
        • 大数据集保样式快速写入
          • ExcelWriter
          • dataframe2excel()
          • resolve_condition_color()
          • register_pivot_aggregation()
      • 工具 hscredit.utils
        • seed_everything()
        • load_pickle()
        • save_pickle()
        • ArtifactSerializableMixin
          • ArtifactSerializableMixin.artifact_kind
          • ArtifactSerializableMixin.get_artifact_metadata()
          • ArtifactSerializableMixin.load_artifact()
          • ArtifactSerializableMixin.save_artifact()
        • ParallelBudget
          • ParallelBudget.memory_budget_bytes
          • ParallelBudget.available
          • ParallelBudget.depth
        • ParallelExecutionPlan
          • ParallelExecutionPlan.estimated_peak_bytes
          • ParallelExecutionPlan.max_inflight_tasks
          • ParallelExecutionPlan.memory_budget_bytes
          • ParallelExecutionPlan.requested_workers
          • ParallelExecutionPlan.workers
          • ParallelExecutionPlan.backend
          • ParallelExecutionPlan.adaptive
          • ParallelExecutionPlan.estimated_work
          • ParallelExecutionPlan.data_bytes
          • ParallelExecutionPlan.child_budget
          • ParallelExecutionPlan.operation
        • ParallelWorkload
          • ParallelWorkload.auto_max_workers
          • ParallelWorkload.capability
          • ParallelWorkload.columns
          • ParallelWorkload.cost_per_item
          • ParallelWorkload.data_bytes
          • ParallelWorkload.estimated_work
          • ParallelWorkload.has_parallel_children
          • ParallelWorkload.operation
          • ParallelWorkload.output_rows_per_task
          • ParallelWorkload.releases_gil
          • ParallelWorkload.result_bytes_per_task
          • ParallelWorkload.rows
          • ParallelWorkload.working_bytes_per_task
          • ParallelWorkload.task_count
        • ParallelizableMixin
          • ParallelizableMixin.n_jobs
          • ParallelizableMixin.parallel_backend
          • ParallelizableMixin.parallel_config
        • parallel_execute()
        • plan_parallel_execution()
        • resolve_n_jobs()
        • resolve_native_workers()
        • get_physical_cpu_count()
        • split_parallel_budget()
        • validate_parallel_config()
        • feature_describe()
        • groupby_feature_describe()
        • germancredit()
        • round_float()
        • reload()
        • trapz()
        • init_setting()
        • get_bundled_font_path()
        • install_bundled_font()
        • init_logger()
        • get_logger()
        • style_bin_table()
        • style_rule_table()
        • BinTableDisplay
          • BinTableDisplay.export_html()
          • BinTableDisplay.highlight_bins()
          • BinTableDisplay.show()
          • BinTableDisplay.to_excel()
        • register_extensions()
        • HSCreditApplyProxy
          • HSCreditApplyProxy.apply()
          • HSCreditApplyProxy.bar
          • HSCreditApplyProxy.n_jobs
          • HSCreditApplyProxy.parallel_backend
          • HSCreditApplyProxy.parallel_config
        • create_hscredit_apply_proxy()
        • check_xy_inputs()
        • convert_to_dataframe()
        • extract_target_from_df()
        • check_array_1d()
        • get_feature_dtypes()
        • check_missing_values()
        • normalize_dpd_values()
      • 异常 hscredit.exceptions
        • HSCreditError
        • ValidationError
        • InputValidationError
        • InputTypeError
        • FeatureNotFoundError
        • StateError
        • ParallelExecutionError
        • NotFittedError
        • DependencyError
        • SerializationError
        • raise_not_fitted()
        • raise_feature_not_found()
        • raise_missing_columns()

Agent Skills

  • Agent Skills
    • 安装 Skills
      • 从仓库安装
      • 让 Agent 从 GitHub 安装
      • OpenAI 项目 Skills API
    • 在 Agent 中调用
      • 分箱分析
      • 完整报告
    • 数据输入
      • 文件输入
      • 同进程对象
    • 运行环境
    • 高级:手工 JSON 调用
    • 常见错误
    • 查看完整操作契约

项目

  • hscredit Roadmap
    • 一、产品定位
    • 二、当前代码结构与已实现能力
      • 2.1 模块总览
      • 2.2 已实现能力清单
      • 2.3 设计约定
    • 三、业务场景映射
      • 3.1 贷前评分卡建模
      • 3.2 机器学习风控模型
      • 3.3 策略规则挖掘与运营
      • 3.4 贷后监控与稳定性
    • 四、竞品对标
      • 4.1 toad
      • 4.2 optbinning
      • 4.3 scorecardpipeline
      • 4.4 scorecardpy
    • 五、竞争策略
      • 5.1 不建议的外部表述
      • 5.2 推荐定位
    • 六、能力缺口与优先级
    • 七、版本规划
      • v0.1.x:可信度建设
      • v0.2.0:特征工程与拒绝推断
      • v0.3.0:分箱与规则运营增强
      • v0.4.0:报告、解释与上线交付
      • v0.5.0:易用性和生态完善
    • 八、工程质量计划
      • 8.1 测试优先级
      • 8.2 CI 与兼容性
      • 8.3 文档质量要求
    • 九、当前短期任务清单
    • 十、长期方向
hscredit
官网 GitHub
  • 搜索


© 版权所有 2026, hscredit team。

利用 Sphinx 构建,使用的 主题 由 Read the Docs 开发.