ThreeWToolkit 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ThreeWToolkit might be problematic. Click here for more details.
- ThreeWToolkit/__init__.py +0 -0
- ThreeWToolkit/assessment/__init__.py +0 -0
- ThreeWToolkit/assessment/test_results_assessment.py +4 -0
- ThreeWToolkit/assessment/training_assessment.py +4 -0
- ThreeWToolkit/core/__init__.py +0 -0
- ThreeWToolkit/core/base_assessment.py +9 -0
- ThreeWToolkit/core/base_assessment_visualization.py +9 -0
- ThreeWToolkit/core/base_data_loader.py +44 -0
- ThreeWToolkit/core/base_data_visualization.py +9 -0
- ThreeWToolkit/core/base_feature_extractor.py +9 -0
- ThreeWToolkit/core/base_metrics.py +9 -0
- ThreeWToolkit/core/base_model_development.py +9 -0
- ThreeWToolkit/core/base_model_trainer.py +9 -0
- ThreeWToolkit/core/base_models.py +9 -0
- ThreeWToolkit/core/base_optim.py +9 -0
- ThreeWToolkit/core/base_preprocessing.py +9 -0
- ThreeWToolkit/core/base_time_series_holdout.py +9 -0
- ThreeWToolkit/data_loader/__init__.py +0 -0
- ThreeWToolkit/data_loader/csv_data_loader.py +4 -0
- ThreeWToolkit/data_loader/database_data_loader.py +4 -0
- ThreeWToolkit/data_loader/hdf5_data_loader.py +4 -0
- ThreeWToolkit/data_loader/json_data_loader.py +4 -0
- ThreeWToolkit/data_loader/pickle_data_loader.py +4 -0
- ThreeWToolkit/data_loader/threew_data_loader.py +4 -0
- ThreeWToolkit/data_visualization/__init__.py +0 -0
- ThreeWToolkit/data_visualization/plot_correlation_heatmap.py +4 -0
- ThreeWToolkit/data_visualization/plot_fft.py +4 -0
- ThreeWToolkit/data_visualization/plot_multiple_series.py +4 -0
- ThreeWToolkit/data_visualization/plot_seasonal_decompose.py +4 -0
- ThreeWToolkit/data_visualization/plot_series.py +4 -0
- ThreeWToolkit/data_visualization/plot_statistical_features.py +4 -0
- ThreeWToolkit/data_visualization/plot_wavelet_spectrogram.py +4 -0
- ThreeWToolkit/enums/__init__.py +0 -0
- ThreeWToolkit/feature_extraction/__init__.py +0 -0
- ThreeWToolkit/feature_extraction/extract_autocorrelation.py +4 -0
- ThreeWToolkit/feature_extraction/extract_fourier_features.py +4 -0
- ThreeWToolkit/feature_extraction/extract_shapelets.py +4 -0
- ThreeWToolkit/feature_extraction/extract_statistical_features.py +4 -0
- ThreeWToolkit/feature_extraction/extract_wavelet_features.py +4 -0
- ThreeWToolkit/feature_extraction/tsfresh_features.py +4 -0
- ThreeWToolkit/holdout/__init__.py +0 -0
- ThreeWToolkit/holdout/train_test_split.py +4 -0
- ThreeWToolkit/logs/dummy.txt +0 -0
- ThreeWToolkit/metrics/__init__.py +0 -0
- ThreeWToolkit/metrics/accuracy.py +4 -0
- ThreeWToolkit/metrics/average_precision.py +4 -0
- ThreeWToolkit/metrics/balanced_accuracy.py +4 -0
- ThreeWToolkit/metrics/explained_variance.py +4 -0
- ThreeWToolkit/metrics/f1_score.py +4 -0
- ThreeWToolkit/metrics/homogeneity_score.py +4 -0
- ThreeWToolkit/metrics/neg_mean_absolute_error.py +4 -0
- ThreeWToolkit/metrics/neg_mean_squared_error.py +4 -0
- ThreeWToolkit/metrics/neg_root_mean_squared_error.py +4 -0
- ThreeWToolkit/metrics/precision.py +4 -0
- ThreeWToolkit/metrics/recall.py +4 -0
- ThreeWToolkit/metrics/roc_auc.py +4 -0
- ThreeWToolkit/models/anomaly/__init__.py +0 -0
- ThreeWToolkit/models/anomaly/autoencoder_anomaly.py +4 -0
- ThreeWToolkit/models/anomaly/detect_zscore_anomaly.py +4 -0
- ThreeWToolkit/models/anomaly/isolation_forest_anomaly.py +4 -0
- ThreeWToolkit/models/anomaly/spectral_residual_anomaly.py +4 -0
- ThreeWToolkit/models/classification/__init__.py +0 -0
- ThreeWToolkit/models/classification/classification_models.py +5 -0
- ThreeWToolkit/models/regression/__init__.py +0 -0
- ThreeWToolkit/models/regression/regression_models.py +5 -0
- ThreeWToolkit/optim/__init__.py +0 -0
- ThreeWToolkit/optim/bayesian.py +4 -0
- ThreeWToolkit/optim/genetic_algorithm.py +4 -0
- ThreeWToolkit/optim/gradient_optimization.py +4 -0
- ThreeWToolkit/optim/grid_search.py +4 -0
- ThreeWToolkit/optim/random_search.py +4 -0
- ThreeWToolkit/pipeline.py +2 -0
- ThreeWToolkit/preprocessing/__init__.py +0 -0
- ThreeWToolkit/preprocessing/detrend.py +4 -0
- ThreeWToolkit/preprocessing/impute_missing_data.py +4 -0
- ThreeWToolkit/preprocessing/impute_target_data.py +4 -0
- ThreeWToolkit/preprocessing/normalize.py +4 -0
- ThreeWToolkit/preprocessing/rename_columns.py +4 -0
- ThreeWToolkit/preprocessing/resample.py +4 -0
- ThreeWToolkit/preprocessing/smooth.py +4 -0
- ThreeWToolkit/preprocessing/windowing.py +4 -0
- ThreeWToolkit/reports/dummy.txt +0 -0
- ThreeWToolkit/trainers/__init__.py +0 -0
- ThreeWToolkit/trainers/cnn_lstm.py +4 -0
- ThreeWToolkit/trainers/elasticnet.py +4 -0
- ThreeWToolkit/trainers/inception_time.py +4 -0
- ThreeWToolkit/trainers/lstm.py +4 -0
- ThreeWToolkit/trainers/sklearn_models.py +4 -0
- ThreeWToolkit/trainers/transformer.py +4 -0
- ThreeWToolkit/utils/__init__.py +0 -0
- ThreeWToolkit/utils/general_utils.py +4 -0
- ThreeWToolkit/utils/model_recorder.py +12 -0
- ThreeWToolkit/utils/report_generation.py +24 -0
- ThreeWToolkit/utils/trainer_logger.py +8 -0
- threewtoolkit-0.0.1.dist-info/LICENSE +674 -0
- threewtoolkit-0.0.1.dist-info/METADATA +215 -0
- threewtoolkit-0.0.1.dist-info/RECORD +98 -0
- threewtoolkit-0.0.1.dist-info/WHEEL +4 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from pydantic import BaseModel, Field, field_validator
|
|
3
|
+
from typing import Optional, Literal, Union, Tuple, Any
|
|
4
|
+
|
|
5
|
+
class DataLoaderConfig(BaseModel):
|
|
6
|
+
source_path: str = Field(..., description="Path to the data file.")
|
|
7
|
+
file_type: Literal['csv', 'parquet', 'json'] = Field(..., description="File type.")
|
|
8
|
+
has_header: bool = True
|
|
9
|
+
separator: Optional[str] = Field(',', description="Field separator (for CSV).")
|
|
10
|
+
target_column: Optional[str] = Field(None, description="Target column for supervised tasks.")
|
|
11
|
+
shape: Optional[Tuple[int, int]] = None
|
|
12
|
+
|
|
13
|
+
@field_validator('source_path')
|
|
14
|
+
@classmethod
|
|
15
|
+
def path_must_not_be_empty(cls, v):
|
|
16
|
+
if not v.strip():
|
|
17
|
+
raise ValueError("source_path cannot be empty.")
|
|
18
|
+
return v
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@field_validator('separator')
|
|
22
|
+
@classmethod
|
|
23
|
+
def validate_separator(cls, v, info):
|
|
24
|
+
file_type = info.data.get("file_type")
|
|
25
|
+
if file_type == 'csv' and not v:
|
|
26
|
+
raise ValueError("Separator must be provided for CSV files.")
|
|
27
|
+
return v
|
|
28
|
+
|
|
29
|
+
class BaseDataLoader(ABC):
|
|
30
|
+
def __init__(self, config: DataLoaderConfig):
|
|
31
|
+
self.config = config
|
|
32
|
+
|
|
33
|
+
@abstractmethod
|
|
34
|
+
def load_data(self) -> Union[Any, Tuple[Any, Any]]:
|
|
35
|
+
"""
|
|
36
|
+
Loads data based on the configuration.
|
|
37
|
+
Should return (X, y) or just X.
|
|
38
|
+
"""
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
def describe_config(self):
|
|
42
|
+
print("DataLoader configuration:")
|
|
43
|
+
for k, v in self.config.model_dump().items():
|
|
44
|
+
print(f"{k}: {v}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
|
|
3
|
+
class ReportGeneration(ABC):
|
|
4
|
+
pass
|
|
5
|
+
|
|
6
|
+
@staticmethod
|
|
7
|
+
def generate_summary_report():
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
@staticmethod
|
|
11
|
+
def generate_feature_report():
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
@staticmethod
|
|
15
|
+
def save_report():
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
@staticmethod
|
|
19
|
+
def export_results_to_csv():
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
@staticmethod
|
|
23
|
+
def export_results_to_json():
|
|
24
|
+
pass
|