PyLandslide.weightrange.WeightRangeEstimator

class PyLandslide.weightrange.WeightRangeEstimator(json_file, *args, **kwargs)[source]

This class includes methods for calculating weight ranges of factors contributing to the occurrence of landslides based on Machine Learning.

__init__(json_file, *args, **kwargs)[source]

Initialise a new WeightRangeEstimator object.

Args:

json_file: JSON-based document specifying the configuration information for performing weight range calculation.

Methods

__init__(json_file, *args, **kwargs)

Initialise a new WeightRangeEstimator object.

calculate_weight_range()

Uses Random Forest Classification Machine Learning Models to estimate weight ranges of the factors contributing to the occurrence of landslides.

feature_importance_model(targets, features, ...)

Trains a Random Forest Classification Model and returns the model and the associated feature importance list.

load_data_from_csv(filename, index_column)

Loads a CSV file into a Pandas dataframe.

load_data_from_json()

Loads the configuration JSON-based document assigned to self.json_file.

overall_accuracy(mod, X_train, Y_train, ...)

Calculates the Overall Accuracy metric of a Machine Learning model for the testing and training data.

setup()

Calls the load_data_from_json method to extract the information provided in the JSON-based document.