ilovetools 0.2.3__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.
@@ -0,0 +1,603 @@
1
+ """
2
+ Machine Learning utilities module
3
+ All functions have dual names: full descriptive name + abbreviated alias
4
+ """
5
+
6
+ from .metrics import (
7
+ accuracy_score,
8
+ precision_score,
9
+ recall_score,
10
+ f1_score,
11
+ confusion_matrix,
12
+ classification_report,
13
+ mean_squared_error,
14
+ mean_absolute_error,
15
+ root_mean_squared_error,
16
+ r2_score,
17
+ roc_auc_score,
18
+ # Aliases
19
+ mae,
20
+ mse,
21
+ rmse,
22
+ )
23
+
24
+ from .cross_validation import (
25
+ # Full names
26
+ k_fold_cross_validation,
27
+ stratified_k_fold,
28
+ time_series_split,
29
+ leave_one_out_cv,
30
+ shuffle_split_cv,
31
+ cross_validate_score,
32
+ holdout_validation_split,
33
+ train_val_test_split,
34
+ # Abbreviated aliases
35
+ kfold,
36
+ skfold,
37
+ tssplit,
38
+ loocv,
39
+ shuffle_cv,
40
+ cv_score,
41
+ holdout,
42
+ tvt_split,
43
+ )
44
+
45
+ from .tuning import (
46
+ # Full names
47
+ grid_search_cv,
48
+ random_search_cv,
49
+ generate_param_grid,
50
+ extract_best_params,
51
+ format_cv_results,
52
+ learning_curve_data,
53
+ validation_curve_data,
54
+ early_stopping_monitor,
55
+ compare_models_cv,
56
+ bayesian_search_simple,
57
+ # Abbreviated aliases
58
+ gridsearch,
59
+ randomsearch,
60
+ param_grid,
61
+ best_params,
62
+ cv_results,
63
+ learning_curve,
64
+ val_curve,
65
+ early_stop,
66
+ compare_models,
67
+ bayesopt,
68
+ )
69
+
70
+ from .ensemble import (
71
+ # Full names
72
+ voting_classifier,
73
+ voting_regressor,
74
+ bagging_predictions,
75
+ boosting_sequential,
76
+ stacking_ensemble,
77
+ weighted_average_ensemble,
78
+ majority_vote,
79
+ soft_vote,
80
+ bootstrap_sample,
81
+ out_of_bag_score,
82
+ ensemble_diversity,
83
+ blend_predictions,
84
+ # Abbreviated aliases
85
+ vote_clf,
86
+ vote_reg,
87
+ bagging,
88
+ boosting,
89
+ stacking,
90
+ weighted_avg,
91
+ hard_vote,
92
+ soft_vote_alias,
93
+ bootstrap,
94
+ oob_score,
95
+ diversity,
96
+ blend,
97
+ )
98
+
99
+ from .feature_selection import (
100
+ # Full names
101
+ correlation_filter,
102
+ variance_threshold_filter,
103
+ chi_square_filter,
104
+ mutual_information_filter,
105
+ recursive_feature_elimination,
106
+ forward_feature_selection,
107
+ backward_feature_elimination,
108
+ feature_importance_ranking,
109
+ l1_feature_selection,
110
+ univariate_feature_selection,
111
+ select_k_best_features,
112
+ remove_correlated_features,
113
+ # Abbreviated aliases
114
+ corr_filter,
115
+ var_filter,
116
+ chi2_filter,
117
+ mi_filter,
118
+ rfe,
119
+ forward_select,
120
+ backward_select,
121
+ feat_importance,
122
+ l1_select,
123
+ univariate_select,
124
+ select_k_best,
125
+ remove_corr,
126
+ )
127
+
128
+ from .interpretation import (
129
+ # Full names
130
+ feature_importance_scores,
131
+ permutation_importance,
132
+ partial_dependence,
133
+ shap_values_approximation,
134
+ lime_explanation,
135
+ decision_path_explanation,
136
+ model_coefficients_interpretation,
137
+ prediction_breakdown,
138
+ feature_contribution_analysis,
139
+ global_feature_importance,
140
+ local_feature_importance,
141
+ model_summary_statistics,
142
+ # Abbreviated aliases
143
+ feat_importance_scores,
144
+ perm_importance,
145
+ pdp,
146
+ shap_approx,
147
+ lime_explain,
148
+ decision_path,
149
+ coef_interpret,
150
+ pred_breakdown,
151
+ feat_contrib,
152
+ global_importance,
153
+ local_importance,
154
+ model_summary,
155
+ )
156
+
157
+ from .pipeline import (
158
+ # Full names
159
+ create_pipeline,
160
+ add_pipeline_step,
161
+ execute_pipeline,
162
+ validate_pipeline,
163
+ serialize_pipeline,
164
+ deserialize_pipeline,
165
+ pipeline_transform,
166
+ pipeline_fit_transform,
167
+ get_pipeline_params,
168
+ set_pipeline_params,
169
+ clone_pipeline,
170
+ pipeline_summary,
171
+ # Abbreviated aliases
172
+ create_pipe,
173
+ add_step,
174
+ execute_pipe,
175
+ validate_pipe,
176
+ serialize_pipe,
177
+ deserialize_pipe,
178
+ pipe_transform,
179
+ pipe_fit_transform,
180
+ get_params,
181
+ set_params,
182
+ clone_pipe,
183
+ pipe_summary,
184
+ )
185
+
186
+ from .imbalanced import (
187
+ # Full names
188
+ random_oversampling,
189
+ random_undersampling,
190
+ smote_oversampling,
191
+ tomek_links_undersampling,
192
+ class_weight_calculator,
193
+ stratified_sampling,
194
+ compute_class_distribution,
195
+ balance_dataset,
196
+ minority_class_identifier,
197
+ imbalance_ratio,
198
+ synthetic_sample_generator,
199
+ near_miss_undersampling,
200
+ # Abbreviated aliases
201
+ random_oversample,
202
+ random_undersample,
203
+ smote,
204
+ tomek_links,
205
+ class_weights,
206
+ stratified_sample,
207
+ class_dist,
208
+ balance_data,
209
+ minority_class,
210
+ imbalance_ratio_alias,
211
+ synthetic_sample,
212
+ near_miss,
213
+ )
214
+
215
+ from .dimensionality import (
216
+ # Full names
217
+ pca_transform,
218
+ explained_variance_ratio,
219
+ scree_plot_data,
220
+ cumulative_variance,
221
+ pca_inverse_transform,
222
+ truncated_svd,
223
+ kernel_pca_transform,
224
+ incremental_pca_transform,
225
+ feature_projection,
226
+ dimensionality_reduction_ratio,
227
+ reconstruction_error,
228
+ optimal_components,
229
+ whitening_transform,
230
+ component_loadings,
231
+ biplot_data,
232
+ # Abbreviated aliases
233
+ pca,
234
+ exp_var,
235
+ scree_plot,
236
+ cum_var,
237
+ pca_inverse,
238
+ svd,
239
+ kpca,
240
+ ipca,
241
+ project,
242
+ dim_ratio,
243
+ recon_error,
244
+ opt_components,
245
+ whiten,
246
+ loadings,
247
+ biplot,
248
+ )
249
+
250
+ from .timeseries import (
251
+ # Full names
252
+ moving_average,
253
+ exponential_moving_average,
254
+ weighted_moving_average,
255
+ seasonal_decompose,
256
+ difference_series,
257
+ autocorrelation,
258
+ partial_autocorrelation,
259
+ detect_trend,
260
+ detect_seasonality,
261
+ remove_trend,
262
+ remove_seasonality,
263
+ rolling_statistics,
264
+ lag_features,
265
+ time_series_split_cv,
266
+ forecast_accuracy,
267
+ # Abbreviated aliases
268
+ ma,
269
+ ema,
270
+ wma,
271
+ decompose,
272
+ diff,
273
+ acf,
274
+ pacf,
275
+ trend,
276
+ seasonality,
277
+ detrend,
278
+ deseasonalize,
279
+ rolling_stats,
280
+ lag,
281
+ ts_cv,
282
+ forecast_acc,
283
+ )
284
+
285
+ from .clustering import (
286
+ # Full names
287
+ kmeans_clustering,
288
+ hierarchical_clustering,
289
+ dbscan_clustering,
290
+ elbow_method,
291
+ silhouette_score,
292
+ euclidean_distance,
293
+ manhattan_distance,
294
+ cosine_similarity_distance,
295
+ initialize_centroids,
296
+ assign_clusters,
297
+ update_centroids,
298
+ calculate_inertia,
299
+ dendrogram_data,
300
+ cluster_purity,
301
+ davies_bouldin_index,
302
+ # Abbreviated aliases
303
+ kmeans,
304
+ hierarchical,
305
+ dbscan,
306
+ elbow,
307
+ silhouette,
308
+ euclidean,
309
+ manhattan,
310
+ cosine_dist,
311
+ init_centroids,
312
+ assign,
313
+ update,
314
+ inertia,
315
+ dendrogram,
316
+ purity,
317
+ davies_bouldin,
318
+ )
319
+
320
+ __all__ = [
321
+ # Metrics (full names)
322
+ 'accuracy_score',
323
+ 'precision_score',
324
+ 'recall_score',
325
+ 'f1_score',
326
+ 'confusion_matrix',
327
+ 'classification_report',
328
+ 'mean_squared_error',
329
+ 'mean_absolute_error',
330
+ 'root_mean_squared_error',
331
+ 'r2_score',
332
+ 'roc_auc_score',
333
+ # Metrics (aliases)
334
+ 'mae',
335
+ 'mse',
336
+ 'rmse',
337
+ # Cross-validation (full names)
338
+ 'k_fold_cross_validation',
339
+ 'stratified_k_fold',
340
+ 'time_series_split',
341
+ 'leave_one_out_cv',
342
+ 'shuffle_split_cv',
343
+ 'cross_validate_score',
344
+ 'holdout_validation_split',
345
+ 'train_val_test_split',
346
+ # Cross-validation (aliases)
347
+ 'kfold',
348
+ 'skfold',
349
+ 'tssplit',
350
+ 'loocv',
351
+ 'shuffle_cv',
352
+ 'cv_score',
353
+ 'holdout',
354
+ 'tvt_split',
355
+ # Tuning (full names)
356
+ 'grid_search_cv',
357
+ 'random_search_cv',
358
+ 'generate_param_grid',
359
+ 'extract_best_params',
360
+ 'format_cv_results',
361
+ 'learning_curve_data',
362
+ 'validation_curve_data',
363
+ 'early_stopping_monitor',
364
+ 'compare_models_cv',
365
+ 'bayesian_search_simple',
366
+ # Tuning (aliases)
367
+ 'gridsearch',
368
+ 'randomsearch',
369
+ 'param_grid',
370
+ 'best_params',
371
+ 'cv_results',
372
+ 'learning_curve',
373
+ 'val_curve',
374
+ 'early_stop',
375
+ 'compare_models',
376
+ 'bayesopt',
377
+ # Ensemble (full names)
378
+ 'voting_classifier',
379
+ 'voting_regressor',
380
+ 'bagging_predictions',
381
+ 'boosting_sequential',
382
+ 'stacking_ensemble',
383
+ 'weighted_average_ensemble',
384
+ 'majority_vote',
385
+ 'soft_vote',
386
+ 'bootstrap_sample',
387
+ 'out_of_bag_score',
388
+ 'ensemble_diversity',
389
+ 'blend_predictions',
390
+ # Ensemble (aliases)
391
+ 'vote_clf',
392
+ 'vote_reg',
393
+ 'bagging',
394
+ 'boosting',
395
+ 'stacking',
396
+ 'weighted_avg',
397
+ 'hard_vote',
398
+ 'soft_vote_alias',
399
+ 'bootstrap',
400
+ 'oob_score',
401
+ 'diversity',
402
+ 'blend',
403
+ # Feature Selection (full names)
404
+ 'correlation_filter',
405
+ 'variance_threshold_filter',
406
+ 'chi_square_filter',
407
+ 'mutual_information_filter',
408
+ 'recursive_feature_elimination',
409
+ 'forward_feature_selection',
410
+ 'backward_feature_elimination',
411
+ 'feature_importance_ranking',
412
+ 'l1_feature_selection',
413
+ 'univariate_feature_selection',
414
+ 'select_k_best_features',
415
+ 'remove_correlated_features',
416
+ # Feature Selection (aliases)
417
+ 'corr_filter',
418
+ 'var_filter',
419
+ 'chi2_filter',
420
+ 'mi_filter',
421
+ 'rfe',
422
+ 'forward_select',
423
+ 'backward_select',
424
+ 'feat_importance',
425
+ 'l1_select',
426
+ 'univariate_select',
427
+ 'select_k_best',
428
+ 'remove_corr',
429
+ # Interpretation (full names)
430
+ 'feature_importance_scores',
431
+ 'permutation_importance',
432
+ 'partial_dependence',
433
+ 'shap_values_approximation',
434
+ 'lime_explanation',
435
+ 'decision_path_explanation',
436
+ 'model_coefficients_interpretation',
437
+ 'prediction_breakdown',
438
+ 'feature_contribution_analysis',
439
+ 'global_feature_importance',
440
+ 'local_feature_importance',
441
+ 'model_summary_statistics',
442
+ # Interpretation (aliases)
443
+ 'feat_importance_scores',
444
+ 'perm_importance',
445
+ 'pdp',
446
+ 'shap_approx',
447
+ 'lime_explain',
448
+ 'decision_path',
449
+ 'coef_interpret',
450
+ 'pred_breakdown',
451
+ 'feat_contrib',
452
+ 'global_importance',
453
+ 'local_importance',
454
+ 'model_summary',
455
+ # Pipeline (full names)
456
+ 'create_pipeline',
457
+ 'add_pipeline_step',
458
+ 'execute_pipeline',
459
+ 'validate_pipeline',
460
+ 'serialize_pipeline',
461
+ 'deserialize_pipeline',
462
+ 'pipeline_transform',
463
+ 'pipeline_fit_transform',
464
+ 'get_pipeline_params',
465
+ 'set_pipeline_params',
466
+ 'clone_pipeline',
467
+ 'pipeline_summary',
468
+ # Pipeline (aliases)
469
+ 'create_pipe',
470
+ 'add_step',
471
+ 'execute_pipe',
472
+ 'validate_pipe',
473
+ 'serialize_pipe',
474
+ 'deserialize_pipe',
475
+ 'pipe_transform',
476
+ 'pipe_fit_transform',
477
+ 'get_params',
478
+ 'set_params',
479
+ 'clone_pipe',
480
+ 'pipe_summary',
481
+ # Imbalanced (full names)
482
+ 'random_oversampling',
483
+ 'random_undersampling',
484
+ 'smote_oversampling',
485
+ 'tomek_links_undersampling',
486
+ 'class_weight_calculator',
487
+ 'stratified_sampling',
488
+ 'compute_class_distribution',
489
+ 'balance_dataset',
490
+ 'minority_class_identifier',
491
+ 'imbalance_ratio',
492
+ 'synthetic_sample_generator',
493
+ 'near_miss_undersampling',
494
+ # Imbalanced (aliases)
495
+ 'random_oversample',
496
+ 'random_undersample',
497
+ 'smote',
498
+ 'tomek_links',
499
+ 'class_weights',
500
+ 'stratified_sample',
501
+ 'class_dist',
502
+ 'balance_data',
503
+ 'minority_class',
504
+ 'imbalance_ratio_alias',
505
+ 'synthetic_sample',
506
+ 'near_miss',
507
+ # Dimensionality (full names)
508
+ 'pca_transform',
509
+ 'explained_variance_ratio',
510
+ 'scree_plot_data',
511
+ 'cumulative_variance',
512
+ 'pca_inverse_transform',
513
+ 'truncated_svd',
514
+ 'kernel_pca_transform',
515
+ 'incremental_pca_transform',
516
+ 'feature_projection',
517
+ 'dimensionality_reduction_ratio',
518
+ 'reconstruction_error',
519
+ 'optimal_components',
520
+ 'whitening_transform',
521
+ 'component_loadings',
522
+ 'biplot_data',
523
+ # Dimensionality (aliases)
524
+ 'pca',
525
+ 'exp_var',
526
+ 'scree_plot',
527
+ 'cum_var',
528
+ 'pca_inverse',
529
+ 'svd',
530
+ 'kpca',
531
+ 'ipca',
532
+ 'project',
533
+ 'dim_ratio',
534
+ 'recon_error',
535
+ 'opt_components',
536
+ 'whiten',
537
+ 'loadings',
538
+ 'biplot',
539
+ # Time Series (full names)
540
+ 'moving_average',
541
+ 'exponential_moving_average',
542
+ 'weighted_moving_average',
543
+ 'seasonal_decompose',
544
+ 'difference_series',
545
+ 'autocorrelation',
546
+ 'partial_autocorrelation',
547
+ 'detect_trend',
548
+ 'detect_seasonality',
549
+ 'remove_trend',
550
+ 'remove_seasonality',
551
+ 'rolling_statistics',
552
+ 'lag_features',
553
+ 'time_series_split_cv',
554
+ 'forecast_accuracy',
555
+ # Time Series (aliases)
556
+ 'ma',
557
+ 'ema',
558
+ 'wma',
559
+ 'decompose',
560
+ 'diff',
561
+ 'acf',
562
+ 'pacf',
563
+ 'trend',
564
+ 'seasonality',
565
+ 'detrend',
566
+ 'deseasonalize',
567
+ 'rolling_stats',
568
+ 'lag',
569
+ 'ts_cv',
570
+ 'forecast_acc',
571
+ # Clustering (full names)
572
+ 'kmeans_clustering',
573
+ 'hierarchical_clustering',
574
+ 'dbscan_clustering',
575
+ 'elbow_method',
576
+ 'silhouette_score',
577
+ 'euclidean_distance',
578
+ 'manhattan_distance',
579
+ 'cosine_similarity_distance',
580
+ 'initialize_centroids',
581
+ 'assign_clusters',
582
+ 'update_centroids',
583
+ 'calculate_inertia',
584
+ 'dendrogram_data',
585
+ 'cluster_purity',
586
+ 'davies_bouldin_index',
587
+ # Clustering (aliases)
588
+ 'kmeans',
589
+ 'hierarchical',
590
+ 'dbscan',
591
+ 'elbow',
592
+ 'silhouette',
593
+ 'euclidean',
594
+ 'manhattan',
595
+ 'cosine_dist',
596
+ 'init_centroids',
597
+ 'assign',
598
+ 'update',
599
+ 'inertia',
600
+ 'dendrogram',
601
+ 'purity',
602
+ 'davies_bouldin',
603
+ ]