data_farming_core ================= .. py:module:: data_farming_core .. autoapi-nested-parse:: Core module for creating data farming designs. Module Contents --------------- .. py:class:: Scaler(original_min: float, original_max: float, scaled_min: float, scaled_max: float, precision: int = 0) Class to scale values from one range to another. Initialize the Scaler. :param original_min: The minimum value of the original range. :type original_min: float :param original_max: The maximum value of the original range. :type original_max: float :param scaled_min: The minimum value of the scaled range. :type scaled_min: float :param scaled_max: The maximum value of the scaled range. :type scaled_max: float :param precision: The number of decimal places to round to. Defaults to 0. :type precision: int, optional .. py:property:: original_min :type: float The minimum value of the original range. .. py:property:: original_max :type: float The maximum value of the original range. .. py:property:: scaled_min :type: float The minimum value of the scaled range. .. py:property:: scaled_max :type: float The maximum value of the scaled range. .. py:property:: precision :type: int The number of decimal places to round to. .. py:property:: scale_factor :type: int The factor by which to scale values. .. py:property:: scale :type: float The scale factor between the original and scaled ranges. .. py:method:: scale_value(value: float) -> int | float Scale a value from the original range to the scaled range. Returns an int if the value has no decimal component after rounding, otherwise returns a float. .. py:class:: DesignType(designs: list[tuple[float, float, int]] | None = None, *args: Any, **kwargs: Any) Bases: :py:obj:`abc.ABC` Abstract base class for design types. Initialize the DesignType class. .. py:method:: generate_design() -> list[list[float]] :abstractmethod: Generate a design as a 2D list. :returns: A 2D list containing the scaled design points. :rtype: list[list[float]] .. py:method:: save_design(output_file: pathlib.Path) -> None Save the design to a file. :param output_file: The path to the output file. :type output_file: Path