This information is in the article section of the web page

Jupyter Notebook info

Jupyter Notebook (formerly IPython Notebooks) is a web-based interactive computational environment for creating Jupyter notebook documents. The "notebook" term can colloquially make reference to many different entities, mainly the Jupyter web application, Jupyter Python web server, or Jupyter document format depending on context. A Jupyter Notebook document is a JSON document, following a versioned schema, and containing an ordered list of input/output cells which can contain code, text (using Markdown), mathematics, plots and rich media, usually ending with the ".ipynb" extension. A Jupyter Notebook can be converted to a number of open standard output formats (HTML, presentation slides, LaTeX, PDF, ReStructuredText, Markdown, Python) through "Download As" in the web interface, via the nbconvert library or "jupyter nbconvert" command line interface in a shell. To simplify visualisation of Jupyter notebook documents on the web, the nbconvert library is provided as a service through NbViewer which can take a URL to any publicly available notebook document, convert it to HTML on the fly and display it to the user. (Wikipedia)


Make certain that Anaconda is installed. The Jupyter Notebook is part of the installation along with all of Python's libraries.

Please follow the steps below in order to Install Anaconda in windows:

  1. Search Anaconda on Google. Click on the official link.
  2. Select the appropriate OS.
  3. Choose the version and bit according to your requirements.
  4. Go the download path after the download is complete.
  5. Double Click on the executable file to begin the installation process.

Reference: www.stechies.com/install-anaconda-windows/

How to Run Jupyter Notebook with Anaconda Installed.

  1. Click on Start button
  2. Select Anaconda from the programs
  3. Click on Jupyter Notebook
  4. The kernel loads first. Click on the link below to learn more about the kernel.
  5. Right after the kernel runs, Jupyter notebook is executed.
  6. Your screen should look like the image below.

Kernel definition



Your screen should look like the image above.

Roll over the image to enlarge it.

Key this code in the first box.

You may copy and paste if you wish.

Below is the file you will need.

Save it in MyPc Windows C drive and your user name.


There are number ways to test or run your code.

  • Click Run on the menu bar to run all lines of code.
  • Click the To the left of the box to run just this cell.

The output from the cell appears just below.

The first five lines of the dataset are displayed. This is called the head.

The dataset is then described. It shows the mean of both variables, the standard deviation, high and low, etc"

Click on Insert and then insert cell below to get a new cell.



You can see from the graph, that it plots an almost straight line, which means that there is a direct correlation between number of hits to the web site and the revenue that is generated.

Now we need to subdivide the data into attributes and labels. The attributes are the independent variables, the hits on the web site, and labels are the dependent variables, revenue generated.

We are trying to predict revenue based on hits.

  • X = dataset.iloc[:, :-1].values
  • Y = dataset.iloc[:, 1].values

The X variable will store the attributes, the hits.

The Y variable will store the labels, the revenue generated.

Now we need to divide our data into two sets:training and test.

The Scikit-Learn library lets us do this.

Add these nine lines to the cell we just created.

Save your work by clicking the save icon.


Now run this cell to get the intercept and the coeffient.


What this means that for every additional hit, revenue will increase by $500.

Now it is time to make predictions based on the data we preserved as the training set.

Add these lines below to a new cell in Jupyter Notebook.


The results of printing the dataframe, appear below.

Actual Predicted
0 14475 14084.136856
1 14550 14584.991413
2 10059 10077.300396
3 10550 10578.154954
4 7550 7573.027609
5 16000 16087.555086

The program selected at random six actual values from the entire list.

If you look at the actual list you will see that 14475 was number 2 on the list. Remember count starting with zero.

14475 was #2

14550 was #16

10059 was #14

1055 was #17

7500 was #5

1600 was #4

The random_state code makes it give the same results each time you execute the program.

Remove that part of the line.

Run the code for the last two cells

You should get different results each time for the actual ones selected and the predictions.

Look how close the predictions are to the actual numbers.

The algorithum did an excellent job.

Editing files using Jupyter

You can create and edit files using Jupyter Notebook.

It has the capabilities of any text editor.

It very useful when working with .csv files

Just Click on File and Open