当前位置: 首页 > 工具软件 > SFrame > 使用案例 >

SFrame安装及使用教程

韩靖琪
2023-12-01

软件链接

https://turi.com/download/install-graphlab-create.html

常见函数

import graphlab

  1. Importing and parsing data
    url=https://static.turi.com/datasets/millionsong/song_data.csv’
    songs = graphlab.SFrame.read_csv(url)
  2. Visualizations
    songs.show()
  3. Transforming columns
    songs[‘num_words’] = songs[‘title’].apply(lambda x: len(x.split(’ ‘)))
  4. Aggregations
    songs.groupby(‘artist_name’, {‘total’: graphlab.aggregate.COUNT})
  5. 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’)

原文:https://blog.csdn.net/u014471250/article/details/78311880

 类似资料: