Skip to content

Commit 4fd2cae

Browse files
authored
Merge pull request #1359 from Aditijainnn/Startup-profit
Added startup profit prediction
2 parents f3a2281 + e9a5968 commit 4fd2cae

File tree

7 files changed

+661
-0
lines changed

7 files changed

+661
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
R&D Spend,Administration,Marketing Spend,State,Profit
2+
165349.2,136897.8,471784.1,New York,192261.83
3+
162597.7,151377.59,443898.53,California,191792.06
4+
153441.51,101145.55,407934.54,Florida,191050.39
5+
144372.41,118671.85,383199.62,New York,182901.99
6+
142107.34,91391.77,366168.42,Florida,166187.94
7+
131876.9,99814.71,362861.36,New York,156991.12
8+
134615.46,147198.87,127716.82,California,156122.51
9+
130298.13,145530.06,323876.68,Florida,155752.6
10+
120542.52,148718.95,311613.29,New York,152211.77
11+
123334.88,108679.17,304981.62,California,149759.96
12+
101913.08,110594.11,229160.95,Florida,146121.95
13+
100671.96,91790.61,249744.55,California,144259.4
14+
93863.75,127320.38,249839.44,Florida,141585.52
15+
91992.39,135495.07,252664.93,California,134307.35
16+
119943.24,156547.42,256512.92,Florida,132602.65
17+
114523.61,122616.84,261776.23,New York,129917.04
18+
78013.11,121597.55,264346.06,California,126992.93
19+
94657.16,145077.58,282574.31,New York,125370.37
20+
91749.16,114175.79,294919.57,Florida,124266.9
21+
86419.7,153514.11,0,New York,122776.86
22+
76253.86,113867.3,298664.47,California,118474.03
23+
78389.47,153773.43,299737.29,New York,111313.02
24+
73994.56,122782.75,303319.26,Florida,110352.25
25+
67532.53,105751.03,304768.73,Florida,108733.99
26+
77044.01,99281.34,140574.81,New York,108552.04
27+
64664.71,139553.16,137962.62,California,107404.34
28+
75328.87,144135.98,134050.07,Florida,105733.54
29+
72107.6,127864.55,353183.81,New York,105008.31
30+
66051.52,182645.56,118148.2,Florida,103282.38
31+
65605.48,153032.06,107138.38,New York,101004.64
32+
61994.48,115641.28,91131.24,Florida,99937.59
33+
61136.38,152701.92,88218.23,New York,97483.56
34+
63408.86,129219.61,46085.25,California,97427.84
35+
55493.95,103057.49,214634.81,Florida,96778.92
36+
46426.07,157693.92,210797.67,California,96712.8
37+
46014.02,85047.44,205517.64,New York,96479.51
38+
28663.76,127056.21,201126.82,Florida,90708.19
39+
44069.95,51283.14,197029.42,California,89949.14
40+
20229.59,65947.93,185265.1,New York,81229.06
41+
38558.51,82982.09,174999.3,California,81005.76
42+
28754.33,118546.05,172795.67,California,78239.91
43+
27892.92,84710.77,164470.71,Florida,77798.83
44+
23640.93,96189.63,148001.11,California,71498.49
45+
15505.73,127382.3,35534.17,New York,69758.98
46+
22177.74,154806.14,28334.72,California,65200.33
47+
1000.23,124153.04,1903.93,New York,64926.08
48+
1315.46,115816.21,297114.46,Florida,49490.75
49+
0,135426.92,0,California,42559.73
50+
542.05,51743.15,0,New York,35673.41
51+
0,116983.8,45173.06,California,14681.4
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## **Startup Profit Prediction**
2+
**GOAL**
3+
4+
The goal of this project is to analyze and predict the profit of a startup using features such as 'R&D Spend', 'Administration', 'Marketing Spend', 'State', etc. By leveraging multiple regression techniques, this project aims to identify the most significant factors influencing startup profitability and build a robust predictive model.
5+
6+
**DATASET**
7+
8+
Dataset can be downloaded from [here](https://www.kaggle.com/sonalisingh1411/startup50).
9+
10+
**LIBRARIES NEEDED**
11+
- pandas
12+
- NumPy
13+
- Matplotlib
14+
- sklearn (For data training, importing models and performance check)
15+
16+
17+
**CONCLUSION**
18+
19+
* The analysis of the startup dataset reveals significant correlations between the features and the profits, providing valuable insights for potential investors and decision-makers.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
from flask import Flask, redirect, render_template, url_for, request
2+
import numpy as np
3+
import pickle
4+
5+
regressor = pickle.load(open('startup.pkl', 'rb'))
6+
app = Flask(__name__)
7+
8+
9+
@app.route('/')
10+
def home():
11+
return render_template("home.html")
12+
13+
14+
@app.route('/submit', methods=['POST', 'GET'])
15+
def submit():
16+
if request.method == "POST":
17+
state = request.form["state"]
18+
rdspend = float(request.form["rdspend"])
19+
adspend = float(request.form["adspend"])
20+
mkspend = float(request.form["mkspend"])
21+
if state == "New York":
22+
state_list = [0.0, 1.0]
23+
elif state == "California":
24+
state_list = [0.0, 0.0]
25+
else:
26+
state_list = [1.0, 0.0]
27+
28+
input = np.array(state_list+[rdspend, adspend, mkspend])
29+
input = input.reshape(1, len(input))
30+
pred = regressor.predict(input)[0]
31+
32+
return render_template("output.html", pred=pred)
33+
34+
35+
if __name__ == "__main__":
36+
app.run(debug=True)

0 commit comments

Comments
 (0)