refactor(ml): update inference calls to use new model structure and improve clarity
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
from src.ml.model_selection import inference_model
|
from src.ml.model_selection import inference_model
|
||||||
|
from joblib import load
|
||||||
|
|
||||||
model = {"SVM": "D:/thesis/models/sensor1/SVM.joblib",
|
x = 30
|
||||||
"SVM with PCA": "D:/thesis/models/sensor1/SVM with StandardScaler and PCA.joblib",
|
file = f"D:/thesis/data/dataset_B/zzzBD{x}.TXT"
|
||||||
"XGBoost": "D:/thesis/models/sensor1/XGBoost.joblib"}
|
sensor = 1
|
||||||
|
model = {"SVM": f"D:/thesis/models/sensor{sensor}/SVM.joblib",
|
||||||
|
"SVM with PCA": f"D:/thesis/models/sensor{sensor}/SVM with StandardScaler and PCA.joblib",
|
||||||
|
"XGBoost": f"D:/thesis/models/sensor{sensor}/XGBoost.joblib"}
|
||||||
|
|
||||||
# inference_model(model["SVM"], "D:/thesis/data/dataset_A/zzzAD10.TXT", column_question=10)
|
index = ((x-1) % 5) + 1
|
||||||
# inference_model(model["SVM with PCA"], "D:/thesis/data/dataset_A/zzzAD10.TXT", column_question=10)
|
inference_model(model["SVM"], file, column_question=index)
|
||||||
inference_model(model["XGBoost"], "D:/thesis/data/dataset_A/zzzAD30.TXT", column_question=30)
|
print("---")
|
||||||
|
inference_model(model["SVM with PCA"], file, column_question=index)
|
||||||
|
print("---")
|
||||||
|
inference_model(model["XGBoost"], file, column_question=index)
|
||||||
Reference in New Issue
Block a user