SciPy

tethne.model.managers package

Module contents

This module provides manager classes for generating, visualizing, and analyzing models.

The following managers are presently available:

dtm.DTMModelManager Generates a DTMModel from a Corpus using Gerrish’s C++ implementation.
mallet.MALLETModelManager Generates a LDAModel from a Corpus using MALLET.
tap.TAPModelManager Generates a time-sensitive set of TAPModels from a Corpus, a corpus model, and a coauthorship GraphCollection.

More managers will be added regularly.

class tethne.model.managers.ModelManager(outpath=None, temppath=None, **kwargs)[source]

Bases: object

Base class for Model Managers.

build(Z=20, max_iter=1000, prep=False, **kwargs)[source]

Start the modeling build procedure.

Parameters:

Z : int

Number of topics.

max_iter : int

Maximum number of modeling iterations.

prep : bool

(default: False) Perform prep() before modeling.

plot_ll()[source]

Plots LL/topic over iterations.

prep(meta=['date', 'atitle', 'jtitle'])[source]

Generates a corpus that can be used as input for modeling.

Parameters:

meta : list

A list of keys onto Paper to include in the exported metadata file. Default: [‘date’, ‘jtitle’]

class tethne.model.managers.SocialModelManager(**kwargs)[source]

Bases: object

Base class for social model managers.

build(max_iter=1000, **kwargs)[source]