[Python] When an amateur starts machine learning

Introduction

This article is a memorandum of reference for the author, who is a beginner in programming, to promote machine learning.

I will describe information that was helpful from an amateur's point of view.

Introducing sites that were helpful for machine learning

I also want to try machine learning of trends, so I am trying from the beginning.

What is machine learning?

First, I would like to introduce a service that allows you to easily learn what machine learning is.

One, aidemy

Free membership registration is required, but you can learn an introduction to machine learning with videos. There isn't much free content, but it might be good for people who want a quick overview. There is also a beginner's course in Python, so even people who have never touched the program may find it easy to get started.

https://aidemy.net/

Second, codexa

https://www.codexa.net/ Similarly, free membership registration is required, but you can also learn essential parts for machine learning such as linear algebra and statistics for free. (It was insanely saved)

What I did to actually move my hands

I would like to input from the top and then actually make something as output.

This time, we will make a sample ** "Recommended function" **. It's also Amazon.

I referred to the following sites. It was written carefully for beginners and was very easy to understand.

https://www.codexa.net/collaborative-filtering-k-nearest-neighbor/

Introducing two things I was addicted to

If you refer to the above article, you can almost copy it, but I'm a little addicted to it, so I'll write it down.

  1. (In the first place) autocomplete-python in Atom doesn't work I used Atom as the editor to create the environment, but the autocomplete-python installed at that time did not work ... When I googled 「C:\Users\username.atom\packages\autocomplete-python\lib\jedi\parser」 It was useless if the ver of a file called grammarX.X.txt (X is a ver of python) does not match the ver of Pyhton in my environment. (There is such a post on StackOverFlow, and I referred to that.)

  2. Memory Error trap I proceeded according to the tutorial article, and although it was good at the beginning I got ** Memory Error: Unable to allocate… **

Since it handles a large amount of data, this kind of error seems to be inherent in machine learning. There are two solutions I have tried:

--use dask It seems to be a library for handling large amounts of data that does not fit in memory. It was the processing of pivot that caused the Memory Error this time. I tried and errored how to write it so that only that part was distributed and processed, but it didn't work and I gave up ... (I want someone to tell me ...)

--Manually release memory with gc.collect () It's a rudimentary thing, but it probably didn't make much sense.

--Reduce the number of data items This time I started with a tutorial-like meaning, so I quickly solved it here. Specifically, there is a process of "cutting off data with members (the number of users belonging to the anime group) of 10,000 or less", but I just gradually increased that number.

Execution result

While cheating as above, I was able to finish the tutorial for the time being. WS000005.JPG

Summary

As a starting point for machine learning, I am personally satisfied with how to use basic functions and how to consider and process data. We will continue to devote ourselves to creating something that can be used in practice.

Recommended Posts

[Python] When an amateur starts machine learning
An introduction to Python for machine learning
[Note] Python, when starting machine learning / deep learning [Links]
Build an interactive environment for machine learning in Python
An introduction to machine learning
Machine learning with Python! Preparation
Python Machine Learning Programming> Keywords
Beginning with Python machine learning
Machine learning with python (1) Overall classification
Machine learning summary by Python beginners
<For beginners> python library <For machine learning>
Python: Preprocessing in Machine Learning: Overview
"Scraping & machine learning with Python" Learning memo
Machine learning
python learning
Python & Machine Learning Study Memo: Environment Preparation
Notes on PyQ machine learning python grammar
Amplify images for machine learning with python
Use machine learning APIs A3RT from Python
Machine learning with python (2) Simple regression analysis
Note when creating an environment with python
I installed Python 3.5.1 to study machine learning
[python] Frequently used techniques in machine learning
An introduction to OpenCV for machine learning
"Python Machine Learning Programming" Summary Note (Jupyter)
Python: Preprocessing in machine learning: Data acquisition
[Shakyo] Encounter with Python for machine learning
[Python] First data analysis / machine learning (Kaggle)
[Python] Web application design for machine learning
Python and machine learning environment construction (macOS)
[Python] Saving learning results (models) in machine learning
Python: Preprocessing in machine learning: Data conversion
Python & Machine Learning Study Memo ③: Neural Network
Python & Machine Learning Study Memo ④: Machine Learning by Backpropagation
Python & Machine Learning Study Memo ⑥: Number Recognition
Build AI / machine learning environment with Python
[Definitive Edition] Building an environment for learning "machine learning" using Python on Windows
[Definitive Edition] Building an environment for learning "machine learning" using Python on Mac
[Python] Easy introduction to machine learning with python (SVM)
How to start Python (Flask) when EC2 starts
An introduction to machine learning for bot developers
[Python / Machine Learning] Why Deep Learning # 1 Perceptron Neural Network
Machine learning starting with Python Personal memorandum Part2
[Python] Learning Note 1
An amateur tried Deep Learning using Caffe (Introduction)
Python learning notes
Machine learning of sports-Analysis of J-League as an example-②
An amateur tried Deep Learning using Caffe (Practice)
python learning output
Machine learning starting with Python Personal memorandum Part1
Upgrade the Azure Machine Learning SDK for Python
[python, CPython] GC behavior when throwing an exception
Python & Machine Learning Study Memo ②: Introduction of Library
EV3 x Python Machine Learning Part 2 Linear Regression
[Python] Data analysis, machine learning practice (Kaggle) -Data preprocessing-
Python learning site
Beginning with Selenium
Beginning with PyTorch
Beginning with Python machine learning
Python learning day 4
python starts with ()
[Python] Collect images with Icrawler for machine learning [1000 images]
Python Deep Learning