data_feaure_entity.py 665 B

1234567891011121314151617181920212223242526272829303132333435
  1. # -*- coding: utf-8 -*-
  2. """
  3. @author: yq
  4. @time: 2024/11/1
  5. @desc:
  6. """
  7. import pandas as pd
  8. class DataFeatureEntity():
  9. def __init__(self, data: pd.DataFrame, x_columns: list, y_column: str):
  10. self._data = data
  11. self._x_columns = x_columns
  12. self._y_column = y_column
  13. @property
  14. def data(self):
  15. return self._data
  16. @property
  17. def x_columns(self):
  18. return self._x_columns
  19. @property
  20. def y_column(self):
  21. return self._y_column
  22. def get_Xdata(self):
  23. return self._data[self._x_columns]
  24. def get_Ydata(self):
  25. return self._data[self._y_column]
  26. if __name__ == "__main__":
  27. pass