ultima versao
Browse files- app.py +10 -13
- requirements.txt +1 -4
app.py
CHANGED
@@ -6,35 +6,32 @@ import numpy as np
|
|
6 |
LIBRARIES = ["ALOY", "APSTUD", "CLI", "TIMOB", "XD"]
|
7 |
|
8 |
def grafico(list_output_mean, list_output_neosp, nome_projeto, pip_choices):
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
1.833541, 0.860600, 1.393656, 1.152935, 1.364006, 1.647414, 1.527748, 1.236909, 1.403306, 1.655692, 1.770828, 1.937058, 0.861534, 1.341726, 1.904503, 1.449757]
|
13 |
-
list_results = [["Median Regressor", np.mean(list_output_mean)], [
|
14 |
-
"NEOSP-SVR Regressor", np.mean(list_output_NEOSP)]]
|
15 |
fig, (ax1, ax2) = plt.subplots(1, 2)
|
16 |
# ax1
|
17 |
-
if "
|
18 |
df_list_output_mean = pd.DataFrame(list_output_mean, columns=["MAE"])
|
19 |
ax1.plot(df_list_output_mean.index,
|
20 |
-
df_list_output_mean["MAE"], label="
|
21 |
if "NEOSP-SVR Regressor" in pip_choices:
|
22 |
-
df_list_output_NEOSP = pd.DataFrame(
|
23 |
ax1.plot(df_list_output_NEOSP.index,
|
24 |
df_list_output_NEOSP["MAE"], label="NEOSP-SVR Regressor")
|
25 |
ax1.set_xlabel("Index Execução")
|
26 |
ax1.set_ylabel("MAE")
|
27 |
ax1.legend()
|
28 |
# ax2
|
29 |
-
if "
|
30 |
df = pd.DataFrame(list_results, columns=["Model", "MAE"])
|
31 |
-
if "
|
32 |
ax2.bar(df["Model"].iloc[[0]], df["MAE"].iloc[[0]])
|
33 |
if "NEOSP-SVR Regressor" in pip_choices:
|
34 |
ax2.bar(df["Model"].iloc[[1]], df["MAE"].iloc[[1]])
|
35 |
if "NEOSP-SVR Regressor" and "NEOSP-SVR Regressor" in pip_choices:
|
36 |
ax2.bar(df["Model"], df["MAE"])
|
37 |
-
if "
|
38 |
ax2.set_ylabel("MAE Médio")
|
39 |
ax2.set_xlabel("Modelos")
|
40 |
# graficos geral
|
@@ -82,7 +79,7 @@ with gr.Blocks() as demo:
|
|
82 |
with gr.Column():
|
83 |
gr.Markdown("## Gráficos")
|
84 |
pip = gr.CheckboxGroup(
|
85 |
-
choices=["
|
86 |
# stars = gr.CheckboxGroup(choices=["Stars", "Week over Week"], label="")
|
87 |
# issues = gr.CheckboxGroup(choices=["Issue", "Exclude org members", "week over week"], label="")
|
88 |
with gr.Row():
|
|
|
6 |
LIBRARIES = ["ALOY", "APSTUD", "CLI", "TIMOB", "XD"]
|
7 |
|
8 |
def grafico(list_output_mean, list_output_neosp, nome_projeto, pip_choices):
|
9 |
+
|
10 |
+
list_results = [["MbR Regressor", np.mean(list_output_mean)], [
|
11 |
+
"NEOSP-SVR Regressor", np.mean(list_output_neosp)]]
|
|
|
|
|
|
|
12 |
fig, (ax1, ax2) = plt.subplots(1, 2)
|
13 |
# ax1
|
14 |
+
if "MbR Regressor" in pip_choices:
|
15 |
df_list_output_mean = pd.DataFrame(list_output_mean, columns=["MAE"])
|
16 |
ax1.plot(df_list_output_mean.index,
|
17 |
+
df_list_output_mean["MAE"], label="MbR Regressor")
|
18 |
if "NEOSP-SVR Regressor" in pip_choices:
|
19 |
+
df_list_output_NEOSP = pd.DataFrame(list_output_neosp, columns=["MAE"])
|
20 |
ax1.plot(df_list_output_NEOSP.index,
|
21 |
df_list_output_NEOSP["MAE"], label="NEOSP-SVR Regressor")
|
22 |
ax1.set_xlabel("Index Execução")
|
23 |
ax1.set_ylabel("MAE")
|
24 |
ax1.legend()
|
25 |
# ax2
|
26 |
+
if "MbR Regressor" or "NEOSP-SVR Regressor" in pip_choices:
|
27 |
df = pd.DataFrame(list_results, columns=["Model", "MAE"])
|
28 |
+
if "MbR Regressor" in pip_choices:
|
29 |
ax2.bar(df["Model"].iloc[[0]], df["MAE"].iloc[[0]])
|
30 |
if "NEOSP-SVR Regressor" in pip_choices:
|
31 |
ax2.bar(df["Model"].iloc[[1]], df["MAE"].iloc[[1]])
|
32 |
if "NEOSP-SVR Regressor" and "NEOSP-SVR Regressor" in pip_choices:
|
33 |
ax2.bar(df["Model"], df["MAE"])
|
34 |
+
if "MbR Regressor" or "NEOSP-SVR Regressor" in pip_choices:
|
35 |
ax2.set_ylabel("MAE Médio")
|
36 |
ax2.set_xlabel("Modelos")
|
37 |
# graficos geral
|
|
|
79 |
with gr.Column():
|
80 |
gr.Markdown("## Gráficos")
|
81 |
pip = gr.CheckboxGroup(
|
82 |
+
choices=["MbR Regressor", "NEOSP-SVR Regressor"], label="Modelos Preditivos")
|
83 |
# stars = gr.CheckboxGroup(choices=["Stars", "Week over Week"], label="")
|
84 |
# issues = gr.CheckboxGroup(choices=["Issue", "Exclude org members", "week over week"], label="")
|
85 |
with gr.Row():
|
requirements.txt
CHANGED
@@ -1,4 +1 @@
|
|
1 |
-
matplotlib
|
2 |
-
gradio
|
3 |
-
pandas
|
4 |
-
numpy
|
|
|
1 |
+
matplotlib
|
|
|
|
|
|