-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.jl
41 lines (32 loc) · 1.29 KB
/
main.jl
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
using CSV, DataFrames
using SynthPred.Exploration
using SynthPred.Imputer
using SynthPred.AutoML
const DATA_PATH = "data/example.csv"
const NEW_DATA_PATH = "data/new_data.csv"
const REPORT_PATH = "reports/imputation_report.json"
# ----------------------------------------
println("📥 Wczytywanie danych z pliku: $DATA_PATH")
df = CSV.read(DATA_PATH, DataFrame)
# ----------------------------------------
println("📊 ANALIZA DANYCH")
describe_data(df)
run_basic_tests(df)
# ----------------------------------------
println("🧼 IMPUTACJA DANYCH (RNN/ARIMA/distribution)")
df_filled, report = impute_advanced(df, "rnn", threshold=0.1)
save_imputation_report(report, REPORT_PATH)
# ----------------------------------------
target_col = :target
println("🧠 AutoML – wybór top 2 modeli dla kolumny $target_col")
top_models, scores = run_automl(df_filled, target_col)
X = select(df_filled, Not(target_col))
y = df_filled[:, target_col]
println("⚖️ Tworzenie modelu ensemble z top 2 modeli")
ensemble_model = blend_top_models(top_models, X, y)
# ----------------------------------------
println("📈 Predykcja na nowych danych z pliku: $NEW_DATA_PATH")
Xnew = CSV.read(NEW_DATA_PATH, DataFrame)
predictions = predict_ensemble(ensemble_model, Xnew)
println("📢 Wyniki predykcji:")
println(predictions)