/**
 * This function updates the values in the given data list, based on the given threshold.
 *
 * @param data A list of numeric values to update.
 * @param threshold The threshold value to compare each value in the data list.
 * @return A list where values below the threshold are updated to -1 and values above or equal to the threshold are left unchanged.
 */
fun updateValues(data: List<Double>, threshold: Double): List<Double> {

    val result = mutableListOf<Double>()
    for (value in data) {
        if (value < threshold) {
            result.add(-1.0)
        } else {
            result.add(value)
        }
    }
    return result
}
/**
 * This function updates the values in the given data list, based on the given threshold.
 *
 * @param data A list of numeric values to update.
 * @param threshold The threshold value to compare each value in the data list.
 * @return A list where values below the threshold are updated to -1 and values above or equal to the threshold are left unchanged.
 */
fun updateValues(data: List<Double>, threshold: Double): List<Double> {
/**
 * This function updates the values in the given data list, based on the given threshold.
 *
 * @param data A list of numeric values to update.
 * @param threshold The threshold value to compare each value in the data list.
 * @return A list where values below the threshold are updated to -1 and values above or equal to the threshold are left unchanged.
 */
fun updateValues(data: List<Double>, threshold: Double): List<Double> {

    val result = mutableListOf<Double>()
    for (value in data) {
        if (value < threshold) {
            result.add(-1.0)
        } else {
            result.add(value)
        }
    }
    return result
}