Man page - mlpack_linear_regression(1)
Packages contains this manual
- mlpack_fastmks(1)
- mlpack_mean_shift(1)
- mlpack_hmm_generate(1)
- mlpack_local_coordinate_coding(1)
- mlpack_sparse_coding(1)
- mlpack_preprocess_scale(1)
- mlpack_kmeans(1)
- mlpack_linear_svm(1)
- mlpack_preprocess_split(1)
- mlpack_softmax_regression(1)
- mlpack_hmm_train(1)
- mlpack_nca(1)
- mlpack_range_search(1)
- mlpack_radical(1)
- mlpack_gmm_generate(1)
- mlpack_cf(1)
- mlpack_random_forest(1)
- mlpack_lmnn(1)
- mlpack_gmm_probability(1)
- mlpack_emst(1)
- mlpack_dbscan(1)
- mlpack_nbc(1)
- mlpack_preprocess_one_hot_encoding(1)
- mlpack_lsh(1)
- mlpack_knn(1)
- mlpack_kde(1)
- mlpack_hoeffding_tree(1)
- mlpack_adaboost(1)
- mlpack_hmm_loglik(1)
- mlpack_nmf(1)
- mlpack_pca(1)
- mlpack_bayesian_linear_regression(1)
- mlpack_hmm_viterbi(1)
- mlpack_preprocess_describe(1)
- mlpack_decision_tree(1)
- mlpack_krann(1)
- mlpack_det(1)
- mlpack_lars(1)
- mlpack_preprocess_binarize(1)
- mlpack_logistic_regression(1)
- mlpack_gmm_train(1)
- mlpack_perceptron(1)
- mlpack_preprocess_imputer(1)
- mlpack_kernel_pca(1)
- mlpack_kfn(1)
- mlpack_linear_regression(1)
- mlpack_approx_kfn(1)
apt-get install mlpack-bin
Manual
mlpack_linear_regression
NAMESYNOPSIS
DESCRIPTION
OPTIONAL INPUT OPTIONS
OPTIONAL OUTPUT OPTIONS
ADDITIONAL INFORMATION
NAME
mlpack_linear_regression - simple linear regression and prediction
SYNOPSIS
mlpack_linear_regression [ -m unknown ] [ -l double ] [ -T unknown ] [ -t unknown ] [ -r unknown ] [ -V bool ] [ -M unknown ] [ -o unknown ] [ -h -v ]
DESCRIPTION
An implementation of simple linear regression and simple ridge regression using ordinary least squares. This solves the problem
y = X * b + e
where X (specified by β --training_file ( -t )β) and y (specified either as the last column of the input matrix β --training_file ( -t )β or via the β --training_responses_file ( -r )β parameter) are known and b is the desired variable. If the covariance matrix (XβX) is not invertible, or if the solution is overdetermined, then specify a Tikhonov regularization constant (with β --lambda ( -l )β) greater than 0, which will regularize the covariance matrix to make it invertible. The calculated b may be saved with the β --output_predictions_file ( -o )β output parameter.
Optionally, the calculated value of b is used to predict the responses for another matrix Xβ (specified by the β --test_file ( -T )β parameter):
yβ = Xβ * b
and the predicted responses yβ may be saved with the β --output_predictions_file ( -o )β output parameter. This type of regression is related to least-angle regression, which mlpack implements as the βlarsβ program.
For example, to run a linear regression on the dataset βX.csvβ with responses βy.csvβ, saving the trained model to βlr_model.binβ, the following command could be used:
$ mlpack_linear_regression --training_file X.csv --training_responses_file y.csv --output_model_file lr_model.bin
Then, to use βlr_model.binβ to predict responses for a test set βX_test.csvβ, saving the predictions to βX_test_responses.csvβ, the following command could be used:
$ mlpack_linear_regression --input_model_file lr_model.bin --test_file X_test.csv --output_predictions_file X_test_responses.csv
OPTIONAL INPUT OPTIONS
--help (-h) [ bool ]
Default help info.
--info [string]
Print help on a specific option. Default value ββ.
--input_model_file (-m) [ unknown ]
Existing LinearRegression model to use.
--lambda (-l) [ double ]
Tikhonov regularization for ridge regression. If 0, the method reduces to linear regression. Default value 0.
--test_file (-T) [ unknown ]
Matrix containing Xβ (test regressors).
--training_file (-t) [ unknown ]
Matrix containing training set X (regressors).
--training_responses_file (-r) [ unknown ]
Optional vector containing y (responses). If not given, the responses are assumed to be the last row of the input file.
--verbose (-v) [ bool ]
Display informational messages and the full list of parameters and timers at the end of execution.
--version (-V) [ bool ]
Display the version of mlpack.
OPTIONAL OUTPUT OPTIONS
--output_model_file (-M) [ unknown ]
Output LinearRegression model.
--output_predictions_file (-o) [ unknown ]
If --test_file is specified, this matrix is where the predicted responses will be saved.
ADDITIONAL INFORMATION
For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack.