hscredit Logo
衡 公司官网 GitHub 仓库

入门

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

数据接入

  • 数据库与 NoSQL 连接池、读写及表结构导出
    • 安装
    • 建立连接池
    • 类外快捷操作
    • 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
      • 编码器 hscredit.core.encoders
        • BaseEncoder
          • BaseEncoder.artifact_kind
          • BaseEncoder.export_mapping()
          • BaseEncoder.fit()
          • BaseEncoder.fit_transform()
          • 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.get_feature_names()
          • OneHotEncoder.get_feature_names_out()
          • OneHotEncoder.inverse_transform()
        • OrdinalEncoder
          • OrdinalEncoder.inverse_transform()
        • QuantileEncoder
        • CatBoostEncoder
        • GBMEncoder
          • GBMEncoder.get_feature_importance()
          • GBMEncoder.get_missing_stats()
          • GBMEncoder.get_model()
          • GBMEncoder.plot_tree()
        • CardinalityEncoder
          • CardinalityEncoder.get_summary()
          • CardinalityEncoder.get_top_categories()
          • CardinalityEncoder.inverse_transform()
      • 特征筛选 hscredit.core.selectors
        • BaseFeatureSelector
          • BaseFeatureSelector.fit()
          • BaseFeatureSelector.fit_transform()
          • BaseFeatureSelector.get_dropped_df()
          • BaseFeatureSelector.get_feature_names_out()
          • BaseFeatureSelector.get_scores_df()
          • BaseFeatureSelector.get_selection_report()
          • BaseFeatureSelector.get_selection_report_df()
          • BaseFeatureSelector.get_support()
          • BaseFeatureSelector.get_support_mask()
          • BaseFeatureSelector.transform()
        • SelectionReportCollector
          • SelectionReportCollector.add_report()
          • SelectionReportCollector.get_dropped_summary()
          • SelectionReportCollector.get_feature_trace()
          • SelectionReportCollector.get_summary()
          • SelectionReportCollector.print_summary()
          • SelectionReportCollector.to_dataframe()
          • SelectionReportCollector.to_excel()
        • TypeSelector
          • TypeSelector.method_name
        • RegexSelector
          • RegexSelector.method_name
        • NullSelector
          • NullSelector.method_name
        • ModeSelector
          • ModeSelector.method_name
        • CardinalitySelector
          • CardinalitySelector.method_name
        • VarianceSelector
          • VarianceSelector.method_name
        • CorrSelector
          • CorrSelector.method_name
        • VIFSelector
          • VIFSelector.method_name
        • IVSelector
          • IVSelector.get_iv_interpretation()
          • IVSelector.method_name
        • LiftSelector
          • LiftSelector.method_name
        • PSISelector
          • PSISelector.method_name
        • FeatureImportanceSelector
          • FeatureImportanceSelector.method_name
        • NullImportanceSelector
          • NullImportanceSelector.get_importance_details()
          • NullImportanceSelector.method_name
        • RFESelector
          • RFESelector.method_name
        • SequentialFeatureSelector
          • SequentialFeatureSelector.method_name
        • StepwiseSelector
          • StepwiseSelector.get_history_df()
          • StepwiseSelector.method_name
          • StepwiseSelector.summary()
        • BorutaSelector
          • BorutaSelector.method_name
        • MutualInfoSelector
          • MutualInfoSelector.method_name
        • Chi2Selector
          • Chi2Selector.method_name
        • FTestSelector
          • FTestSelector.method_name
        • StabilityAwareSelector
          • StabilityAwareSelector.get_detail()
          • StabilityAwareSelector.method_name
        • ScorecardFeatureSelection
          • ScorecardFeatureSelection.fit()
          • ScorecardFeatureSelection.get_selection_report()
          • ScorecardFeatureSelection.method_name
          • ScorecardFeatureSelection.transform()
        • CompositeFeatureSelector
          • CompositeFeatureSelector.get_selection_report_df()
      • 指标 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()
      • 特征衍生 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.filter()
          • Rule.predict()
          • Rule.report()
          • Rule.result()
          • Rule.save()
        • RuleFlow
          • RuleFlow.compare()
          • RuleFlow.predict()
          • RuleFlow.report()
          • RuleFlow.summary()
        • 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()
    • 模型
      • 经典模型
        • 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()
        • BaseRiskModel
          • BaseRiskModel.artifact_kind
          • BaseRiskModel.SUPPORTED_METRICS
          • BaseRiskModel.DEFAULT_METRICS
          • 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
          • BaseLoss.gradient()
          • BaseLoss.hessian()
          • BaseLoss.to_xgboost()
          • BaseLoss.to_lightgbm()
          • BaseLoss.to_catboost()
          • BaseLoss.to_ngboost()
        • FocalLoss
          • FocalLoss.gradient()
          • FocalLoss.hessian()
        • AsymmetricFocalLoss
          • AsymmetricFocalLoss.gradient()
          • AsymmetricFocalLoss.hessian()
        • WeightedBCELoss
          • WeightedBCELoss.gradient()
          • WeightedBCELoss.hessian()
        • CostSensitiveLoss
          • CostSensitiveLoss.gradient()
          • CostSensitiveLoss.hessian()
        • BadDebtLoss
          • BadDebtLoss.gradient()
          • BadDebtLoss.hessian()
        • ApprovalRateLoss
          • ApprovalRateLoss.gradient()
          • ApprovalRateLoss.hessian()
        • ProfitMaxLoss
          • ProfitMaxLoss.gradient()
          • ProfitMaxLoss.hessian()
        • OrdinalRankLoss
          • OrdinalRankLoss.gradient()
          • OrdinalRankLoss.hessian()
        • LiftFocusedLoss
          • LiftFocusedLoss.gradient()
          • LiftFocusedLoss.hessian()
        • XGBoostLossAdapter
          • XGBoostLossAdapter.objective()
          • XGBoostLossAdapter.metric()
        • LightGBMLossAdapter
          • LightGBMLossAdapter.objective()
          • LightGBMLossAdapter.metric()
        • CatBoostLossAdapter
          • CatBoostLossAdapter.objective()
          • CatBoostLossAdapter.metric()
        • TabNetLossAdapter
          • TabNetLossAdapter.loss_fn()
      • 评估指标
        • BaseMetric
          • BaseMetric.to_xgboost()
          • BaseMetric.to_lightgbm()
          • BaseMetric.to_catboost()
        • KSMetric
        • GiniMetric
        • PSIMetric
      • 超参数调优
        • ModelTuner
          • ModelTuner.fit()
          • ModelTuner.evaluate_trials()
          • ModelTuner.evaluate_study_trials()
          • ModelTuner.enqueue_trial()
          • ModelTuner.enqueue_trials()
          • ModelTuner.probe()
          • ModelTuner.get_best_model()
          • ModelTuner.get_optimization_history()
          • ModelTuner.get_pareto_front()
          • ModelTuner.get_param_importance()
          • ModelTuner.plot_optimization_history()
          • ModelTuner.plot_param_importances()
          • ModelTuner.plot_slice()
          • ModelTuner.plot_pareto_front()
          • ModelTuner.plot_contour()
          • ModelTuner.plot_parallel_coordinate()
          • ModelTuner.plot_edf()
        • AutoTuner
          • AutoTuner.create()
        • TuningObjective
          • TuningObjective.BUILTIN_OBJECTIVES
          • TuningObjective.ks()
          • TuningObjective.auc()
          • TuningObjective.lift_head()
          • TuningObjective.lift_tail()
          • TuningObjective.lift_head_monotonic()
          • TuningObjective.ks_with_lift_constraint()
          • TuningObjective.head_ks()
          • TuningObjective.ks_lift_combined()
          • TuningObjective.tail_purity_ks()
          • TuningObjective.approval_bad_rate()
          • TuningObjective.expected_profit()
          • TuningObjective.get()
        • Metric
          • Metric.BUILTIN_METRICS
    • 报告与工具
      • 报告 hscredit.report
        • feature_bin_stats()
        • 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.available
          • ParallelBudget.depth
        • ParallelExecutionPlan
          • 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.releases_gil
          • ParallelWorkload.rows
          • 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()
      • 异常 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
  • API 参考
  • 模型
  • 查看页面源码

模型

模型训练、规则器、评分卡、概率校准、可解释性、损失函数、评估指标与自动调参 API。

  • 经典模型
    • LogisticRegression
    • BaseRiskModel
    • RandomForest
    • ExtraTrees
    • GradientBoosting
    • SVM
    • DecisionTreeClassifier
  • Boosting
    • XGBoost
    • LightGBM
    • CatBoost
    • NGBoost
  • 规则器
    • RuleSet
    • RulesClassifier
    • RuleResult
    • LogicOperator
    • create_and_ruleset()
    • create_or_ruleset()
    • combine_rules()
  • 评分卡
    • ScoreCard
  • 概率校准
    • BaseCalibrator
    • PlattCalibrator
    • IsotonicCalibrator
    • BetaCalibrator
    • HistogramCalibrator
    • ProbabilityCalibrator
    • CalibratedModel
    • calibrate_model()
    • plot_calibration_comparison()
  • 模型可解释性
    • ExplanationResult
    • ModelExplainer
    • CounterfactualExplainer
    • model_explain_report()
    • build_reason_codes()
    • plot_feature_importance()
    • plot_shap_importance()
    • plot_importance_comparison()
  • 损失函数
    • BaseLoss
    • FocalLoss
    • AsymmetricFocalLoss
    • WeightedBCELoss
    • CostSensitiveLoss
    • BadDebtLoss
    • ApprovalRateLoss
    • ProfitMaxLoss
    • OrdinalRankLoss
    • LiftFocusedLoss
    • XGBoostLossAdapter
    • LightGBMLossAdapter
    • CatBoostLossAdapter
    • TabNetLossAdapter
  • 评估指标
    • BaseMetric
    • KSMetric
    • GiniMetric
    • PSIMetric
  • 超参数调优
    • ModelTuner
    • AutoTuner
    • TuningObjective
    • Metric
上一页 下一页

© 版权所有 2026, hscredit team。

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