Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many NANs in fitted data? #9

Open
soliverc opened this issue Apr 20, 2020 · 1 comment
Open

Many NANs in fitted data? #9

soliverc opened this issue Apr 20, 2020 · 1 comment

Comments

@soliverc
Copy link

soliverc commented Apr 20, 2020

My data:

print(transactions.head())

iban_hash                                                                     local_date            amount
0  0a00c7432fb237806ee8c073c620f56edf8c5b42936657... 2016-09-30     8.1
1  97287183cee5705d3c2ab6b2ccd207fbeae1c86bf88a0c... 2016-10-02     4.0
2  1b4645137726e017339bc5b10de23eb1138bd9ee15a76d... 2016-10-03     3.0
3  f9b50094d36c3fbcd4e912d7b0ded2f74b16243dd2ee3c... 2016-10-03     9.7
4  0a00c7432fb237806ee8c073c620f56edf8c5b42936657... 2016-10-04    10.0

Dtypes:

transactions.dtypes

iban_hash             object
local_date    datetime64[ns]
amount               float64

Running the model:

# set up RFM instance
myrfm = rfm.RFM()

# apply scoring to dataset
myrfm.fit(data=transactions,dataset_type='transactional',scoring_method='Median', recency_end_date='02/29/2020')

Output of myrfm.get_fitted_data()

image

I have just upgraded to version 1.0.4. I don't remember seeing NAs in previous versions. Even if their relative values were low, e.g. Somebody with a monetary value of $1 would still get a low score rather than NAN.

I did have to edit one date time object to get the package to work (see pull request). Could this have caused the problem? I can't revert my change because then the package doesn't work at all. :)

@soliverc
Copy link
Author

Note: I have just downgraded to version 1.0.1 and the Nans have disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant