Spaces:
Sleeping
Sleeping
Pragya Jatav
commited on
Commit
·
be2dd06
1
Parent(s):
db19c45
m1
Browse files- __pycache__/classes.cpython-310.pyc +0 -0
- __pycache__/utilities.cpython-310.pyc +0 -0
- pages/2_Scenario_Planner.py +16 -5
- summary_df.pkl +1 -1
- utilities.py +1 -3
__pycache__/classes.cpython-310.pyc
CHANGED
Binary files a/__pycache__/classes.cpython-310.pyc and b/__pycache__/classes.cpython-310.pyc differ
|
|
__pycache__/utilities.cpython-310.pyc
CHANGED
Binary files a/__pycache__/utilities.cpython-310.pyc and b/__pycache__/utilities.cpython-310.pyc differ
|
|
pages/2_Scenario_Planner.py
CHANGED
@@ -618,11 +618,22 @@ def upload_file_prospects_calc(df):
|
|
618 |
df.index = df.channel
|
619 |
# # print(param_dicts)
|
620 |
for col in df.channel:
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
# # print(df)
|
627 |
return df
|
628 |
|
|
|
618 |
df.index = df.channel
|
619 |
# # print(param_dicts)
|
620 |
for col in df.channel:
|
621 |
+
x = df["Spends"][col]
|
622 |
+
dividing_rate = 104
|
623 |
+
# st.write(x)
|
624 |
+
x_inp = ( x/dividing_rate- param_dicts["x_min"][col]) / (param_dicts["x_max"][col] - param_dicts["x_min"][col])
|
625 |
+
x_out = x_inp**param_dicts["n"][col] / (param_dicts["Kd"][col]**param_dicts["n"][col] + x_inp**param_dicts["n"][col]) #self.hill_equation(x_inp,Kd, n)
|
626 |
+
# # print("x_out",x_out)
|
627 |
+
|
628 |
+
|
629 |
+
x_val_inv = (x_out*param_dicts["x_max"][col] + (1 - x_out) * param_dicts["x_min"][col])
|
630 |
+
sales = (x_val_inv*param_dicts["y_min"][col]/param_dicts["y_max"][col])*dividing_rate
|
631 |
+
# sales = ((x_max - x_min)*x_out + x_min)*dividing_rate
|
632 |
+
|
633 |
+
# x = (df["Spends"][col]/104 - param_dicts["x_min"][col])/(param_dicts["x_max"][col]-param_dicts["x_min"][col])
|
634 |
+
# x_out = x**param_dicts["n"][col]/(param_dicts["Kd"][col]**param_dicts["n"][col]+ x**param_dicts["n"][col])
|
635 |
+
# x_out_inv = (x_out*(param_dicts["y_max"][col]-param_dicts["y_min"][col])+param_dicts["y_min"][col])*104
|
636 |
+
df["Prospects"][col] = sales
|
637 |
# # print(df)
|
638 |
return df
|
639 |
|
summary_df.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 1822
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a806d99197353280a0fa5c5d94ade34c962560041ca3986d304dea5f1bb4667
|
3 |
size 1822
|
utilities.py
CHANGED
@@ -358,9 +358,7 @@ def initialize_data(
|
|
358 |
other_contributions = (
|
359 |
output_df.drop([*output_cols], axis=1).sum(axis=1, numeric_only=True).values
|
360 |
)
|
361 |
-
correction = output_df.drop("Date", axis=1).sum(axis=1).values - (
|
362 |
-
sales + other_contributions
|
363 |
-
)
|
364 |
# # print(other_contributions)
|
365 |
# # print(correction)
|
366 |
scenario = Scenario(
|
|
|
358 |
other_contributions = (
|
359 |
output_df.drop([*output_cols], axis=1).sum(axis=1, numeric_only=True).values
|
360 |
)
|
361 |
+
correction = output_df.drop("Date", axis=1).sum(axis=1).values - (sales + other_contributions)
|
|
|
|
|
362 |
# # print(other_contributions)
|
363 |
# # print(correction)
|
364 |
scenario = Scenario(
|