131 lines
3.0 KiB
Plaintext
131 lines
3.0 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "cf894f6f",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Intermediate Fusion mit Deep SVDD"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "494626b1",
|
|
"metadata": {},
|
|
"source": [
|
|
"* Input: gemeinsames Dataset aus EYE Tracking und Action Units mit selber Abtastfrequenz\n",
|
|
"* Verarbeitung: Intermediate Fusion\n",
|
|
"* Modell: Deep SVDD --> Erlernen einer Kugel durch ein neuronales Netz, dass die Normaldaten einschließt"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "bef91203",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Imports"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "f0b8274a",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pandas as pd\n",
|
|
"import numpy as np\n",
|
|
"from pathlib import Path\n",
|
|
"import sys\n",
|
|
"import os\n",
|
|
"\n",
|
|
"base_dir = os.path.abspath(os.path.join(os.getcwd(), \"..\"))\n",
|
|
"sys.path.append(base_dir)\n",
|
|
"print(base_dir)\n",
|
|
"\n",
|
|
"from Fahrsimulator_MSY2526_AI.model_training.tools import evaluation_tools, scaler, mad_outlier_removal\n",
|
|
"from sklearn.preprocessing import StandardScaler, MinMaxScaler\n",
|
|
"from sklearn.svm import OneClassSVM\n",
|
|
"from sklearn.model_selection import GridSearchCV, KFold, ParameterGrid, train_test_split, GroupKFold\n",
|
|
"import matplotlib.pyplot as plt\n",
|
|
"import tensorflow as tf\n",
|
|
"import pickle\n",
|
|
"from sklearn.metrics import (roc_auc_score, accuracy_score, precision_score, recall_score, f1_score, confusion_matrix, classification_report, balanced_accuracy_score, ConfusionMatrixDisplay) "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "f00a477c",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Data Preprocessing"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "504c1df7",
|
|
"metadata": {},
|
|
"source": [
|
|
"Laden der Daten"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "6482542b",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"dataset_path = Path(r\"/home/jovyan/data-paulusjafahrsimulator-gpu/first_AU_dataset/output_windowed.parquet\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "ce8ab464",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"df = pd.read_parquet(path=dataset_path)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "b736bc58",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Modell Training"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "aa11faf3",
|
|
"metadata": {},
|
|
"source": [
|
|
"Vor-Training der Gewichte mit Autoencoder, Loss: MSE"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3 (ipykernel)",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.12.10"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|