Version 2.2.2 brings some new changes since our last dev log.
2.0.3 is out on stores and the big change is that the article translator tool is actually somewhat usable now. Also, users receive an email on signup! Not the most exciting changes, but it's progress.
I just finished getting Version 2.0.0 on all app stores and the web. The main new feature is an "article translation" tool. It works, but as you'll see, it's pretty buggy.
Picking up an old project from earlier this year and making a few additions.
In this video, we learn how to create, manage, and remove Python Virtual Environments.
Where do we start with something as complex as scikit-learn? At the beginning, of course!
The Linear Regression module in scikit-learn provides an excellent first step into the world of machine learning. Rather than having to read a 90 page paper, we can instead make use of the knowledge that we gained in our stats class to form a model that will make some predictions for us.
If this sounds like a lot, don’t worry. We’ll briefly review the math concepts you need to know to fully understand what’s going on, and also touch on an example with real-world data that will put things in perspective.
Machine learning is fascinating, but it can be overwhelming if you're just getting started. Luckily, scikit-learn is an open-source machine learning library that allows you to jump in and gain hands-on experience immediately, harnessing the power of almost 2,000 contributors without reading a single scientific paper.
If this sounds interesting to you, read on. In this article, we're going to learn what scikit-learn is, how to install it, and how to run it using Python and Jupyter Notebooks.
Photo by Meruyert Gonullu
In 2007, David Cournapeau started a project during Google's Summer of Code that would have an impact for years to come. His project eventually morphed into scikit-learn, a collection of open-source machine learning libraries used by countless people across the globe.
Thanks to the hard work of Cournapeau, along with 1,952 other contributors (at the time of writing), we now have a library that drastically lowers the barrier of entry for learning the basics of machine learning and beginning to harness its power in our careers, or even our everyday lives.
You'll need Python installed before you can use scikit-learn. There are plenty of guides online that will tell you how to install Python, but it's a very straightforward process anyway. You can probably just go to the Python Downloads page and figure it out yourself.
Note that the instructions below are tailored to Linux users. You may need to make a few tweaks to the shell commands to get them working on Mac/Windows, but it probably won't be anything wildly different.
This step is technically optional, but it's good practice to use virtual environments based on what you're working on. This way, if you need one version of a package for one project, and a different version for another, you can just switch virtual environments instead of reinstalling everything every time you switch from working on one project to another.
If you've never created a virtual environment before, you'll want to create a folder to hold all of them. I prefer to use the
venv folder in my home directory, but feel free to change this if you' like to put them somewhere else.
This will create a new virtual environment named
sklearn. Now that you've created it, you'll need to activate it. Remember to activate your virtual environment every time you want to use scikit-learn.
Your shell should now have "
(sklearn)" at the beginning of each line in your terminal. If you want to quit the virtual environment at any point, you can just type
Installing scikit-learn is as simple as typing in a pip command:
The scikit-learn website provides a few snippets to check if everything is working as expected. Copy-and-paste the one below to try it out yourself.
You should see a lot of information printed about your
scikit-learn installation and the system you're running on. If you get a
0 as output after
echo $?, then it means the command exited successfully - you're good to go!
Almost as important as having the software installed is how will you use it? Getting your development environment situated can be the hardest part.
There are an infinite number of ways that you can customize your development environment. For our purposes today, we'll focus on (1) using Python without any extra IDEs to help us out, and (2) how to use my preferred IDE, Visual Studio Code, which has plenty of helpful extensions to make our work with scikit-learn move more smoothly.
Working with scikit-learn in pure Python is always an option. It may not be the best for learning, because the only way to explain what's happening with each line is to add comments, which can get messy. It's also up to you to figure out how to download others' code and get it running. However, knowing how to set these things up will be required if you want to integrate machine learning into a real application that others can use.
Using scikit-learn in this way doesn't require any additional software. You can open up a
test.py file in your favorite text editor,
import sklearn, and go to town! Then, just run the script with
If you're just getting started with learning or you're only interested in data analytics, then read on - the next option may be more your speed.
If you haven't tried them already, Jupyter Notebooks are an amazing way of presenting information and code. You're able to mix Markdown and interactive Python code blocks in a single document, allowing you to easily walk through code, executing a single block at a time with a clear understanding of what is happening every step of the way.
Getting started with Jupyter is as easy as typing the following:
This will install the required pip package and start a Jupyter Notebook server. This server will be accessible in your web browser, allowing you to create, view, and edit
ipynb stands for Interactive Python Notebook, which is so named because Jupyter Notebooks was previously named IPython Notebooks .
As an example, here is the output when I run
[I 16:31:31.879 NotebookApp] Serving notebooks from local directory: /home/steve [I 16:31:31.882 NotebookApp] Jupyter Notebook 6.1.4 is running at: [I 16:31:31.882 NotebookApp] http://localhost:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [I 16:31:31.883 NotebookApp] or http://127.0.0.1:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [I 16:31:31.883 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
As you can see, the server is running at
http://localhost:8888. To start using Jupyter, simply open this link in a web browser.
I'll briefly note that if you already use Visual Studio Code, there is a Jupyter Notebooks extension that you can use to edit and run
.ipynb notebooks right in your IDE. No need to leave, start a server, open a browser, any of that - it's all integrated into a single window. I guess that's why they call it an integrated development environment!
I've tried both approaches, and I find this one to be much easier. But it's up to you to choose your favorite!
With any luck, you've just installed scikit-learn (and maybe Jupyter Notebooks too). Your computer should be revved up and ready to roll with some machine learning! Stay tuned for more tutorials like this one that will build on this knowledge.
Everyone has heard of machine learning and artificial intelligence at this point, right?
There is an insane amount of buzz around ML and AI, and for good reason. The techniques available to us today allow for mind-blowing applications that would have seemed like magic just a few years ago.
I've researched all that I can across the web, and I've come up with an analogy: Machine learning is a kind of tool that we can use to make our computers do what we want. Every time you learn a new machine learning technique, you add another tool to you toolbelt.
When you have an assortment of tools at your disposal, you might try your hand at building something rather complex with them, something that requires all of those tools to work together in unison. It's likely that you'd try to build something that exhibits artificial intelligence. In this way, machine learning techniques are the tools, artificial intelligence is the house, and you are the carpenter!
Let's dive in a bit deeper and see if this analogy holds true.
About four months ago, in late November 2020, I finally took action on an ambitious plan that I've had in the back of my head for quite a while. I wanted to build a language-learning app that was just a bit different than the others I've tried.
As with any project, it seemed easy... until I got started!
I created a plan, designed the app, and implemented it as best I could. While it has fewer features than I originally thought I'd be able to get done, the ones that it does have seem to work well so far (in spite of a few bugs people found immediately after it was published).