SQLite merupakan sebuah Relational Database Management System (RDMS) yang tidak memerlukan server untuk beroperasi. Show Bisa dibilang, SQLite adalah database portable yang bisa digunakan tanpa jaringan. Inilah yang membuatnya banyak digunakan dalam berbagai aplikasi (offline) seperti aplikasi Android, aplikasi desktop, java, VB.net, Game, dsb. Pada kesempatan ini, kita akan belajar dasar-dsar SQLite dengan menggunakan Linux. Instalasi SQLite di LinuxPertama kita perlu menginstal SQLite-nya dulu, silahkan ketik perintah berikut.
Setelah itu jawab Membuat Database SQLitePembuatan database dapat dilakukan dengan perintah Ekstensi file database SQLite menggunakan Misalkan, kita akan membuat database bernama 0.
Maka kita akan dibawa masuk ke console/shell SQLite. Membuat Tabel di SQLiteSelanjutnya kita akan membuat tabel anggota dengan Query SQL berikut ini.
Kalau tidak ada error, berarti pembuatan tabel berhasil. Mengisi Data ke TabelSekarang kita akan coba mengisi 5 data ke tabel. Silahkan ketik perintah SQL berikut di dalam shell SQLite. Balik ke SQLite3, pada python sqlite3 adalah salah satu library yang mendukung sistem database sqlite di python. Berikut perintah dasar pada sqlite3
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. 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. |