Skip to content

Latest commit

 

History

History
57 lines (50 loc) · 1.93 KB

install.md

File metadata and controls

57 lines (50 loc) · 1.93 KB
<script src="../turi/js/recview.js"></script>

#Getting Started In order to install GraphLab Create, please visit the installation page on turi.com in order to

  • register for a product key, and
  • install the graphlab-create Python package.

Once installed, you will be able to read or run the example code and datasets by copying code into your terminal. Throughout the User Guide we assume you have imported the package via

import graphlab

Sometimes it is useful shorthand to use gl instead of graphlab. This can be done via

import graphlab as gl

Quick start

Here are a few commands to get started.

Task code
Importing and parsing data
url = 'https://static.turi.com/datasets/millionsong/song_data.csv'
songs = graphlab.SFrame.read_csv(url)
Visualizations
songs.show()
Computation on columns
songs['year'].mean()
Transforming columns
songs['num_words'] = songs['title'].apply(lambda x: len(x.split(' ')))
Aggregations
songs.groupby('artist_name', {'total': graphlab.aggregate.COUNT})
Create models
url = 'https://static.turi.com/datasets/regression/Housing.csv'
x = graphlab.SFrame.read_csv(url)
m = graphlab.linear_regression.create
(x, target='price')