yandex-research / rtdl

Research on Tabular Deep Learning: Papers & Packages
Apache License 2.0
888 stars 98 forks source link

Bugs in piecewise-linear encoding #38

Closed Yura52 closed 1 year ago

Yura52 commented 2 years ago
  1. Here, indices = as_tensor(values) must be changed to this:
indices = as_tensor(indices)
  1. Here, np.array(d_encoding) must be changed to this:
torch.tensor(d_encoding).to(indices)
  1. Here, the argument dtype=X.dtype is missing for np.array

  2. Here, .to(X) is missing

  3. Here, it must be:

is_last_bin = bin_indices + 1 == as_tensor(list(map(len, bin_edges)))
Dont-Care-Didnt-Ask commented 1 year ago
  1. Here it should be
        if (
            (c_values < effective_c_bin_edges[c_indices]).any()
            or (c_values > effective_c_bin_edges[c_indices + 1]).any()
        ):
daniil-shlenskii commented 1 year ago
  1. Here, it must be
    quantiles = torch.linspace(0.0, 1.0, adjusted_n_bins + 1).to(column.device)