Revolving Credit(revolver)

 

 http://www.investopedia.com/terms/r/revolvingcredit.asp#axzz1nBzDz9zR

Definition of 'Revolving Credit'
A line of credit where the customer pays a commitment fee and is then allowed to use the funds when they are needed. It is usually used for operating purposes, fluctuating each month depending on the customer's current cash flow needs.

Often referred to as "revolver".


Investopedia explains 'Revolving Credit'
Revolving lines of credit can be taken out by both corporations and individuals. The bank that is in agreement with the customer guarantees a maximum amount that can be loaned to the customer. Along with the commitment fee there are also interest expenses for corporate borrowers and carry forward charges for consumer accounts.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个报错是因为在使用scatter函数绘制散点图时,y和y_pred都是一维数组,而scatter函数要求输入的数据是二维数组。可以使用reshape函数将y和y_pred转化为二维数组,例如: ```python y = y.values.reshape(-1, 1) y_pred = y_pred.reshape(-1, 1) ``` 这样可以将y和y_pred都转化为二维数组,使其符合scatter函数的要求。修改后的代码如下: ```python import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.tree import DecisionTreeClassifier # 读取数据 card = pd.read_csv('creditcard.csv') # 特征选择和预处理 Education_Level_onehot = pd.get_dummies(card['Education_Level'], prefix='Education_Level') Income_Category_onehot = pd.get_dummies(card['Income_Category'], prefix='Income_Category') Marital_Status_onehot = pd.get_dummies(card['Marital_Status'], prefix='Marital_Status') # 构造特征矩阵和标签向量 X = pd.concat([card['Contacts_Count_12_mon'],card['Months_Inactive_12_mon'],card['Total_Amt_Chng_Q4_Q1'],card['Total_Relationship_Count'],card['Total_Trans_Amt'],card['Avg_Utilization_Ratio'],card['Total_Revolving_Bal'],card['Total_Trans_Ct'],card['Gender'],Education_Level_onehot,Income_Category_onehot,Marital_Status_onehot],axis=1) y = card['Attrition_Flag'] # 创建决策树模型 clf = DecisionTreeClassifier() clf.fit(X, y) y_pred = clf.predict(X) # 将y和y_pred转化为二维数组 y = y.values.reshape(-1, 1) y_pred = y_pred.reshape(-1, 1) # 绘制散点图 plt.scatter(y, y_pred, color='red', label='Predicted Values') plt.scatter(y, clf.predict(X), color='blue', label='True Values') plt.xlabel('True Values') plt.ylabel('Predictions') plt.title('Decision Tree Classification') plt.legend() plt.show() ``` 注意到在这个示例中,我们使用的是分类问题,因此修改了代码中的一些细节。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值