Background

Kitty Bear (fake name) is a teddy bear store. Their management team currently faces a challenging problem. They purchase products only base on their boss’s experience, and it is not accurate. Unsophisticated purchasing plans caused them some troubles as following.

  1. Inventory shortage

They only import teddy bears from overseas. After ordering, it will take 2 to 3 months to ship teddy bears to their stores. Thus, an ill-advised purchasing plan might cause a loss of revenue. For example, from January 2019 to May 2019, they did not have enough teddy bears to sell. …


Depth-first search is one of the oldest algorithms. The first implementation of this algorithm can trace back to Greek mythology. When Theseus entered Labyrinth to kill the monstrous Minotaur, he used a ball of string to mark all the places that he visited before and found his way out.

We can also apply this algorithm to web scraping to help us effectively gathering information. This article will introduce the basic structure of depth-first search and several challenges that we could try on Web scarping.

We will use the following sample web structure to demonstrate.


Machine Learning note: Will PLA eventually halt?

Last time, we have two unsolved questions.

  1. Will this algorithmic eventually stop?
  2. Will the equation we found(denote as g) close to the actual equation(denote as f)?

There are two premises for PLA to halt.

  1. If PLA halts, we should have some w with no mistake.
  2. Our data need to be linear-separable.

2.1

Let’s assume our data is linear separable like the first pic from the left. Does PLA always halt?
A linear separable data means that there is a perfect w that can successfully classify all the data.

2.2


Machine Learning note

We face many “Yes/no” questions, or binomial question, in our daily life. For instance, will this customer buy this car? Should the bank issue the credit card to the client? Using the perceptron learning algorithm(PLA), we can find the best way to predict the result of this type of question.

When we deal with this type of Yes/No question, many factors may affect our decision. Take the purchasing car question for example. Debt, salary, brand of car and age of the vehicle can affect consumers’ decisions. We can list those factors below.

(Buy/Not Buy score)=Debt+Salary+Brand of Car+Age of Car

Let’s…

Ray, Hsu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store