You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

The C3.ai system contains many tools to help scientists with their data analysis. We want researchers
to have the option to get started using C3 right away. This guide details how to connect to a C3 cluster,
fetch data you want to use, and convert it into a form that you can more easily analyze.

This guide serves as a starting point for your C3 journey, but does not expose most of C3's API or potential.

Connecting to a C3 Cluster

There are a couple options for connecting to the C3 Cluster:

Fetching Instances of Types

All data in C3 is represented by a 'Type'. Data for a specific type can be 'fetched' from C3 using the 'fetch' API.
In each language, each Type has a 'fetch' function to which a FetchSpec can be passed. This function then retrieves
the data in a FetchResult Type which can be opened and used for data analysis.


Data Fetching Documentations if you are:

  1. Using Browser Developing Tools: https://developer.c3.ai/docs/7.12.0/guide/guide-c3aisuite-basic/di-monitoring-and-troubleshooting
  2.  using Python Jupyter Notebook: https://developer.c3.ai/docs/7.12.0/topic/ds-jupyter-notebooks

A Code Example in Jupyter Notebook:

from c3python import get_c3 
raw_df = c3.BlockInfo.fetch(spec={
    'limit': -1,
    'filter': 'exists(prp_bf_lr)',
    'order': 'descending(id)',
    'include': 'pct_i_l,pct_t_l,prp_res_lr,pop10_ha_lr,hu10_ha_lr,eroom_ha_lr,med10_age,prp_bf_lr'
})

Converting Fetch results to usable forms in Jupyter Notebook

A Code Example in Jupyter Notebook:

## continue from above ##
import pandas as pd
df = pd.DataFrame(raw_df.objs.toJson())
df.head()
df.drop('meta', axis=1, inplace=True)
df.drop('type', axis=1, inplace=True)
df.drop('version', axis=1, inplace=True)
df.drop('id', axis=1, inplace=True)
df.head()

Users can operations like after you convert the c3 Dataset into the pandas dataframe.

Executing Metrics on Time series data

TODO:


Constructing, Training, and Scoring a Machine Learning Model:

Code example using both Python and JS: https://developer.c3.ai/docs/7.12.0/topic/mlpipe-code-examples#construct-tensorflowpipe



  • No labels