This tutorial demonstrates using Visual Studio Code and the Microsoft Python extension with common data science libraries to explore a basic data science scenario. Specifically, using passenger data from the Titanic, you will learn how to set up a data science environment, import and clean data, create a machine learning model for predicting survival on the Titanic, and evaluate the accuracy of the generated model. Show PrerequisitesThe following installations are required for the completion of this tutorial. Make sure to install them if you haven't already.
Set up a data science environmentVisual Studio Code and the Python extension provide a great editor for data science scenarios. With native support for Jupyter notebooks combined with Anaconda, it's easy to get started. In this section, you will create a workspace for the tutorial, create an Anaconda environment with the data science modules needed for the tutorial, and create a Jupyter notebook that you'll use for creating a machine learning model.
Prepare the dataThis tutorial uses the Titanic dataset available on OpenML.org, which is obtained from Vanderbilt University's Department of Biostatistics at https://hbiostat.org/data. The Titanic data provides information about the survival of passengers on the Titanic and characteristics about the passengers such as age and ticket class. Using this data, the tutorial will establish a model for predicting whether a given passenger would have survived the sinking of the Titanic. This section shows how to load and manipulate data in your Jupyter notebook.
Train and evaluate a modelWith the dataset ready, you can now begin creating a model. For this section, you'll use the scikit-learn library (as it offers some useful helper functions) to do pre-processing of the dataset, train a classification model to determine survivability on the Titanic, and then use that model with test data to determine its accuracy.
(Optional) Use a neural networkA neural network is a model that uses weights and activation functions, modeling aspects of human neurons, to determine an outcome based on provided inputs. Unlike the machine learning algorithm you looked at previously, neural networks are a form of deep learning wherein you don't need to know an ideal algorithm for your problem set ahead of time. It can be used for many different scenarios and classification is one of them. For this section, you'll use the Keras library with TensorFlow to construct the neural network, and explore how it handles the Titanic dataset.
Next stepsNow that you're familiar with the basics of performing machine learning within Visual Studio Code, here are some other Microsoft resources and tutorials to check out. Bagaimana langkah langkah menggunakan Python?Menjalankan Python. Buka terminal CTRL + ALT + T.. Ketik python maka Anda akan masuk ke Python shell.. Tuliskan script Python Anda, contoh: print("Selamat datang di Python") . jika sudah tekan tombol ENTER , dan script Python akan dijalankan/eksekusi.. Untuk keluar dari Python shell ketik exit(). Langkah awal belajar Python?Tips Belajar Python dengan Cepat. Pahami dulu dasar bahasa pemrograman. Ada beberapa aspek penting terkait apa saja yang harus kamu pelajari dari sebuah bahasa pemrograman. ... . Kuasai Bahasa Inggris. ... . Mulai belajar sekarang. ... . 4. Coba buat program sederhana. ... . Learning by doing.. Apakah Python cocok untuk pemula?Python merupakan bahasa pemrograman yang cocok dipelajari oleh pemula.
Python bisa digunakan untuk apa saja?Python adalah bahasa pemrograman yang banyak digunakan dalam aplikasi web, pengembangan perangkat lunak, ilmu data, dan machine learning (ML). Developer menggunakan Python karena efisien dan mudah dipelajari serta dapat dijalankan di berbagai platform.
|