Git Product home page Git Product logo

jalajthanaki / customer_segmentation Goto Github PK

View Code? Open in Web Editor NEW
127.0 2.0 58.0 12.4 MB

Analysing the content of an E-commerce database that contains list of purchases. Based on the analysis, I develop a model that allows to anticipate the purchases that will be made by a new customer, during the following year from its first purchase.

Jupyter Notebook 100.00%
customer-segmentation customer-analytics e-commerce-example machine-learning-algorithms voting-classifier predictive-analytics

customer_segmentation's People

Contributors

jalajthanaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

customer_segmentation's Issues

Notebook wont run, json error at startup and datetime error at 48

ln [48 ]: set_entrainement = basket_price[basket_price['InvoiceDate'] < datetime.date(2011,10,1)]
set_test = basket_price[basket_price['InvoiceDate'] >= datetime.date(2011,10,1)]
basket_price = set_entrainement.copy(deep = True)

TypeError Traceback (most recent call last)
in ()
----> 1 set_entrainement = basket_price[basket_price['InvoiceDate'] < datetime.date(2011,10,1)]
2 set_test = basket_price[basket_price['InvoiceDate'] >= datetime.date(2011,10,1)]
3 basket_price = set_entrainement.copy(deep = True)

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\pandas\core\ops.py in wrapper(self, other, axis)
1199 # Series/Index behavior
1200 res_values = dispatch_to_index_op(op, self, other,
-> 1201 pd.DatetimeIndex)
1202 return self._constructor(res_values, index=self.index,
1203 name=res_name)

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\pandas\core\ops.py in dispatch_to_index_op(op, left, right, index_class)
1096 left_idx = left_idx._shallow_copy(freq=None)
1097 try:
-> 1098 result = op(left_idx, right)
1099 except NullFrequencyError:
1100 # DatetimeIndex and TimedeltaIndex with freq == None raise ValueError

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\pandas\core\indexes\datetimes.py in wrapper(self, other)
131 return np.ones(shape=self.shape, dtype=bool)
132 raise TypeError('%s type object %s' %
--> 133 (type(other), str(other)))
134
135 if is_datetimelike(other):

TypeError: <class 'datetime.date'> type object 2011-10-01

from datetime import date
from datetime import datetime

and removed 'date' from datetime.date as below and it worked

set_entrainement = basket_price[basket_price['InvoiceDate'] < datetime(2011,10,1)]
set_test = basket_price[basket_price['InvoiceDate'] >= datetime(2011,10,1)]
basket_price = set_entrainement.copy(deep = True)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.