KrishnamohanYag commited on
Commit
567ded1
·
verified ·
1 Parent(s): 2dbc04d

Upload 7 files

Browse files
Files changed (7) hide show
  1. README.md +150 -1
  2. feature_columns.pkl +3 -0
  3. kmeans.pkl +3 -0
  4. nlp_model.pkl +3 -0
  5. risk_model.pkl +3 -0
  6. spending_model.pkl +3 -0
  7. tfidf.pkl +3 -0
README.md CHANGED
@@ -1,3 +1,152 @@
 
 
 
 
1
  ---
2
- license: mit
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Expense AI Intelligence System
2
+
3
+ **Author:** Krishnamohan Yagneswaran
4
+
5
  ---
6
+
7
+ ## Overview
8
+
9
+ This project is a machine learning system that analyzes expense data and provides useful financial insights. It combines multiple models to predict spending, detect risk, classify transactions, and understand user behavior.
10
+
11
+ The system is designed to work with real-world expense data and help users make better financial decisions.
12
+
13
  ---
14
+
15
+ ## What This Model Does
16
+
17
+ This system provides the following outputs:
18
+
19
+ * Predicts how much money you may spend
20
+ * Identifies if a transaction is high risk or low risk
21
+ * Classifies the type of expense (food, travel, bills, etc.)
22
+ * Groups spending behavior into clusters
23
+ * Provides a simple financial decision suggestion
24
+
25
+ ---
26
+
27
+ ## About the `.pkl` Files
28
+
29
+ All the `.pkl` files in this repository are **trained machine learning models and components**. These files are saved using `joblib` and allow the system to be reused without retraining.
30
+
31
+ ### Files Explanation:
32
+
33
+ * `spending_model.pkl`
34
+ → Predicts future spending amount
35
+
36
+ * `risk_model.pkl`
37
+ → Classifies whether spending is HIGH or LOW risk
38
+
39
+ * `nlp_model.pkl`
40
+ → Predicts category from text input
41
+
42
+ * `tfidf.pkl`
43
+ → Converts text into numerical format for NLP
44
+
45
+ * `kmeans.pkl`
46
+ → Groups spending behavior into clusters
47
+
48
+ * `feature_columns.pkl`
49
+ → Stores the correct input structure used during training
50
+
51
+ ---
52
+
53
+ ## How to Use
54
+
55
+ ### 1. Install Required Libraries
56
+
57
+ ```bash
58
+ pip install pandas numpy scikit-learn joblib
59
+ ```
60
+
61
+ ### 2. Load Models
62
+
63
+ ```python
64
+ import joblib
65
+
66
+ spending_model = joblib.load("spending_model.pkl")
67
+ risk_model = joblib.load("risk_model.pkl")
68
+ nlp_model = joblib.load("nlp_model.pkl")
69
+ vectorizer = joblib.load("tfidf.pkl")
70
+ kmeans = joblib.load("kmeans.pkl")
71
+ ```
72
+
73
+ ### 3. Example Input
74
+
75
+ ```python
76
+ input_data = {
77
+ "weekday": 2,
78
+ "rolling_avg": 500
79
+ }
80
+ ```
81
+
82
+ ### 4. Predict
83
+
84
+ ```python
85
+ prediction = spending_model.predict([list(input_data.values())])
86
+ print(prediction)
87
+ ```
88
+
89
+ ---
90
+
91
+ ## System Features
92
+
93
+ * Uses multiple machine learning models together
94
+ * Works with structured CSV expense data
95
+ * Includes NLP for text-based classification
96
+ * Uses clustering for behavior analysis
97
+ * Provides decision-making suggestions
98
+
99
+ ---
100
+
101
+ ## Use Cases
102
+
103
+ * Personal finance tracking
104
+ * Budget planning
105
+ * Expense monitoring applications
106
+ * Financial analytics systems
107
+ * Academic and learning projects
108
+
109
+ ---
110
+
111
+ ## License
112
+
113
+ This project is licensed under the **MIT License**.
114
+
115
+ You are free to:
116
+
117
+ * Use
118
+ * Modify
119
+ * Distribute
120
+ * Use commercially
121
+
122
+ As long as the original license and author credit are included.
123
+
124
+ ---
125
+
126
+ ## Credits
127
+
128
+ If you use this project in your work, research, application, or product, it would be appreciated if you provide credit:
129
+
130
+ **Krishnamohan Yagneswaran**
131
+
132
+ This helps support further development and recognition of the project.
133
+
134
+ ---
135
+
136
+ ## Future Improvements
137
+
138
+ * Web application interface
139
+ * Mobile application integration
140
+ * API deployment
141
+ * Real-time analytics
142
+
143
+ ---
144
+
145
+ ## Conclusion
146
+
147
+ This project demonstrates how multiple machine learning techniques can be combined into a single intelligent system. It is simple, practical, and scalable for real-world applications.
148
+
149
+ ---
150
+
151
+ **Created by:**
152
+ Krishnamohan Yagneswaran
feature_columns.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9651251f2e38d0eba38a3450541c580915e34709a8bada222eac19ab8865e27
3
+ size 168
kmeans.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5825f8a0555c3c3679ab2096d227096e1d9153668d1e0799b5c3faedf9d50e35
3
+ size 5847
nlp_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e460bf95c74634e876492c5f75774bcda995210248ced5ce2b4e2add4d44145
3
+ size 48640
risk_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:685228c643bcd3b04c0bf6dacc359d7581f977aca6e015b3ee47e7861cb81ca0
3
+ size 56763
spending_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69c5e7d3e07d3c72dd9f39339d292eededcfa58e6e3e90808e1c712e98b82893
3
+ size 142568
tfidf.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:126f32bd15c699394ce2a089025001352276227ac08888a6575ca6e29dbed22a
3
+ size 1055