From a74d653910cfb5131228301adb3756fd543cd083 Mon Sep 17 00:00:00 2001 From: "shoney.arickathil" Date: Mon, 18 Sep 2023 07:09:19 +0200 Subject: [PATCH] doc --- doc/References.bib | 59 +++++++++++++-------- doc/chapters/appendix.tex | 7 +++ doc/chapters/building-kg.tex | 58 +++++++-------------- doc/chapters/conclusion.tex | 55 +++++++++++++++----- doc/chapters/data-preprocessing.tex | 80 ++++++++++++++--------------- doc/chapters/introduction.tex | 59 ++++++++++++--------- doc/chapters/math-behind.tex | 2 +- doc/chapters/model-selection.tex | 39 +++++++------- doc/index.tex | 6 +-- doc/preliminary/abstract.tex | 8 ++- doc/preliminary/acronyms.tex | 4 +- 11 files changed, 208 insertions(+), 169 deletions(-) diff --git a/doc/References.bib b/doc/References.bib index e94d529..487cef6 100644 --- a/doc/References.bib +++ b/doc/References.bib @@ -16,7 +16,7 @@ date = {29/04/2017}, title = {Learning to Ask: Neural Question Generation for Reading Comprehension}, url = {https://arxiv.org/pdf/1705.00106.pdf}, - urldate = {28/05/2023}, + urldate = {2023-05-28}, year = {2017}, file = {1705.00106:Attachments/1705.00106.pdf:application/pdf} } @@ -44,7 +44,7 @@ Natural Language Processing}, author = {Lupe Hernandez and Sam Randall, Ahmad Nazeri}, url = {http://cs230.stanford.edu/projects_fall_2020/reports/55771015.pdf}, - urldate = {29/05/2023}, + urldate = {2023-05-29}, year = {2020}, file = {55771015:Attachments/55771015.pdf:application/pdf} } @@ -71,7 +71,6 @@ abstract = {EMNLP2016 2016}, author = {{Pranav Rajpurkar} and {Jian Zhang} and {Konstantin Lopyrev} and {Percy Liang}}, title = {SQuAD: 100,000+ Questions for Machine Comprehension of Text}, - url = {https://aclanthology.org/D16-1264.pdf}, urldate = {29/05/2023}, year = 2016, file = {100,000 Questions for Machine Comprehension of Text:Attachments/100,000 Questions for Machine Comprehension of Text.pdf:application/pdf} @@ -204,8 +203,7 @@ author = {Paszke, Adam and Gross, Sam and Massa, Francisco and Lerer, Adam and Bradbury, James and Chanan, Gregory and Killeen, Trevor and Lin, Zeming and Gimelshein, Natalia and Antiga, Luca and Desmaison, Alban and K{\"o}pf, Andreas and Yang, Edward and DeVito, Zach and Raison, Martin and Tejani, Alykhan and Chilamkurthy, Sasank and Steiner, Benoit and Fang, Lu and Bai, Junjie and Chintala, Soumith}, year = {2019}, title = {PyTorch: An Imperative Style, High-Performance Deep Learning Library}, - url = {https://arxiv.org/pdf/1912.01703.pdf}, - file = {1912.01703:Attachments/1912.01703.pdf:application/pdf} + } @@ -214,7 +212,7 @@ title = {{Classifying names with a character level RNN}}, url={https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html}, year = {2023}, - note = {Accessed on 2023-05-1} + urldate = {2023-05-01} } @book{Goodfellow-et-al-2016, @@ -223,7 +221,7 @@ publisher={MIT Press}, url={http://www.deeplearningbook.org}, year={2016}, - note={Accessed on 15-05-2023} + urldate={2023-05-15} } % This file was created with Citavi 6.15.2.0 @@ -261,7 +259,7 @@ date = {14/09/2016}, title = {Efficient softmax approximation for GPUs}, url = {https://arxiv.org/pdf/1609.04309.pdf}, - urldate = {08/02/2023}, + urldate = {2023-08-02}, year = {2016}, } @@ -292,7 +290,8 @@ @article{cauchy, title={Gradient decent}, author={Augustin-Louis Cauchy}, - year={1847} + year={1847}, + note = {Information from Wikipedia, original paper not available.} } % This file was created with Citavi 6.15.2.0 @@ -325,8 +324,7 @@ number = {7825}, pages = {357--362}, doi = {10.1038/s41586-020-2649-2}, - publisher = {Springer Science and Business Media {LLC}}, - url = {https://doi.org/10.1038/s41586-020-2649-2} + publisher = {Springer Science and Business Media {LLC}} } @@ -339,7 +337,7 @@ year = {2016}, title = {Product Classification in E-Commerce using Distributional Semantics}, url = {https://arxiv.org/pdf/1606.06083.pdf}, - urldate = {09/03/2023}, + urldate = {2023-09-03}, file = {1606.06083:Attachments/1606.06083.pdf:application/pdf} } @@ -350,9 +348,8 @@ year = {2016}, title = {Large-scale Multi-class and Hierarchical Product Categorization for an E-commerce Giant}, url = {https://aclanthology.org/C16-1051.pdf}, year ={2016}, - urldate = {31/05/2023}, + urldate = {2023-05-10}, file = {Ali Cevahir, Koji Murakami - Large-scale Multi-class and Hierarchical Product:Attachments/Ali Cevahir, Koji Murakami - Large-scale Multi-class and Hierarchical Product.pdf:application/pdf}, - note={Accessed on 01-05-2023} } @@ -378,7 +375,7 @@ year = {2016}, url = {http://www.nltk.org/book}, username = {flint63}, year = 2009, - note={Accessed on 10-05-2023} + urldate={2023-04-10} } @@ -391,7 +388,7 @@ year = {2016}, year = {2017}, title = {Attention Is All You Need}, url = {https://arxiv.org/pdf/1706.03762.pdf}, - urldate = {09/05/2023}, + urldate = {2023-09-05}, file = {1706.03762:Attachments/1706.03762.pdf:application/pdf} } @@ -416,7 +413,8 @@ year = {2016}, author = {{Jessica Howard} }, title = {Why is Product Taxonomy So Important for eCommerce}, url = {https://datacluster.com/product-taxonomy-ecommerce}, - year ={2023} + year ={2023}, + urldate={2023-09-01} } @@ -426,8 +424,8 @@ year = {2016}, abstract = {In an attempt to balance precision and recall in the search page, leading digital shops have been effectively nudging users into select category facets as early as in the type-ahead suggestions. In this work, we present SessionPath, a novel neural network model that improves facet suggestions on two counts: first, the model is able to leverage session embeddings to provide scalable personalization; second, SessionPath predicts facets by explicitly producing a probability distribution at each node in the taxonomy path. We benchmark SessionPath on two partnering shops against count-based and neural models, and show how business requirements and model behavior can be combined in a principled way.}, author = {Tagliabue, Jacopo and Yu, Bingqing and Beaulieu, Marie}, date = {26/05/2020}, + year = {2020}, title = {How to Grow a (Product) Tree: Personalized Category Suggestions for eCommerce Type-Ahead}, - url = {https://arxiv.org/pdf/2005.12781.pdf}, urldate = {21/06/2023}, file = {2005.12781:Attachments/2005.12781.pdf:application/pdf} } @@ -439,7 +437,7 @@ year = {2016}, author = {{Karmaker Santu}, Shubhra Kanti and Sondhi, Parikshit and Zhai, ChengXiang}, title = {On Application of Learning to Rank for E-Commerce Search}, url = {https://arxiv.org/pdf/1903.04263.pdf}, - urldate = {09/12/2023}, + urldate = {2023-09-12}, pages = {475--484}, publisher = {ACM}, isbn = {9781450350228}, @@ -460,13 +458,14 @@ month = {June}, abstract = {LambdaMART is the boosted tree version of LambdaRank, which is based on RankNet. RankNet, LambdaRank, and LambdaMART have proven to be very successful algorithms for solving real world ranking problems: for example an ensemble of LambdaMART rankers won Track 1 of the 2010 Yahoo! Learning To Rank Challenge. The details of these algorithms are spread across several papers and reports, and so here we give a self-contained, detailed and complete description of them.}, url = {https://www.microsoft.com/en-us/research/publication/from-ranknet-to-lambdarank-to-lambdamart-an-overview/}, number = {MSR-TR-2010-82}, +urldate={2023-05-12} } @online{ChrisMessina, author = {Chris Messina}, title = {Conversational commerce, Messaging apps bring the point of sale to you}, url = {https://medium.com/chris-messina/conversational-commerce-92e0bccfc3ff}, - urldate = {10-05-2023}, + urldate = {2023-05-10}, year = {2015} } @@ -474,7 +473,7 @@ number = {MSR-TR-2010-82}, author = {Bonnie Ma}, title = {Feature Transformation for Multiple Linear Regression in Python}, url = {https://towardsdatascience.com/feature-transformation-for-multiple-linear-regression-in-python-8648ddf070b8}, -urldate = {10-05-2023}, +urldate = {2023-05-10}, year = {2019} } @@ -484,7 +483,7 @@ urldate = {10-05-2023}, author = {Victor Zhou}, title = {Machine Learning for Beginners: An Introduction to Neural Networks}, url = {https://victorzhou.com/blog/intro-to-neural-networks/}, -urldate = {10-05-2023}, +urldate = {2023-08-05}, year = {2019} } @@ -495,3 +494,19 @@ urldate = {10-05-2023}, year = 2022, url = "probml.ai" } + + +% This file was created with Citavi 6.15.2.0 + +@misc{Goodfellow.31122016, + abstract = {This report summarizes the tutorial presented by the author at NIPS 2016 on generative adversarial networks (GANs). The tutorial describes: (1) Why generative modeling is a topic worth studying, (2) how generative models work, and how GANs compare to other generative models, (3) the details of how GANs work, (4) research frontiers in GANs, and (5) state-of-the-art image models that combine GANs with other methods. Finally, the tutorial contains three exercises for readers to complete, and the solutions to these exercises.}, + author = {Goodfellow, Ian}, + date = {31/12/2016}, + year = {2016}, + title = {NIPS 2016 Tutorial: Generative Adversarial Networks}, + url = {https://arxiv.org/pdf/1701.00160.pdf}, + urldate = {2023-09-03}, + file = {1701.00160:Attachments/1701.00160.pdf:application/pdf} +} + + diff --git a/doc/chapters/appendix.tex b/doc/chapters/appendix.tex index d443eff..e2851a3 100644 --- a/doc/chapters/appendix.tex +++ b/doc/chapters/appendix.tex @@ -8,7 +8,14 @@ \section{List of Abbreviations} \input{preliminary/acronyms} \section{Appendix A} +For this project, python client elasticsearch 6.8.2 is installed as the client needs to be compatible with Elastic search version being used. The official Python client provides mapping with Elasticsearch REST APIs. +\begin{lstlisting}[language=Python,caption={Elastic search},label={code:es_search}] + resp=self.es.search("english-name-category",{"_source":["id","name","category"], + 'from':_from, + 'size' :_size , + "query": {"match_all": {}}}) + \end{lstlisting} % Content for Appendix A goes here... \section{Appendix B} diff --git a/doc/chapters/building-kg.tex b/doc/chapters/building-kg.tex index eb3a7f4..f4f096b 100644 --- a/doc/chapters/building-kg.tex +++ b/doc/chapters/building-kg.tex @@ -21,52 +21,32 @@ Figure \ref{fig:kg} illustrates the processing of plain text from various source \section{Fetching text corpus} -One of the first things required for \acf*{nlp} tasks is a creating a text corpus. -In linguistics and \acs{nlp}, corpus refers to a collection of texts. An intriguing application of knowledge graphs within the e-commerce industry involves the creation of a comprehensive information network concerning products. Such a knowledge graph can serve as the basis for chatbots to provide answers to user queries. Converting unstructured text corpus into a directed acyclic graph. Knowledge base serve as a foundation for chatbot applications to traverse through the graph -structure, locate relevant leafs nodes, and formulate human-readable response. - - -Wikipedia\footnote{https://www.wikipedia.org/} is primarily an encyclopedia with the additional benefit of heavy linking between articles and without the size constraints of paper articles \parencite{TorstenZesch}. - -\section{spaCy - Dependency Parsing} \label{dependencyparsing} - -spaCy \parencite{spacy2} features neural models for parsing and entity recognition. These models can be trained for \acf{ner} , tagging and parsing. Its official page on usage\footnote {https://v2.spacy.io/usage/} provides in-depth code example for information extraction. - -In figure \ref{fig:dp}, we see a complex sentence's dependency parsing. It has a \acf{nsubj}, connecting \acfp{pobj} with \acfp{adp} and no \acf{dobj}. - -\begin{figure}[htp!] - \centering - \includesvg[scale=0.16]{dependency-parser.svg} - \caption{Navigating the parse tree and subtrees} - \label{fig:dp} -\end{figure} - -The \acs{nsubj} "oil", itself does not give a complete meaning. However, upon combining its dependency noun "Motor", which is "Motor oil" gives us an understanding of the topic. Traversing from \acs{nsubj} to \acfp{conj} provides us with three related compound nouns belonging to a similar group. - -"Motor oil", "Engine Oil", "Engine Lubricant" - -Traversing further right of the dependency tree we can extract the \acsp{pobj}. An \acf{amod} "internal" is connecting compound noun "combustion engine". +An intriguing application of knowledge graphs within the e-commerce industry involves the creation of a comprehensive information network concerning products. Such a knowledge graph can serve as the basis for chatbots to provide answers to user queries. Converting unstructured text corpus into a directed acyclic graph. Knowledge base serve as a foundation for chatbot applications to traverse through the graph structure, locate relevant leafs nodes, and formulate human-readable response. Wikipedia\footnote{https://www.wikipedia.org/} is primarily an encyclopedia with the additional benefit of heavy linking between articles and without the size constraints of paper articles \parencite{TorstenZesch}. \section{Knowledge graph with Networkx} The directed graphs created with Networkx \parencite{hagberg2008exploring} is suitable for representing dependency parsing of a sentence mentioned in section \ref{dependencyparsing}. A knowledge base are represented as triples of \acf{SRO}. In which the subject and object are nodes are entities of a graph and relation are directed edges or links between the nodes. -\subsection{What to use as nodes n(x) and edges e(y)?} +\subsection*{What to use as nodes n(x) and edges e(y)?} -In table \ref{table:1}, distingution of triples by \acs{POS} tags is depicted. -\begin{table}[h!] -\begin{center} -\begin{tabular}{>{$}l<{$} l} +In table \ref{table:SRO}, triples by \acs{POS} tags is depicted. -triples & \acf{POS} tags \\ -\hline -n(subject) & \acs{nsubj} , \acs{pron} \\ -n(object) & \acs{dobj} , \acs{pobj} \\ -e(relation) & \acs{adp}, verb -\end{tabular} -\end{center} -\caption{\acs{SRO} and \acs{POS} tags mappings} -\label{table:1} + +\begin{table}[h] + \centering + \caption{\acs{SRO} and \acs{POS} tags mappings} + \label{table:SRO} + \begin{tabular}{ ll } + \toprule + + \textbf{tripples}& \textbf{ \acf{POS} tags} \\ + \midrule + n(subject)& \acs{nsubj} , \acs{pron} \\ + n(object) & \acs{dobj} , \acs{pobj} \\ + e(relationship) &\acs{adp}, verb \\ + + \bottomrule + \end{tabular} \end{table} \section{Summary} diff --git a/doc/chapters/conclusion.tex b/doc/chapters/conclusion.tex index 5e895fd..2319652 100644 --- a/doc/chapters/conclusion.tex +++ b/doc/chapters/conclusion.tex @@ -1,34 +1,44 @@ -\chapter{Conclusion outlook} +\chapter{Conclusion and Outlook} + +\section{Answer to Research Questions} \begin{enumerate}[label=\textbf{RQ\arabic*:}] \item What are the use cases in which natural language processing and machine learning model can be utilized in an E-Commerce industry? - Machine learning model can generate well-defined product taxonomy. Author introduces a methodology for such a model section \ref{sec:ideate}. A well-defined product taxonomy is the foundation for many use cases as below in artificial intelligence in an E-commerce industry. - \begin{itemize} - \item User transaction history based product recommendation system. - \item Auto completing the search bar. + Machine learning model can generate well-defined product taxonomy. Author introduces a methodology for such a model in section \ref{sec:ideate}. A well-defined product taxonomy is the foundation for many use cases like the ones listed below: + \begin{itemize} + \item Product recommendation system. + + The machine learning model can classify and recommend products from the wide range of products to the customer based on the customer's transaction history. The transaction history containing product relevance feedback such as click ``clicks'', ``cart-adds'', ``orders'', ``revenue'' \parencite{KarmakerSantu.2017} are usable if the taxonomy is well-defined. + + \item Search bar autocompletion. + + A lot of research has been conducted in the field of user experience in terms of product search. A facet in user interface is an extended drop down menu with filtered result set. \parencite{Tagliabue.26052020} proposes a real time personalized catalog generation by combining customer search logs and in-session data. + + \item Customer conversational shopping. + + \Parencite{ChrisMessina} states that gradually traditional commerce will shift towards conversational commerce. An experience of shopping on the go or hands-free assistance could be trending. Major Ecommerce industries offering voice assistance devices includes feature of buying products on voice command. + + \item Building a knowledge graph based on the textual details of a product. Refer section \ref{sec:building-kg} \item Virtual customer support chatbot may leverage the knowledge graph to answer queries raised by customers. \end{itemize} \item For a product classification task, how to define product features as an input for machine learning model? - Based on the level of product taxonomy the number of features may vary. Table \ref{table:feature_decription} lists some features listed simply by prior knowledge of the product. However, section \ref{sec:feature-selection} describes various methods to determine the feature. + Based on the level of product taxonomy the number of features may vary. Table \ref{table:feature_decription} lists some features are listed simply by prior knowledge of the product domain. However, section \ref{sec:feature-selection} describes various methods to reduce dimensionality. \item How does a machine learn pattern in product features for classification? - - In section \ref{sec:softmax}, gives description of valid probability distribution and its relevance in classification problem. \begin{enumerate}[label=\textbf{SRQ\arabic*:}] \item What are the mathematical equations behind the learning process? - Section \ref{sec:forward-propagation} describes the forward propagation of the \acf*{RNN} and role of hidden states of a neural network is shown. This section describes how \acs{RNN} works? - + Author has dedicated Chapter \ref{ch:math-behid} for step by step illustration of learning process. Author begins the chapter with basic mathematical representation of a neural network, followed by equations for feedforward, back-propagation. Further, author describes the probability distribution and its relation with the project in this paper. What is the role of partial derivatives to reduce the loss function is described. \item What are the mathematical reasons for applying certain pytorch functions during the training process? - Section \ref{sec:Logsoft} describes the reasons to use logarithmic values. This research enables author to understand the mathematical reasons behind using Pytorch's functions such as LogSoftMax. + Section \ref{sec:Logsoft} describes mathematical reasons behind using Pytorch's functions such as LogSoftMax. Chapter \ref{ch:math-behid} is detailed with the explanation of applying log to a value. \end{enumerate} @@ -38,5 +48,26 @@ \end{enumerate} + \section{Future scope} - \ No newline at end of file + In this paper, author has researched on the machine learning task to text based classification. Research has been conducted on use cases of text based classification in E-Commerce. Author limited the research surrounding basic understanding of neural network, its mathematical equations, creating a model which predicts product taxonomy. This paper is also a guide for individual who seek basic understanding of machine learning as well as overview of product taxonomy and its importance in E-commerce. + + There is a scope of research on image classification and its use cases in the E-commerce industry. Images are vital component of an E-commerce website. There is saying ``A picture is worth a thousand words''. The product image itself has so much information to be tapped. + + \begin{itemize} + \item Image captioning. + + Generating text based on image, describing its features such as color. + + \item Image based categorization. + + A Machine learning model can generate product taxonomy based on the image of the product. Clustering the products based on the image could also enable to define a better product taxonomy. + + \item Image to image translation. + + Using \acfp{GAN} \parencite{Goodfellow.31122016}, a sketch can be converted to photorealistic image. + + + + + \end{itemize} \ No newline at end of file diff --git a/doc/chapters/data-preprocessing.tex b/doc/chapters/data-preprocessing.tex index 22223ab..152c1f7 100644 --- a/doc/chapters/data-preprocessing.tex +++ b/doc/chapters/data-preprocessing.tex @@ -90,15 +90,8 @@ In this example, the lowest level of category is ``thermostat'' as level 4 and l \end{table} \subsection {Fetch Existing Product Taxonomy (Corpus) using Elasticsearch} -Elastic search \footnote{https://www.elastic.co/} is a fast and scalable search and analytics engine. It can build a powerful AI and machine learning enabled search experience. In this paper, author fetches labeled dataset of products to serve as the training data for the machine learning model. -For this project, python client elasticsearch 6.8.2 is installed as the client needs to be compatible with Elastic search version being used. The official Python client provides mapping with Elasticsearch REST APIs. +Elastic search \footnote{https://www.elastic.co/} is a fast and scalable search and analytics engine. It can build a powerful AI and machine learning enabled search experience. In this paper, author fetches labeled dataset of products to serve as the training data for the machine learning. -\begin{lstlisting}[language=Python] -resp=self.es.search("english-name-category",{"_source":["id","name","category"], -'from':_from, -'size' :_size , -"query": {"match_all": {}}}) -\end{lstlisting} The above code fetches indexed product name and its lowest hierarchy level category. \begin{table}[h] @@ -142,40 +135,40 @@ In table \ref{table:TN}, displays the difference in text before and after normal \subsection{Lower Case Conversion} -Using Pandas - vectorized string method, a text can be lower cased across the document. These methos exclude the missing / NA values automatically \parencite{mckinney-proc-scipy-2010}. +Using Pandas - vectorized string method, a text can be lower cased across the document. These methos exclude the missing / NA values automatically \parencite{mckinney-proc-scipy-2010}, shown in code \ref{code:pvsm}. -\begin{lstlisting}[language=Python, caption={Pandas vectorized string method }] +\begin{lstlisting}[language=Python, caption={Pandas vectorized string method },label={code:pvsm}] df_de["name"]= df_de["name"].str.lower() \end{lstlisting} \subsection{HTML Parsing} -Probability of getting html tags in a document increases if the source of document is from web scraping or also if the document from database source has inline html tags. In such case, fetching normal texts from a html text is required. One of the method would be to use regular expressions to get text in between angel brackets \textless \textgreater text \textless \textgreater. However, this method would require to have the tags to be well formed. -\begin{lstlisting}[language=Python, caption={Regular expression to get text from html}] +Probability of getting HTML tags in a document increases if the source of document is from web scraping or also if the document from database source has inline HTML tags. In such case, fetching normal texts from an HTML text is required. One of the method would be to use regular expressions to get text in between angel brackets \textless \textgreater text \textless \textgreater, as in code \ref{cd:html}. However, this method would require to have the tags to be well-formed. +\begin{lstlisting}[language=Python, caption={Regular expression to get text from html},label={cd:html}] text = re.sub('<[^>]*>', '', text) \end{lstlisting} -The better option would be to use Beautiful Soup \footnote{https://www.crummy.com/software/BeautifulSoup/bs4/doc/} a Python library for pulling data out of HTLM and XML. -\begin{lstlisting}[language=Python, caption={Beautiful soap API to get text from html}] +The better option would be to use Beautiful Soup \footnote{https://www.crummy.com/software/BeautifulSoup/bs4/doc/} a Python library for pulling data out of HTLM and XML, using code \ref{cd:bs}. +\begin{lstlisting}[language=Python, caption={Beautiful soap API to get text from html},label={cd:bs}] # Remove html tags soup = BeautifulSoup(doc, 'html.parser') text =soup.get_text() \end{lstlisting} \subsection{Cleaning Text} -A product detail text may contain non-word characters represented in regular expression as \textbackslash W. It may also contain space separated decimals describing the dimensional values of the product such as weight, height. Regular expressions could be used for removing the non-character words and spaces between the decimal values. +A product detail text may contain non-word characters represented in regular expression as \textbackslash W. It may also contain space separated decimals describing the dimensional values of the product such as weight, height. Regular expressions could be used for removing the non-character words and spaces between the decimal values, using code \ref{cd:ct}. -\begin{lstlisting}[language=Python,,caption={Clean text with Regular expression}] +\begin{lstlisting}[language=Python,,caption={Clean text with Regular expression},label={cd:ct}] text = (re.sub('[-\W]+', ' ', text)) text = (re.sub('(?<=\d) (?=\d)', '', text)) \end{lstlisting} \subsection{Normal form D - Unicode database} -A product name in Deutsch language may contain umlaute characters such as \"A. Pythons unicodedata \footnote{https://docs.python.org/3/library/unicodedata.html} module provides access to the Unicode Character Database (UCD) which defines the character properties for all Unicode characters. To change \"A to A, the Normal form D (NFD) should be applied which translated each character into its decomposed form. Further the text can be refined with the general category assigned to the character as string. Nonspacing mark characters \footnote{https://www.compart.com/en/unicode/category/Mn} are represented as "Mn". These characters could be removed by referring the character category. -\begin{lstlisting}[language=Python ,caption={NFD normalization}] +A product name in Deutsch language may contain umlaute characters such as \"A. Pythons unicodedata \footnote{https://docs.python.org/3/library/unicodedata.html} module provides access to the Unicode Character Database (UCD) which defines the character properties for all Unicode characters. To change \"A to A, the Normal form D (NFD) should be applied which translated each character into its decomposed form. Further the text can be refined with the general category assigned to the character as string. Nonspacing mark characters \footnote{https://www.compart.com/en/unicode/category/Mn} are represented as ``Mn''. These characters could be removed by referring the character category as shown in code \ref{cd:nd}. +\begin{lstlisting}[language=Python ,caption={NFD normalization},label={cd:nd}] ''.join( c for c in unicodedata.normalize('NFD', text) if unicodedata.category(c) != 'Mn') @@ -252,9 +245,9 @@ In an iterated round-robin fashion, at every step a missing feature column \tex \subsection{Mode imputation} -Replacing the most frequent categorical value in a column is known as mode imputation. Pandas.DataFrame.mode \parencite{mckinney-proc-scipy-2010} function returns most often value. Code snippet will fill the missing values for each column using its own most frequent value. +Replacing the most frequent categorical value in a column is known as mode imputation. Pandas.DataFrame.mode \parencite{mckinney-proc-scipy-2010} function returns most often value. Code snippet \ref{cd:ml} will fill the missing values for each column using its own most frequent value. -\begin{lstlisting}[language=Python, caption={Pandas DataFrames mode function}] +\begin{lstlisting}[language=Python, caption={Pandas DataFrames mode function},label={cd:ml}] df = df.fillna(df.mode().iloc[0]) \end{lstlisting} @@ -279,9 +272,9 @@ The most common distance metrics functions are:- sklearn.neighbors.KNeighborsClassifier \parencite{scikit-learn} does an instance-based learning, it does not construct a model, but stores instance of training data. Classification is computed from majority vote of nearest neighbors of each point. -The \textit{k}-neighbors classification implements learning based on \textit{k} nearest neighbors of each query point, where \textit{k} is integer value specified by user. The optimal \textit{k} value can be evaluated by iterating the classifier with different \textit{n\textunderscore neighbors} parameter and finding the minimum value of error rate. As per \parencite{scikit-learn}, larger \textit{k} suppresses the effects of noise, but makes the classification boundaries less distinct. +The \textit{k}-neighbors classification implements learning based on \textit{k} nearest neighbors of each query point, where \textit{k} is integer value specified by user. The optimal \textit{k} value can be evaluated by iterating the classifier with different \textit{n\textunderscore neighbors} Parameter and finding the minimum value of error rate, refer code \ref{cd:kn}. Larger \textit{k} suppresses the effects of noise, but makes the classification boundaries less distinct. -\begin{lstlisting}[language=Python, caption={Find optimal \textit{k} value in \acl{KNN} }] +\begin{lstlisting}[language=Python, caption={Find optimal \textit{k} value in \acl{KNN} },label={cd:kn}] error_rate = [] for i in range(1,40): knn = KNeighborsClassifier(n_neighbors=i) @@ -319,16 +312,12 @@ As per the example category hierarchy in table \ref{table:KNN_implementation} \end{table} -\begin{itemize} - \item Collect independent data features into the X data frame and target field into a y data frame. - \item Split data into training and testing. - \item Import the classifier model from sklearn library and fit the model with \textit{k} value equal to the optimal value. -\end{itemize} - -\begin{lstlisting}[language=Python] +\begin{lstlisting}[language=Python,caption={Finding k-nearest neighbor},label={cd:fkn}] + from sklearn import preprocessing + X = df.drop(['catL3'], axis = 1) y = df['catL3'] - from sklearn import preprocessing + X = preprocessing.StandardScaler().fit(X).transform(X.astype(float)) from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.2, random_state=4) @@ -342,25 +331,33 @@ As per the example category hierarchy in table \ref{table:KNN_implementation} \end{lstlisting} +Code snippet \ref{cd:fkn} performs the following tasks: + +\begin{itemize} + \item Collect independent data features into the X data frame and target field into a y data frame. + \item Split data into training and testing. + \item Import the classifier model from sklearn library and fit the model with \textit{k} value equal to the optimal value. +\end{itemize} + + + \subsection{Mean/median imputation} -Pandas.DataFrame.median \parencite{mckinney-proc-scipy-2010} returns the median value. These can be applied to the features represented in numerical value. In reference to table \ref{table:feature_imputation}, \textit{price} could be a column on which median value can be filled. However, using median to fill missing value could underestimate or overestimate the value. +Pandas.DataFrame.median \parencite{mckinney-proc-scipy-2010} returns the median value, refer code \ref{cd:mim}. These can be applied to the features represented in numerical value. In reference to table \ref{table:feature_imputation}, \textit{price} could be a column on which median value can be filled. However, using median to fill missing value could underestimate or overestimate the value. \begin{enumerate} \item Median - The mid point value \item Mean - The average value \end{enumerate} -\begin{lstlisting}[language=Python] +\begin{lstlisting}[language=Python,caption={Mean imputation},label={cd:mim}] df = df.fillna(df.median().iloc[0]) \end{lstlisting} \section{Log transformation of data} -Log transformation is a mathematical operation applied on data to change its scale and to reduce its skewness and to make data more symmetric. Skewness is a measure of the asymmetry of a distribution, and a right-skewed distribution has a long tail on the right side of the distribution \parencite{BonnieMa}. - -The numpy library provides natural logarithmic function to apply log transformation on array of data. +Log transformation is a mathematical operation applied on data to change its scale and to reduce its skewness and to make data more symmetric. Skewness is a measure of the asymmetry of a distribution, and a right-skewed distribution has a long tail on the right side of the distribution \parencite{BonnieMa}. The Numpy library provides natural logarithmic function to apply log transformation on array of data. \section{Feature extraction} \label{ch:feature-extraction} @@ -370,9 +367,7 @@ Transforming text or image data into numerical representation usable for machine \subsection{Count Tokenization} Tokenization is splitting the text in sequential words which can be embedded in a vector space. -For example, the normalized product name ``abc joint kit drive shaft'' can be tokenized into ``abc'',``joint'',``kit'',``drive'',``shaft''. - -Number of occurrence of each token in a document is called counting in terms of numerical feature extraction. +For example, the normalized product name ``abc joint kit drive shaft'' can be tokenized into ``abc'',``joint'',``kit'',``drive'',``shaft''. Number of occurrence of each token in a document is called counting in terms of numerical feature extraction. \subsection{Count Vectorization or One-Hot encoding} \label{ch_countvector} @@ -423,25 +418,26 @@ The length of the vocabulary is the number of unique tokens in the data frame co Count Vectorization can also be performed on range of grams of words. -\begin{lstlisting}[language=Python,label=ngramcode, caption={\textit{n-gram} vectorization}] +\begin{lstlisting}[language=Python,label=ngramcode, caption={\textit{n-gram} vectorization},label={cd:cv}] bigram_vectorizer = CountVectorizer(ngram_range=(1, 2)) bigram_vectorizer.fit(df["ProductName"]) \end{lstlisting} -The code in listing \ref{ngramcode}, will add additional vocabularies of two words such as "drive shaft". This enables to preserve local ordering information. +The code in listing \ref{cd:cv}, will add additional vocabularies of two words such as "drive shaft". This enables to preserve local ordering information. \subsection{Pickling the Vectorizer} \label{pickle_vector} -Pickle \footnote{https://docs.python.org/3/library/pickle.html} module creates a portable serialized representation of python object. Reusing the CountVectorizer object once it has been fit with the document can be enabled by Pickle module. +Pickle \footnote{https://docs.python.org/3/library/pickle.html} module creates a portable serialized representation of python object. Reusing the CountVectorizer object once it has been fit with the document can be enabled by Pickle module, refer code \ref{cd:pv}. -\begin{lstlisting}[language=Python,label=pickle, caption={Pickle vectorization}] +\begin{lstlisting}[language=Python,label=pickle, caption={Pickle vectorization},label={cd:pv}] pickle.dump(self.vectorizer, open("vector.pickel", "wb")) \end{lstlisting} The memory use will grow as the vocabulary in the text corpus grows. Pickling and un-pickling of vectorizer will slow for large vocabulary. This issue can be tackled by hashing the features. +\clearpage \section{Summary} In this chapter, search analytic engine named Elastic search is introduced. The author as a prototype of classification model choose to include only two-dimensionality. One is the feature (product name) and other is the label to be predicted (category.) diff --git a/doc/chapters/introduction.tex b/doc/chapters/introduction.tex index e61191d..1c27ee4 100644 --- a/doc/chapters/introduction.tex +++ b/doc/chapters/introduction.tex @@ -2,9 +2,9 @@ \section{Background and context} -While working at an e-commerce industry, specializing in sales of automobile parts, author realized that manufactures and suppliers of similar automobile parts often utilize different product taxonomies. Product taxonomy is hierarchical multi level categorization of the product. Suppliers rely on online platforms to reach out to the customers. In the business context, the term "supplier" encompasses entity contributing to production and distribution of goods and services. Therefore, in this thesis, the term "supplier" include both manufactures or any source which provides information on the product for sale. Suppliers are business partners who provide the stocks of products along with associated product details. +While working at an e-commerce industry, specializing in sales of automobile parts, author realized that manufactures and suppliers of similar automobile parts often utilize different product taxonomies. Product taxonomy is hierarchical multi level categorization of the product. Suppliers rely on online platforms to reach out to the customers. In the business context, the term ``supplier'' encompasses entity contributing to production and distribution of goods and services. Therefore, in this thesis, the term ``supplier'' include both manufactures or any source which provides information on the product for sale. Suppliers are business partners who provide the stocks of products along with associated product details. -However, due to inconsistencies in the product taxonomies among various suppliers, directly importing these product taxonomies into the online platform is not feasible. The inconsistency could be due to use of different vocabulary for the similar product. For example, supplier A may use the term "Motor oil" and supplier B may use the term "Engine oil" for the same product. The process of product deployment is as following: suppliers furnish the product details, online retailers update the product taxonomies with their specific vocabulary. Once the taxonomies are updated these products details are accessible for the customers. +However, due to inconsistencies in the product taxonomies among various suppliers, directly importing these product taxonomies into the online platform is not feasible. The inconsistency could be due to use of different vocabulary for the similar product. For example, supplier A may use the term ``Motor oil'' and supplier B may use the term ``Engine oil'' for the same product. The process of product deployment is as following: suppliers furnish the product details, online retailers update the product taxonomies with their specific vocabulary. Once the taxonomies are updated these products details are accessible for the customers. Defining the product taxonomy is a prior and crucial task of product deployment. A well-defined product taxonomy enables customers to search the product with the fewest possible clicks. Manually defining the product taxonomies requires a significant amount of time and are prone to human error. @@ -20,18 +20,27 @@ The e-commerce industry is growing substantially, and wide range of products bei \begin{enumerate}[label=\textbf{RQ\arabic*:}] \item What are the use cases in which natural language processing and machine learning model can be utilized in an E-Commerce industry? - \item What are the use cases in E-commerce industry akin to classification problem? - \item For product categorization, how to define product features as an input for machine learning model? - \item How does a machine learn patterns for classification? - \begin{enumerate}[label=\textbf{SRQ\arabic*:}] - \item What are the mathematical equations behind the machine learning process? - \item What are the mathematical reasons for applying a certain Pytorch function during the training process? - \end{enumerate} + + + \item For a product classification task, how to define product features as an input for machine learning model? + + \item How does a machine learn pattern in product features for classification? + - \item What algorithm could be used to train the machine learning model to predict the product taxonomy? - \item Which are the tasks indirectly dependent on a well-defined product taxonomies? - \item What are the future research areas around the created product category prediction model? -\end{enumerate} + \begin{enumerate}[label=\textbf{SRQ\arabic*:}] + \item What are the mathematical equations behind the learning process? + + + \item What are the mathematical reasons for applying certain pytorch functions during the training process? + + + + \end{enumerate} + + \item What is the algorithm to train the machine learning model to predict the product taxonomy? + + + \end{enumerate} \section{Methodology} @@ -43,28 +52,30 @@ Developing a machine learning model to predict the multi level product categorie % The labelled training data set belongs to an E-commerce industry specializing in automotive parts \footnote{\url{www.retromotion.com}; Accessed on : 05-09-2023}. In this project, supervised classification model is developed using the pair of feature set and label. These data from various suppliers will be processed and stored into search analytic engine-Elastic search. \subsection{Ideate: Vocabulary pattern} -Initial approach of finding a solution to product categorization is to analyze already existing solution to a different type of classification problem. For example, \parencite{sean} demonstrates the working of character level RNN. In which, the pattern of series of characters forming a name of a person are classified to predict which language the name belongs to. Analyzing this example author created a vocabulary level RNN to predict the lowest level of category based on the pattern of product name. +Initial approach of finding a solution to product categorization is to analyze already existing solution to a different type of classification problem. For example, \parencite{sean} demonstrates the working of character level RNN. In which, the pattern of series of characters forming a name of a person are classified to predict which language the name belongs to. Analyzing this example author created a vocabulary level RNN to predict the lowest level of category based on the pattern of product name. In this thesis, author has recognized the complexity of task and has opted to base prediction solely on the product feature pattern. Analyzing the confusion matrix of predicted vs actual category will provide a visual evaluation of the model. The result of the model for all the existing data of product will be stored in search analytic engine Elastic search in order to manually check the falsely predicted category. Machine learning model to text classification for predicting the product taxonomy is a methodology in which a lot of research have been conducted. \cite{AliCevahir.} implements classification model at every level using the \acl*{KNN} classifier. Like wise \parencite{Gupta.20062016} proposes a distributional semantics representation for predicting the product taxonomies. Some classifying methods are supervised classification, decision trees, naive Bayes classifier and max entropy classifiers \parencite{BirdKleinLoper09} -\subsection{Classification model evaluation} +\subsection{Do the math.} -In this thesis, author has recognized the complexity of task and has opted to base prediction solely on the product feature pattern. Analyzing the confusion matrix of predicted vs actual category will provide a visual evaluation of the model. The result of the model for all the existing data of product will be stored in search analytic engine Elastic search in order to manually check the falsely predicted category. +In this paper, author researches on the relevance of the mathematical concept with respect to the machine learning process. Understanding the math behind reducing the loss for prediction enables to completely understand the algorithms. Especially the training algorithm applies the activation functions. Author describes the theoretical knowledge with reasoning to apply these activation functions. + +\clearpage \section{Structure of the Thesis} -In the first chapter, gives the introduction of the thesis along with research questions and methodology. +In the first chapter, author introduces the domain of research,the importance of the research, research questions and methodology. -In the second chapter, defining or selecting the features from a document is described. It introduces various analytic engine tools and methods for feature selection. +The second chapter indulges the reader to understand the basics of machine learning and product taxonomy before diving into the implementation. -The third chapter describes various methods to standardize the text data and preprocess it before making it as an input to the classification model. +In the third chapter, defining or selecting the features from a document is described. It introduces various analytic engine tools and methods for feature selection. It describes various methods to standardize the text data and preprocess it before making it as an input to the classification model. The chapter focuses on retaining the missing textual data from the dataset from which the classification model will be predicting the product category. The chapter is a guideline on vectoring or transforming the text into machine usable numerical form called feature extraction. -The fourth chapter focuses on retaining the missing textual data from the dataset from which the classification model will be predicting the product category. +In the fourth chapter, how author classifies the product by representing the features of the product into vector of entire vocabulary of dataset is depicted. The architecture of neural network used for the prediction is described in this chapter. Mathematical equations on probability distribution, Softmax and why to apply log to softmax is formulated. -The fifth chapter is a guideline on vectoring or transforming the text into machine usable numerical form called feature extraction. +In the fifth chapter, the author describes the classification models training process. The experimentation and analysis of model with different parameters are conducted. This chapter also describes the python code related to back propagation. Experimentation with learning rate parameter of the model is conducted. -In the sixth chapter, how author classifies the product by representing the features of the product into vector of entire vocabulary of dataset is depicted. The architecture of neural network used for the prediction is described in this chapter. Mathematical equations on probability distribution, Softmax and why to apply log to softmax is formulated. +The sixth chapter, is research on mathematical relationship between a basic neural network and its functions such as feedforward and back propagation. This chapter has a detailed description of the machine learning process. Mathematical concepts such as partial derivatives, \acl{MSE}, log of a value, probability distribution is described in this chapter. It also describes \acl{RNN} and its mathematical equation. -In the seventh chapter, the model is trained to classification. The experimentation and analysis of model with different approaches and varying model parameters is conducted. +The seventh chapter, describes the application of natural language processing into developing knowledge graph. -The eight chapter, is research on creating a knowledge graph with natural language processing. \ No newline at end of file +The final chapter, concludes the thesis along with research questions and future scope of research. Author also describes the research boundaries chosen for this thesis. \ No newline at end of file diff --git a/doc/chapters/math-behind.tex b/doc/chapters/math-behind.tex index 6089e50..f3d8a06 100644 --- a/doc/chapters/math-behind.tex +++ b/doc/chapters/math-behind.tex @@ -1,4 +1,4 @@ -\chapter{Mathematical Foundations of Classification Model} +\chapter{Mathematical Foundations of Classification Model} \label{ch:math-behid} \section{Neural Networks and Loss Minimization} diff --git a/doc/chapters/model-selection.tex b/doc/chapters/model-selection.tex index b085417..a3dc9cb 100644 --- a/doc/chapters/model-selection.tex +++ b/doc/chapters/model-selection.tex @@ -42,7 +42,7 @@ Inspired from the character level \acs{RNN} mentioned in section \ref{sec:chRNN} \subsection{Convert product name to tensors} \label{nametotensor} -\begin{lstlisting}[language=Python,label=productnametotensor, caption={Convert product name to tensors}] +\begin{lstlisting}[language=Python,label=productnametotensor, caption={Convert product name to tensors},label={cd:pt}] def nameToTensor(self,name): vectorizer= pickle.load(open("vector.pickel", "rb")) inputSize=len(vectorizer.vocabulary_) @@ -54,9 +54,11 @@ Inspired from the character level \acs{RNN} mentioned in section \ref{sec:chRNN} return name_tensor \end{lstlisting} +Summary of code snippet \ref{cd:pt}:- + \begin{enumerate} \item vectorizer: \\ - In section \ref{pickle_vector}, using the Pickle module the vector object had been stored. The object contains the vector representation of vocabulary of product names. Code line number 2 loads the object and stores the value in vectorizer variable. + In section \ref{pickle_vector}, author describes using Pickle module to store vector object. The object contains the vector representation of vocabulary of product names. Code line number 2 loads the object and stores the value in vectorizer variable. \item vector size: \\ Code line number 3 gets the length of the vector vocabulary. The number of unique words in the product name across entire column of \textit{ProductName} \item transform : \\ @@ -237,6 +239,21 @@ The graphical representation of code listed in \ref{code:rnn-arch} is illustrate \item Pytorch's nn.Softmax applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range [0,1] and sum to 1. \item In this representation, \(x_i\) is the \(i\)-th element of the input vector \(\mathbf{x} = [x_1, x_2, \ldots, x_n]\). The softmax function calculates the probability of the element \(x_i\) being chosen by dividing the exponential of \(x_i\) by the sum of the exponentials of all elements in the vector \(\mathbf{x}\). This calculation ensures that the resulting probabilities sum up to 1, forming a valid probability distribution over the elements in the vector \(\mathbf{x}\). \item The softmax function transforms a vector of logits into a probability distribution, making it useful for tasks like classification, where the model needs to make a decision based on the input data. + \item Pytorch's nn.LogSoftmax function applies $\text{log}\left(\text{Softmax}(\mathbf{x})\right)$ to an n-dimentional input tensors. \\ +\end{itemize} + + + +% As per \parencite{Book-Bishop-Neural} the term softmax is used because this activation function represents a smooth version of the winner-takes-all activation model in which the unit with the largest input has output +1 while all other units have output 0. + + + +\subsection*{\acf{ALL}} + +\begin{itemize} + \item Pytorch's \parencite{Paszke.03122019} nn.AdaptiveLogSoftmaxWithLoss module implements \acf{ALL}. + \item Adaptive Softmax \parencite{Grave.14092016} is effective when large number of classes are to be handled. Traditional Softmax computation becomes computationally expensive and memory intensive if number of output classes are very high. Softmax requires calculating the exponential of the logits for each class. However, when the number of classes or labels are very high, the Softmax based classification becomes computationally expensive. + \item Adaptive Softmax counter this issue by clustering the classes according to their frequency of occurrence. A simple strategy to reduce the overall computation time is to partition the labels \(V\) into two clusters as \(V_h\) and \(V_l\), where \(V_h\) denotes the distribution consisting of the most frequent classes, and where \(V_l\) are many rare classes. The classifier frequently accesses \(V_h\), which motivates the fact that it should be computed efficiently. In contrast, \(V_l\) less frequently, and the corresponding computation can be slower. This suggests defining clusters with unbalanced cardinalities \(|V_h| \geq |V_l|\) and probabilities \(P(V_h) \geq P(V_t)\). \end{itemize} @@ -248,24 +265,6 @@ The graphical representation of code listed in \ref{code:rnn-arch} is illustrate - -% As per \parencite{Book-Bishop-Neural} the term softmax is used because this activation function represents a smooth version of the winner-takes-all activation model in which the unit with the largest input has output +1 while all other units have output 0. - - - - - -\subsection*{\acf{ALL}} - -Adaptive Softmax \parencite{Grave.14092016} is effective when large number of classes are to be handled. Traditional Softmax computation becomes computationally expensive and memory intensive if number of output classes are very high. As discussed in \ref{sec:softmax}, Softmax requires calculating the exponential of the logits for each class. However, when the number of classes or labels are very high, the Softmax based classification becomes computationally expensive. - - - -Adaptive Softmax counter this issue by clustering the classes according to their frequency of occurrence. A simple strategy to reduce the overall computation time is to partition the labels \(V\) into two clusters as \(V_h\) and \(V_l\), where \(V_h\) denotes the distribution consisting of the most frequent classes, and where \(V_l\) are many rare classes. The classifier frequently accesses \(V_h\), which motivates the fact that it should be computed efficiently. In contrast, \(V_l\) less frequently, and the corresponding computation can be slower. This suggests defining clusters with unbalanced cardinalities \(|V_h| \geq |V_l|\) and probabilities \(P(V_h) \geq P(V_t)\). - -Pytorch's \parencite{Paszke.03122019} nn.AdaptiveLogSoftmaxWithLoss module implements \acf{ALL} - - \section{Summary} In this chapter, author describes how he ideated the concept of vocabulary based RNN. This method is a modified version of character level RNN \parencite{sean}. The method of converting the product name into a tensor format is described in this chapter. diff --git a/doc/index.tex b/doc/index.tex index 670cf88..0092065 100644 --- a/doc/index.tex +++ b/doc/index.tex @@ -85,9 +85,9 @@ % {\setunit*{\addspace}% % \printtext[urldate]{\printurldate}}} -\DeclareFieldFormat{url}{Available at\addcolon\space\url{#1}} -\DeclareFieldFormat{urldate}{Accessed on\addcolon\space{#1}} - +\DeclareFieldFormat{url}{\newline Available at\addcolon\space\url{#1}} +\DeclareFieldFormat{urldate}{\newline Accessed on\addcolon\space{#1} \newline} +\DeclareFieldFormat{title}{\newline{#1}} \DeclareFieldFormat{biblabeldate}{#1} \DeclareDelimFormat{nameyeardelim}{\addcomma\space}% comma before the year % \DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\space\url{#1}} diff --git a/doc/preliminary/abstract.tex b/doc/preliminary/abstract.tex index a965412..e7d6967 100644 --- a/doc/preliminary/abstract.tex +++ b/doc/preliminary/abstract.tex @@ -12,13 +12,11 @@ Master Thesis \\ Electronic commerce started in early 1990's in which the business transactions are conducted through computer networks. The ease of buying a product online has reduced physical work and time required for decision-making by compare the product features. A wide range of products are sold online. One of the challenge is to well define a products' taxonomy. A product taxonomy is a hierarchical structure to organize the products in an E-commerce platform in such a way that customers can find the product in the fewest possible clicks. -Product taxonomy for the same product may differ based on the supplier and manufacturer (sources). Hence, product taxonomy details cannot be imported directly from the sources into the E-commerce platform. Product details cannot be live until its taxonomy is not well-defined, this delays the time of product availability for customers. +Product taxonomy for the same product may differ based on the supplier and manufacturer (sources). Hence, product taxonomy details cannot be imported directly from the sources into the E-commerce platform. Product details cannot be live on E-commerce platform until its taxonomy is well-defined, this delays the time of product availability for customers. -In this thesis the author developed a machine learning classification model to predict the product taxonomy based on the features of the product. This is achieved with machine learning model. Experimenting and analyzing by varying model's parameters facilitated to determine models performance. +In this thesis, the author developed a machine learning classification model to predict the product taxonomy based on the features of the product. Author created a prototype of predicting the leaf node level of product category. This prototype formed as a foundation to create a machine learning model to predict the complete product taxonomy. Author describes the process of reducing dimensionality, text normalization, imputation of missing text. -Initially, from the existing product taxonomy the features such as name and description were extracted. These extracted features were passed through process of text normalization, imputation of missing text to standardize it before converting it into One-Hot encoded format. These features and its lowest hierarchical level of category were processed by \acf*{RNN} machine learning model to learn the patterns of feature and classify it with the concept of probability distribution. - -The result of predicting the lowest hierarchical level of product category based only on product name formed a foundation to create a machine learning model to predict the complete product taxonomy. As the level of category to be predicted increases the model's weight and product features need to be adjusted. +In this paper, author developed a supervised \acl{RNN} for text classification. Author also describes the mathematical foundations behind the machine learning process. Author evaluates the model with confusion matrix. \end{abstract} diff --git a/doc/preliminary/acronyms.tex b/doc/preliminary/acronyms.tex index 259acc8..1104d5d 100644 --- a/doc/preliminary/acronyms.tex +++ b/doc/preliminary/acronyms.tex @@ -36,8 +36,10 @@ \acro{CLR}[CLR]{Cyclic learning rate } \acro{LTR}[LTR]{Learn to Rank } \acro{IR}[IR]{Information Retrieval } - +\acro{AI}[AI]{Artificial Intelligence } \acro{PMF}[PMF]{Probability Mass Function } \acro{MSE}[MSE]{Mean Squared Error} +\acro{GAN}[GAN]{generative adversarial network} + \end{acronym}