-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel_development.sql
More file actions
41 lines (37 loc) · 1.22 KB
/
Model_development.sql
File metadata and controls
41 lines (37 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
-- Create Model
CREATE MODEL loanPredictor
FROM mysql_integration
(SELECT gender, loan_type, credit_worthiness, open_credit, neg_ammortization, lump_sum_payment,
age, credit_score, occupancy_type, secured_by, loan_limit, approv_in_adv, loan_purpose,
business_or_commercial, loan_amount, term, interest_only, property_value, income,
construction_type, total_units, credit_type, co_applicant_credit_type, region, status
FROM loan.loan_default_lite)
PREDICT status;
-- Test Model
SELECT status
FROM loanpredictor
WHERE loan_limit = 'cf'
AND gender = 'Female'
AND approv_in_adv = 'nopre'
AND loan_type = 'type1'
AND loan_purpose = 'p3'
AND credit_worthiness = 'l1'
AND open_credit = 'nopc'
AND business_or_commercial = 'nob/c'
AND loan_amount = 486500
AND term = 360
AND neg_ammortization = 'not_neg'
AND interest_only = 'int_only'
AND lump_sum_payment = 'not_lpsm'
AND property_value = 648000
AND construction_type = 'sb'
AND occupancy_type = 'pr'
AND secured_by = 'home'
AND total_units = '1U'
AND income = 7920
AND credit_type = 'EXP'
AND credit_score = 603
AND co_applicant_credit_type = 'CIB'
AND age = '55-64'
AND submission_of_application = 'to_inst'
AND region = 'south';