Skip to main content

Globally local variable importance

Project description

  • Two measures to calculate local variable importance with global models. It means that calcuate variable importance for subset of global data set using global model trained by global data set. I provide two files including 'todi.py' and 'meda.py' to realise these two methods. Both file include a class called 'lovim' inheriting from 'RandomForestRegressor' in 'scikit-learn'.
  • For example:
  • l = lovim(500, max_features=0.3, n_jobs=-1))# just be same with the class 'RandomForestRegressor' in 'scikit-learn'.
  • l.fit(X,Y)# fitting the model.
  • local_variable importance = l.compute_feature_importance(X,Y,partition_feature = partition_feature, norm=True,n_jobs=-1) # calculate local variable importance.
  • Of course, we upload the file to 'https://pypi.org/'. You can install it just like other packages such as numpy and pandas. Please input 'pip install glvi' in "cmd" for windows or Terminal Emulator for Linux to install the package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glvi-0.1.4.tar.gz (6.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page