File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 99from typing import Any
1010
1111import numpy as np
12- import pandas as pd
1312import tensorflow as tf
1413from loguru import logger
1514
@@ -1438,27 +1437,6 @@ def get_feature_statistics(self) -> dict:
14381437 "output_mode" : self .output_mode ,
14391438 }
14401439
1441- def _convert_to_dataset (self , data : tf .data .Dataset | pd .DataFrame | dict ) -> tf .data .Dataset :
1442- """Convert input data to TensorFlow dataset.
1443-
1444- Args:
1445- data: Input data to convert. Can be a DataFrame, Dataset, or dict.
1446-
1447- Returns:
1448- tf.data.Dataset: The converted dataset.
1449-
1450- Raises:
1451- ValueError: If input data is not a supported type.
1452- """
1453- if isinstance (data , pd .DataFrame ):
1454- return tf .data .Dataset .from_tensor_slices (dict (data )).batch (32 )
1455- elif isinstance (data , dict ):
1456- return tf .data .Dataset .from_tensor_slices (data ).batch (32 )
1457- elif isinstance (data , tf .data .Dataset ):
1458- return data
1459- else :
1460- raise ValueError ("Input data must be a DataFrame, dict, or TensorFlow Dataset" )
1461-
14621440 def get_feature_importances (self ) -> dict [str , float ]:
14631441 """Get feature importance scores from feature selection layers.
14641442
You can’t perform that action at this time.
0 commit comments