Python package implementing a compression based version for fitting and predicting responses using Locally Linear Regression(LLR) on graph-linked data.
Following steps discribe the installation process, as well as few examples using LLR.
The packege requires you to have Python version 3.3 +. To check your Python version please follow the directions below.
Checking the Python version:
python --version
pip
LLR()
Locally Linear Regression model.
LLR.fit(X, y, mu, v, perm_size = 50, var=None, Graph=None):
Full fit of the model.
Parameters:
X: array_like An n by p array with n observations and p features.
y: array_like 1-d array of response variable.
mu: int Tuning parameter affecting the y-intercept .
v: int Tuning parameter affecting the regression coefficients.
perm_size: int Number of data points to keep in compression.
var: double Variance of Gaussian Kernel, needed if Graph parameter is None.
Graph: array_like Graph of data points passed as an adjacency matrix.
LLR.predict(X_new):
Returns the predicted values of the response variable as a 1-d array.
Parameters:
X_new: array_like New array of data points, with m observations and p features.
Graph: array_like Graph of the data points in X_new passed as an adjacency matrix.
The examples in the /examples folder describe ways to fit the LLR model to the data, predict responses and choose tuning parameters using cross validation.
This project is licensed under the MIT License - see the LICENSE.md file for details.