def models(self): """ Access to create or load the various models available in sparktk (See the <a href="models/index.html">Models API</a>) Examples -------- Train an SVM model: <skip> >>> svm_model = tc.models.classification.svm.train(frame, 'label', ['data']) Train a Random Forest regression model: >>> rf = tc.models.regression.random_forest_regressor.train(frame, ... 'Class', ... ['Dim_1', 'Dim_2'], ... num_trees=1, ... impurity="variance", ... max_depth=4, ... max_bins=100) Train a KMeans clustering model: >>> km = tc.models.clustering.kmeans.train(frame, ["data"], k=3) </skip> """ return get_lazy_loader(self, "models", implicit_kwargs={'tc': self})
def frame(self): """ Access to create or load the sparktk Frames (See the <a href="frame.m.html">Frame API</a>) Example ------- >>> frame = tc.frame.create([[1, 3.14, 'blue'], [7, 1.61, 'red'], [4, 2.72, 'yellow']]) >>> frame.inspect() [#] C0 C1 C2 ===================== [0] 1 3.14 blue [1] 7 1.61 red [2] 4 2.72 yellow >>> frame2 = tc.frame.import_csv("../datasets/basic.csv") >>> frame2.inspect(5) [#] C0 C1 C2 C3 ================================ [0] 132 75.4 0 correction [1] 133 77.66 0 fitness [2] 134 71.22 1 proposal [3] 201 72.3 1 utilization [4] 202 80.1 0 commission """ return get_lazy_loader(self, "frame", implicit_kwargs={ 'tc': self }).frame # .frame to account for extra 'frame' in name vis-a-vis scala
def frame(self): """ Access to create or load the sparktk Frames (See the <a href="frame.m.html">Frame API</a>) Example ------- >>> frame = tc.frame.create([[1, 3.14, 'blue'], [7, 1.61, 'red'], [4, 2.72, 'yellow']]) >>> frame.inspect() [#] C0 C1 C2 ===================== [0] 1 3.14 blue [1] 7 1.61 red [2] 4 2.72 yellow >>> frame2 = tc.frame.import_csv("../datasets/basic.csv") >>> frame2.inspect(5) [#] C0 C1 C2 C3 ================================ [0] 132 75.4 0 correction [1] 133 77.66 0 fitness [2] 134 71.22 1 proposal [3] 201 72.3 1 utilization [4] 202 80.1 0 commission """ return get_lazy_loader(self, "frame", implicit_kwargs={'tc': self}).frame # .frame to account for extra 'frame' in name vis-a-vis scala
def dicom(self): """ Access to create or load the sparktk Dicom objects (See the <a href="dicom.m.html">Dicom API</a>) Example ------- <skip> >>> d = tc.dicom.import_dcm('path/to/dicom/images/') >>> type(d) sparktk.dicom.dicom.Dicom </skip> """ return get_lazy_loader(self, "dicom", implicit_kwargs={'tc': self}).dicom # .dicom to account for extra 'dicom' in name vis-a-vis scala
def graph(self): """ Access to create or load the sparktk Graphs (See the <a href="graph.m.html">Graph API</a>) Example ------- <hide> >>> g = tc.examples.graphs.get_movie_graph() >>> g.save('sandbox/my_saved_graph') </hide> >>> g = tc.graph.load('sandbox/my_saved_graph') """ return get_lazy_loader(self, "graph", implicit_kwargs={'tc': self}).graph # .graph to account for extra 'graph' in name vis-a-vis scala
def dicom(self): """ Access to create or load the sparktk Dicom objects (See the <a href="dicom.m.html">Dicom API</a>) Example ------- <skip> >>> d = tc.dicom.import_dcm('path/to/dicom/images/') >>> type(d) sparktk.dicom.dicom.Dicom </skip> """ return get_lazy_loader(self, "dicom", implicit_kwargs={ 'tc': self }).dicom # .dicom to account for extra 'dicom' in name vis-a-vis scala
def graph(self): """ Access to create or load the sparktk Graphs (See the <a href="graph.m.html">Graph API</a>) Example ------- <hide> >>> g = tc.examples.graphs.get_movie_graph() >>> g.save('sandbox/my_saved_graph') </hide> >>> g = tc.graph.load('sandbox/my_saved_graph') """ return get_lazy_loader(self, "graph", implicit_kwargs={ 'tc': self }).graph # .graph to account for extra 'graph' in name vis-a-vis scala
def examples(self): """ Access to some example data structures Example ------- Get a small, built-in sparktk Frame object: >>> cities = tc.examples.frames.get_cities_frame() >>> cities.inspect(5) [#] rank city population_2013 population_2010 change county ========================================================================== [0] 1 Portland 609456 583776 4.40% Multnomah [1] 2 Salem 160614 154637 3.87% Marion [2] 3 Eugene 159190 156185 1.92% Lane [3] 4 Gresham 109397 105594 3.60% Multnomah [4] 5 Hillsboro 97368 91611 6.28% Washington """ return get_lazy_loader(self, "examples", implicit_kwargs={'tc': self})
def examples(self): return get_lazy_loader(self, "examples", implicit_kwargs={'tc': self})
def graph(self): return get_lazy_loader(self, "graph", implicit_kwargs={ 'tc': self }).graph # .graph to account for extra 'graph' in name vis-a-vis scala
def graph(self): return get_lazy_loader(self, "graph", implicit_kwargs={'tc': self}).graph # .graph to account for extra 'graph' in name vis-a-vis scala
def dicom(self): return get_lazy_loader(self, "dicom", implicit_kwargs={'tc': self}).dicom # .dicom to account for extra 'dicom' in name vis-a-vis scala
def models(self): """access to the various models of sparktk""" return get_lazy_loader(self, "models", implicit_kwargs={'tc': self})
def frame(self): return get_lazy_loader(self, "frame", implicit_kwargs={'tc': self}).frame # .frame to account for extra 'frame' in name vis-a-vis scala
def dicom(self): return get_lazy_loader(self, "dicom", implicit_kwargs={ 'tc': self }).dicom # .dicom to account for extra 'dicom' in name vis-a-vis scala