var searchIndex = {}; searchIndex["rusty_machine"] = {"doc":"# The rusty-machine crate.","items":[[0,"prelude","rusty_machine","The rusty-machine prelude.",null,null],[0,"linalg","","Module for linear algebra.",null,null],[0,"matrix","rusty_machine::linalg","The matrix module.",null,null],[3,"Matrix","rusty_machine::linalg::matrix","The `Matrix` struct.",null,null],[3,"MatrixSlice","","A `MatrixSlice`",null,null],[3,"MatrixSliceMut","","A mutable `MatrixSliceMut`",null,null],[4,"Axes","","Matrix dimensions",null,null],[13,"Row","","The row axis.",0,null],[13,"Col","","The column axis.",0,null],[11,"cholesky","","Cholesky decomposition",1,null],[11,"qr_decomp","","Compute the QR decomposition of the matrix.",1,null],[11,"upper_hessenberg","","Returns H, where H is the upper hessenberg form.",1,null],[11,"upper_hess_decomp","","Returns (U,H), where H is the upper hessenberg form\nand U is the unitary transform matrix.",1,null],[11,"eigenvalues","","Eigenvalues of a square matrix.",1,null],[11,"eigendecomp","","Eigendecomposition of a square matrix.",1,null],[11,"lup_decomp","","Computes L, U, and P for LUP decomposition.",1,null],[11,"index","","",1,null],[11,"index","","",2,null],[11,"index","","",3,null],[11,"index_mut","","",3,null],[11,"index_mut","","",1,null],[11,"mul","","",2,null],[11,"mul","","",2,null],[11,"mul","","",3,null],[11,"mul","","",3,null],[11,"div","","",2,null],[11,"div","","",2,null],[11,"div","","",3,null],[11,"div","","",3,null],[11,"add","","",2,null],[11,"add","","",2,null],[11,"add","","",3,null],[11,"add","","",3,null],[11,"sub","","",2,null],[11,"sub","","",2,null],[11,"sub","","",3,null],[11,"sub","","",3,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"div","","",1,null],[11,"div","","",1,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"add","","",2,null],[11,"add","","",2,null],[11,"add","","",3,null],[11,"add","","",3,null],[11,"add","","",2,null],[11,"add","","",2,null],[11,"add","","",3,null],[11,"add","","",3,null],[11,"sub","","",2,null],[11,"sub","","",2,null],[11,"sub","","",3,null],[11,"sub","","",3,null],[11,"sub","","",2,null],[11,"sub","","",2,null],[11,"sub","","",3,null],[11,"sub","","",3,null],[11,"add","","",2,null],[11,"add","","",2,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"add","","",3,null],[11,"add","","",3,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"sub","","",2,null],[11,"sub","","",2,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"sub","","",3,null],[11,"sub","","",3,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"add_assign","","",1,null],[11,"add_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"div_assign","","",1,null],[11,"div_assign","","",1,null],[11,"mul_assign","","",1,null],[11,"mul_assign","","",1,null],[11,"add_assign","","",3,null],[11,"add_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"div_assign","","",3,null],[11,"div_assign","","",3,null],[11,"mul_assign","","",3,null],[11,"mul_assign","","",3,null],[11,"add_assign","","",1,null],[11,"add_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"add_assign","","",3,null],[11,"add_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"add_assign","","",3,null],[11,"add_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"add_assign","","",3,null],[11,"add_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"sub_assign","","",3,null],[11,"add_assign","","",1,null],[11,"add_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"add_assign","","",1,null],[11,"add_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"sub_assign","","",1,null],[11,"neg","","",2,null],[11,"neg","","",3,null],[11,"neg","","",1,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"mul","","",2,null],[11,"mul","","",2,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"mul","","",3,null],[11,"mul","","",3,null],[11,"mul","","",2,null],[11,"mul","","",2,null],[11,"mul","","",2,null],[11,"mul","","",2,null],[11,"mul","","",3,null],[11,"mul","","",3,null],[11,"mul","","",3,null],[11,"mul","","",3,null],[11,"iter_rows","","Iterate over the rows of the matrix.",1,null],[11,"iter_rows_mut","","Iterate over the mutable rows of the matrix.",1,null],[11,"iter_rows","","Iterate over the rows of the matrix slice.",2,null],[11,"iter_rows","","Iterate over the rows of the mutable matrix slice.",3,null],[11,"iter_rows_mut","","Iterate over the mutable rows of the matrix.",3,null],[11,"from_iter","","",1,{"inputs":[{"name":"i"}],"output":{"name":"self"}}],[0,"slice","","Slices for the `Matrix` struct.",null,null],[3,"SliceIter","rusty_machine::linalg::matrix::slice","Iterator for `MatrixSlice`",null,null],[3,"SliceIterMut","","Iterator for `MatrixSliceMut`.",null,null],[8,"BaseSlice","","Trait for Matrix Slices.",null,null],[10,"rows","","Rows in the slice.",4,null],[10,"cols","","Columns in the slice.",4,null],[10,"row_stride","","Row stride in the slice.",4,null],[10,"as_ptr","","Top left index of the slice.",4,null],[10,"get_unchecked","","Get a reference to a point in the slice without bounds checking.",4,null],[11,"rows","rusty_machine::linalg::matrix","",2,null],[11,"cols","","",2,null],[11,"row_stride","","",2,null],[11,"as_ptr","","",2,null],[11,"get_unchecked","","",2,null],[11,"rows","","",3,null],[11,"cols","","",3,null],[11,"row_stride","","",3,null],[11,"as_ptr","","",3,null],[11,"get_unchecked","","",3,null],[11,"from_matrix","","Produce a matrix slice from a matrix",2,null],[11,"from_raw_parts","","Creates a matrix slice from raw parts.",2,null],[11,"reslice","","Produce a matrix slice from an existing matrix slice.",2,null],[11,"iter","","Returns an iterator over the matrix slice.",2,null],[11,"into_matrix","","Convert the matrix slice into a new Matrix.",2,null],[11,"from_matrix","","Produce a matrix slice from a matrix",3,null],[11,"from_raw_parts","","Creates a mutable matrix slice from raw parts.",3,null],[11,"reslice","","Produce a matrix slice from an existing matrix slice.",3,null],[11,"iter","","Returns an iterator over the matrix slice.",3,null],[11,"iter_mut","","Returns a mutable iterator over the matrix slice.",3,null],[11,"into_matrix","","Convert the matrix slice into a new Matrix.",3,null],[11,"fmt","rusty_machine::linalg::matrix::slice","",5,null],[11,"fmt","","",6,null],[11,"next","","",5,null],[11,"next","","",6,null],[11,"clone","rusty_machine::linalg::matrix","",0,null],[11,"fmt","","",0,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"fmt","","",1,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"fmt","","",3,null],[11,"new","","Constructor for Matrix struct.",1,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"u"}],"output":{"name":"matrix"}}],[11,"rows","","Returns the number of rows in the Matrix.",1,null],[11,"cols","","Returns the number of columns in the Matrix.",1,null],[11,"row_stride","","Returns the row-stride of the matrix. This is simply\nits column count.",1,null],[11,"data","","Returns a non-mutable reference to the underlying data.",1,null],[11,"mut_data","","Returns a mutable slice of the underlying data.",1,null],[11,"get_unchecked","","Get a reference to a point in the matrix without bounds checks.",1,null],[11,"get_unchecked_mut","","Get a mutable reference to a point in the matrix without bounds checks.",1,null],[11,"as_ptr","","Returns pointer to first element of underlying data.",1,null],[11,"into_vec","","Consumes the Matrix and returns the Vec of data.",1,null],[11,"split_at","","Split the matrix at the specified axis returning two `MatrixSlice`s.",1,null],[11,"split_at_mut","","Split the matrix at the specified axis returning two `MatrixSlice`s.",1,null],[11,"as_slice","","Returns a `MatrixSlice` over the whole matrix.",1,null],[11,"as_mut_slice","","Returns a mutable `MatrixSlice` over the whole matrix.",1,null],[11,"clone","","Clones the Matrix.",1,null],[11,"select_rows","","Select rows from matrix",1,null],[11,"select_cols","","Select columns from matrix",1,null],[11,"select","","Select block matrix from matrix",1,null],[11,"hcat","","Horizontally concatenates two matrices. With self on the left.",1,null],[11,"vcat","","Vertically concatenates two matrices. With self on top.",1,null],[11,"diag","","Extract the diagonal of the matrix",1,null],[11,"apply","","Applies a function to each element in the matrix.",1,null],[11,"transpose","","Tranposes the given matrix",1,null],[11,"zeros","","Constructs matrix of all zeros.",1,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"matrix"}}],[11,"from_diag","","Constructs matrix with given diagonal.",1,null],[11,"ones","","Constructs matrix of all ones.",1,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"matrix"}}],[11,"identity","","Constructs the identity matrix.",1,{"inputs":[{"name":"usize"}],"output":{"name":"matrix"}}],[11,"is_diag","","Checks if matrix is diagonal.",1,null],[11,"sum_rows","","The sum of the rows of the matrix.",1,null],[11,"sum_cols","","The sum of the columns of the matrix.",1,null],[11,"sum","","The sum of all elements in the matrix",1,null],[11,"elemul","","The elementwise product of two matrices.",1,null],[11,"elediv","","The elementwise division of two matrices.",1,null],[11,"mean","","The mean of the matrix along the specified axis.",1,null],[11,"variance","","The variance of the matrix along the specified axis.",1,null],[11,"solve","","Solves the equation Ax = y.",1,null],[11,"inverse","","Computes the inverse of the matrix.",1,null],[11,"det","","Computes the determinant of the matrix.",1,null],[11,"norm","","Compute euclidean norm for matrix.",1,null],[11,"norm","","Compute euclidean norm for matrix.",2,null],[11,"norm","","Compute euclidean norm for matrix.",3,null],[11,"fmt","","Formats the Matrix for display.",1,null],[0,"vector","rusty_machine::linalg","The vector module.",null,null],[3,"Vector","rusty_machine::linalg::vector","The Vector struct.",null,null],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"fmt","","",7,null],[11,"new","","Constructor for Vector struct.",7,{"inputs":[{"name":"u"}],"output":{"name":"vector"}}],[11,"size","","Returns the size of the Vector.",7,null],[11,"data","","Returns a non-mutable reference to the underlying data.",7,null],[11,"mut_data","","Returns a mutable slice of the underlying data.",7,null],[11,"into_vec","","Consumes the Vector and returns the Vec of data.",7,null],[11,"clone","","Clones the Vector.",7,null],[11,"apply","","Applies a function to each element in the vector.",7,null],[11,"argmax","","Find the argmax of the Vector.",7,null],[11,"argmin","","Find the argmin of the Vector.",7,null],[11,"select","","Select elements from the Vector and form a new Vector from them.",7,null],[11,"zeros","","Constructs Vector of all zeros.",7,{"inputs":[{"name":"usize"}],"output":{"name":"vector"}}],[11,"ones","","Constructs Vector of all ones.",7,{"inputs":[{"name":"usize"}],"output":{"name":"vector"}}],[11,"dot","","Compute dot product with specified Vector.",7,null],[11,"sum","","The sum of the vector.",7,null],[11,"elemul","","The elementwise product of two vectors.",7,null],[11,"elediv","","The elementwise division of two vectors.",7,null],[11,"mean","","The mean of the vector.",7,null],[11,"variance","","The variance of the vector.",7,null],[11,"mul","","",7,null],[11,"mul","","",7,null],[11,"div","","",7,null],[11,"div","","",7,null],[11,"add","","",7,null],[11,"add","","",7,null],[11,"add","","",7,null],[11,"add","","",7,null],[11,"sub","","",7,null],[11,"sub","","",7,null],[11,"sub","","",7,null],[11,"sub","","",7,null],[11,"neg","","",7,null],[11,"index","","",7,null],[11,"norm","","Compute euclidean norm for vector.",7,null],[11,"add_assign","","",7,null],[11,"add_assign","","",7,null],[11,"sub_assign","","",7,null],[11,"sub_assign","","",7,null],[11,"div_assign","","",7,null],[11,"div_assign","","",7,null],[11,"mul_assign","","",7,null],[11,"mul_assign","","",7,null],[11,"add_assign","","",7,null],[11,"add_assign","","",7,null],[11,"sub_assign","","",7,null],[11,"sub_assign","","",7,null],[0,"utils","rusty_machine::linalg","Linear algebra utils module.",null,null],[5,"dot","rusty_machine::linalg::utils","Compute dot product of two slices.",null,null],[5,"unrolled_sum","","Unrolled sum",null,null],[5,"in_place_vec_bin_op","","Vectorized binary operation applied to two slices.\nThe first argument should be a mutable slice which will\nbe modified in place to prevent new memory allocation.",null,null],[5,"vec_bin_op","","Vectorized binary operation applied to two slices.",null,null],[5,"vec_sum","","Compute vector sum of two slices.",null,null],[5,"vec_sub","","Compute vector difference two slices.",null,null],[5,"ele_mul","","Computes elementwise multiplication.",null,null],[5,"ele_div","","Computes elementwise division.",null,null],[5,"argmax","","Find argmax of slice.",null,null],[5,"argmin","","Find argmin of slice.",null,null],[5,"find","","Find index of value in slice.",null,null],[0,"convert","rusty_machine::linalg","The convert module.",null,null],[11,"from","rusty_machine::linalg::matrix","",1,{"inputs":[{"name":"vector"}],"output":{"name":"self"}}],[11,"from","","",1,{"inputs":[{"name":"matrixslice"}],"output":{"name":"self"}}],[11,"from","","",1,{"inputs":[{"name":"matrixslicemut"}],"output":{"name":"self"}}],[0,"macros","rusty_machine::linalg","Macros for the linear algebra modules.",null,null],[8,"Metric","","Trait for linear algebra metrics.",null,null],[10,"norm","","Computes the euclidean norm.",8,null],[0,"learning","rusty_machine","Module for machine learning.",null,null],[0,"glm","rusty_machine::learning","Generalized Linear Model module",null,null],[3,"GenLinearModel","rusty_machine::learning::glm","The Generalized Linear Model",null,null],[3,"Logit","","The Logit link function.",null,null],[3,"Log","","The log link function.",null,null],[3,"Identity","","The Identity link function.",null,null],[3,"Bernoulli","","The Bernoulli regression family.",null,null],[3,"Binomial","","The Binomial regression family.",null,null],[3,"Normal","","The Normal regression family.",null,null],[3,"Poisson","","The Poisson regression family.",null,null],[8,"Criterion","","The criterion for the Generalized Linear Model.",null,null],[16,"Link","","The link function of the GLM Criterion.",9,null],[10,"model_variance","","The variance of the regression family.",9,null],[11,"initialize_mu","","Initializes the mean value.",9,null],[11,"compute_working_weight","","Computes the working weights that make up the diagonal\nof the `W` matrix used in the iterative reweighted least squares\nalgorithm.",9,null],[11,"compute_y_bar","","Computes the adjustment to the fitted values used during\nfitting.",9,null],[11,"apply_link_func","","Applies the link function to a vector.",9,null],[11,"apply_link_inv","","Applies the inverse of the link function to a vector.",9,null],[11,"link_grad","","Computes the gradient of the link function.",9,null],[8,"LinkFunc","","Link functions.",null,null],[10,"func","","The link function.",10,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[10,"func_grad","","The gradient of the link function.",10,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[10,"func_inv","","The inverse of the link function.\nOften called the 'mean' function.",10,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",11,null],[11,"new","","Constructs a new Generalized Linear Model.",11,{"inputs":[{"name":"c"}],"output":{"name":"genlinearmodel"}}],[11,"predict","","Predict output from inputs.",11,null],[11,"train","","Train the model using inputs and targets.",11,null],[11,"fmt","","",12,null],[11,"clone","","",12,null],[11,"func","","",12,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",12,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",12,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",13,null],[11,"clone","","",13,null],[11,"func","","",13,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",13,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",13,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",14,null],[11,"clone","","",14,null],[11,"func","","",14,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",14,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",14,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",15,null],[11,"clone","","",15,null],[11,"model_variance","","",15,null],[11,"initialize_mu","","",15,null],[11,"compute_working_weight","","",15,null],[11,"compute_y_bar","","",15,null],[11,"fmt","","",16,null],[11,"model_variance","","",16,null],[11,"initialize_mu","","",16,null],[11,"compute_working_weight","","",16,null],[11,"compute_y_bar","","",16,null],[11,"fmt","","",17,null],[11,"clone","","",17,null],[11,"model_variance","","",17,null],[11,"fmt","","",18,null],[11,"clone","","",18,null],[11,"model_variance","","",18,null],[11,"initialize_mu","","",18,null],[11,"compute_working_weight","","",18,null],[0,"gmm","rusty_machine::learning","Gaussian Mixture Models",null,null],[3,"GaussianMixtureModel","rusty_machine::learning::gmm","A Gaussian Mixture Model",null,null],[12,"cov_option","","The covariance options for the GMM.",19,null],[4,"CovOption","","Covariance options for GMMs.",null,null],[13,"Full","","The full covariance structure.",20,null],[13,"Regularized","","Adds a regularization constant to the covariance diagonal.",20,null],[13,"Diagonal","","Only the diagonal covariance structure.",20,null],[11,"fmt","","",20,null],[11,"clone","","",20,null],[11,"fmt","","",19,null],[11,"train","","Train the model using inputs.",19,null],[11,"predict","","Predict output from inputs.",19,null],[11,"new","","Constructs a new Gaussian Mixture Model",19,{"inputs":[{"name":"usize"}],"output":{"name":"gaussianmixturemodel"}}],[11,"with_weights","","Constructs a new GMM with the specified prior mixture weights.",19,{"inputs":[{"name":"usize"},{"name":"vector"}],"output":{"name":"gaussianmixturemodel"}}],[11,"means","","The model means",19,null],[11,"covariances","","The model covariances",19,null],[11,"mixture_weights","","The model mixture weights",19,null],[11,"set_max_iters","","Sets the max number of iterations for the EM algorithm.",19,null],[0,"lin_reg","rusty_machine::learning","Linear Regression module",null,null],[3,"LinRegressor","rusty_machine::learning::lin_reg","Linear Regression Model.",null,null],[11,"fmt","","",21,null],[11,"default","","",21,{"inputs":[],"output":{"name":"linregressor"}}],[11,"parameters","","Get the parameters from the model.",21,null],[11,"train","","Train the linear regression model.",21,null],[11,"predict","","Predict output value from input data.",21,null],[11,"compute_grad","","",21,null],[11,"train_with_optimization","","Train the linear regressor using Gradient Descent.",21,null],[0,"logistic_reg","rusty_machine::learning","Logistic Regression module",null,null],[3,"LogisticRegressor","rusty_machine::learning::logistic_reg","Logistic Regression Model.",null,null],[3,"BaseLogisticRegressor","","The Base Logistic Regression model.",null,null],[11,"fmt","","",22,null],[11,"default","","",22,{"inputs":[],"output":{"name":"logisticregressor"}}],[11,"new","","Constructs untrained logistic regression model.",22,{"inputs":[{"name":"a"}],"output":{"name":"logisticregressor"}}],[11,"parameters","","Get the parameters from the model.",22,null],[11,"train","","Train the logistic regression model.",22,null],[11,"predict","","Predict output value from input data.",22,null],[11,"fmt","","",23,null],[11,"compute_grad","","",23,null],[0,"k_means","rusty_machine::learning","K-means Classification",null,null],[3,"KMeansClassifierBuilder","rusty_machine::learning::k_means","K-Means Classification Builder.",null,null],[3,"KMeansClassifier","","K-Means Classification model.",null,null],[12,"iters","","Max iterations of algorithm to run.",24,null],[12,"k","","The number of classes.",24,null],[12,"centroids","","The fitted centroids .",24,null],[12,"init_algorithm","","The initial algorithm to use.",24,null],[4,"InitAlgorithm","","Initialization Algorithm enum.",null,null],[13,"Forgy","","The Forgy initialization scheme.",25,null],[13,"RandomPartition","","The Random Partition initialization scheme.",25,null],[13,"KPlusPlus","","The K-means ++ initialization scheme.",25,null],[11,"fmt","","",25,null],[11,"clone","","",25,null],[11,"fmt","","",26,null],[11,"new","","Create a K-Means Classification Builder.",26,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"iters","","Changes the number of iterations.",26,null],[11,"init_algorithm","","Changes the initialization algorithm.",26,null],[11,"finalize","","Returns the KMeansClassifier with the options previously specified.",26,null],[11,"fmt","","",24,null],[11,"predict","","Predict classes from data.",24,null],[11,"train","","Train the classifier using input data.",24,null],[11,"new","","Constructs untrained k-means classifier model.",24,{"inputs":[{"name":"usize"}],"output":{"name":"kmeansclassifier"}}],[11,"new_specified","","Constructs untrained k-means classifier model.",24,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"initalgorithm"}],"output":{"name":"kmeansclassifier"}}],[11,"k","","Get the number of classes",24,null],[11,"iters","","Get the number of iterations",24,null],[11,"init_algorithm","","Get the initialization algorithm",24,null],[0,"nnet","rusty_machine::learning","Neural Network module",null,null],[3,"NeuralNet","rusty_machine::learning::nnet","Neural Network Model",null,null],[3,"BaseNeuralNet","","Base Neural Network struct",null,null],[3,"BCECriterion","","The binary cross entropy criterion.",null,null],[3,"MSECriterion","","The mean squared error criterion.",null,null],[8,"Criterion","","Criterion for Neural Networks",null,null],[16,"ActFunc","","The activation function for the criterion.",27,null],[16,"Cost","","The cost function for the criterion.",27,null],[11,"activate","","The activation function applied to a matrix.",27,null],[11,"grad_activ","","The gradient of the activation function applied to a matrix.",27,null],[11,"cost","","The cost function.",27,null],[11,"cost_grad","","The gradient of the cost function.",27,null],[11,"regularization","","Returns the regularization for this criterion.",27,null],[11,"is_regularized","","Checks if the current criterion includes regularization.",27,null],[11,"reg_cost","","Returns the regularization cost for the criterion.",27,null],[11,"reg_cost_grad","","Returns the regularization gradient for the criterion.",27,null],[11,"fmt","","",28,null],[11,"predict","","Predict neural network output using forward propagation.",28,null],[11,"train","","Train the model using gradient optimization and back propagation.",28,null],[11,"default","","Creates a neural network with the specified layer sizes.",28,null],[11,"new","","Create a new neural network with the specified layer sizes.",28,null],[11,"get_net_weights","","Gets matrix of weights between specified layer and forward layer.",28,null],[11,"fmt","","",29,null],[11,"compute_grad","","Compute the gradient of the neural network.",29,null],[11,"fmt","","",30,null],[11,"clone","","",30,null],[11,"regularization","","",30,null],[11,"default","","",30,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Constructs a new BCECriterion with the given regularization.",30,{"inputs":[{"name":"regularization"}],"output":{"name":"self"}}],[11,"fmt","","",31,null],[11,"clone","","",31,null],[11,"regularization","","",31,null],[11,"default","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Constructs a new BCECriterion with the given regularization.",31,{"inputs":[{"name":"regularization"}],"output":{"name":"self"}}],[0,"gp","rusty_machine::learning","Gaussian Processes",null,null],[3,"ConstMean","rusty_machine::learning::gp","Constant mean function",null,null],[3,"GaussianProcess","","Gaussian Process struct",null,null],[12,"noise","","The observation noise of the GP.",32,null],[8,"MeanFunc","","Trait for GP mean functions.",null,null],[10,"func","","Compute the mean function applied elementwise to a matrix.",33,null],[11,"fmt","","",34,null],[11,"clone","","",34,null],[11,"default","","",34,{"inputs":[],"output":{"name":"constmean"}}],[11,"func","","",34,null],[11,"fmt","","",32,null],[11,"default","","",32,{"inputs":[],"output":{"name":"gaussianprocess"}}],[11,"new","","Construct a new Gaussian Process.",32,{"inputs":[{"name":"t"},{"name":"u"},{"name":"f64"}],"output":{"name":"gaussianprocess"}}],[11,"predict","","Predict output from inputs.",32,null],[11,"train","","Train the model using data and outputs.",32,null],[11,"get_posterior","","Compute the posterior distribution [UNSTABLE]",32,null],[0,"svm","rusty_machine::learning","Support Vector Machine Module",null,null],[3,"SVM","rusty_machine::learning::svm","Support Vector Machine",null,null],[12,"optim_iters","","Number of iterations for training.",35,null],[11,"fmt","","",35,null],[11,"default","","",35,{"inputs":[],"output":{"name":"svm"}}],[11,"new","","Constructs an untrained SVM with specified\nkernel and lambda which determins the hardness\nof the margin.",35,{"inputs":[{"name":"k"},{"name":"f64"}],"output":{"name":"svm"}}],[11,"predict","","",35,null],[11,"train","","",35,null],[0,"naive_bayes","rusty_machine::learning","Naive Bayes Classifiers",null,null],[3,"NaiveBayes","rusty_machine::learning::naive_bayes","The Naive Bayes model.",null,null],[3,"Gaussian","","The Gaussian Naive Bayes model distribution.",null,null],[3,"Bernoulli","","The Bernoulli Naive Bayes model distribution.",null,null],[3,"Multinomial","","The Multinomial Naive Bayes model distribution.",null,null],[8,"Distribution","","Naive Bayes Distribution.",null,null],[10,"from_model_params","","Initialize the distribution parameters.",36,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[10,"update_params","","Updates the distribution parameters.",36,null],[10,"joint_log_lik","","Compute the joint log likelihood of the data.",36,null],[11,"fmt","","",37,null],[11,"new","","Create a new NaiveBayes model from a given\ndistribution.",37,{"inputs":[],"output":{"name":"naivebayes"}}],[11,"cluster_count","","Get the cluster count for this model.",37,null],[11,"class_prior","","Get the class prior distribution for this model.",37,null],[11,"distr","","Get the distribution for this model.",37,null],[11,"train","","Train the model using inputs and targets.",37,null],[11,"predict","","Predict output from inputs.",37,null],[11,"get_log_probs","","Get the log-probabilities per class for each input.",37,null],[11,"fmt","","",38,null],[11,"theta","","Returns the distribution means.",38,null],[11,"sigma","","Returns the distribution variances.",38,null],[11,"from_model_params","","",38,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"gaussian"}}],[11,"update_params","","",38,null],[11,"joint_log_lik","","",38,null],[11,"fmt","","",39,null],[11,"log_probs","","The log probability matrix.",39,null],[11,"from_model_params","","",39,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"bernoulli"}}],[11,"update_params","","",39,null],[11,"joint_log_lik","","",39,null],[11,"fmt","","",40,null],[11,"log_probs","","The log probability matrix.",40,null],[11,"from_model_params","","",40,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"multinomial"}}],[11,"update_params","","",40,null],[11,"joint_log_lik","","",40,null],[0,"optim","rusty_machine::learning","Module for optimization in machine learning setting.",null,null],[0,"grad_desc","rusty_machine::learning::optim","Gradient Descent",null,null],[3,"GradientDesc","rusty_machine::learning::optim::grad_desc","Batch Gradient Descent algorithm",null,null],[3,"StochasticGD","","Stochastic Gradient Descent algorithm.",null,null],[3,"AdaGrad","","Adaptive Gradient Descent",null,null],[11,"fmt","","",41,null],[11,"clone","","",41,null],[11,"default","","",41,{"inputs":[],"output":{"name":"gradientdesc"}}],[11,"new","","Construct a gradient descent algorithm.",41,{"inputs":[{"name":"f64"},{"name":"usize"}],"output":{"name":"gradientdesc"}}],[11,"optimize","","",41,null],[11,"fmt","","",42,null],[11,"clone","","",42,null],[11,"default","","",42,{"inputs":[],"output":{"name":"stochasticgd"}}],[11,"new","","Construct a stochastic gradient descent algorithm.",42,{"inputs":[{"name":"f64"},{"name":"f64"},{"name":"usize"}],"output":{"name":"stochasticgd"}}],[11,"optimize","","",42,null],[11,"fmt","","",43,null],[11,"new","","Constructs a new AdaGrad algorithm.",43,{"inputs":[{"name":"f64"},{"name":"f64"},{"name":"usize"}],"output":{"name":"adagrad"}}],[11,"default","","",43,{"inputs":[],"output":{"name":"adagrad"}}],[11,"optimize","","",43,null],[0,"fmincg","rusty_machine::learning::optim","Module for the fmincg optimization algorithm.",null,null],[3,"ConjugateGD","rusty_machine::learning::optim::fmincg","Conjugate Gradient Descent algorithm",null,null],[12,"rho","","Constant in the Wolfe-Powell conditions.",44,null],[12,"sig","","Constant in the Wolfe-Powell conditions.",44,null],[12,"int","","Don't reevaluate within `int` of the limit of the current bracket.",44,null],[12,"ext","","Extrapolate max of `ext` times the current bracket.",44,null],[12,"max","","Max of `max` function evaluations per line search",44,null],[12,"ratio","","The maximum allowed slope ratio",44,null],[12,"iters","","The default number of max iterations.",44,null],[11,"fmt","","",44,null],[11,"clone","","",44,null],[11,"default","","",44,{"inputs":[],"output":{"name":"conjugategd"}}],[11,"optimize","","",44,null],[8,"Optimizable","rusty_machine::learning::optim","Trait for models which can be gradient-optimized.",null,null],[16,"Inputs","","The input data type to the model.",45,null],[16,"Targets","","The target data type to the model.",45,null],[10,"compute_grad","","Compute the gradient for the model.",45,null],[8,"OptimAlgorithm","","Trait for optimization algorithms.",null,null],[10,"optimize","","Return the optimized parameter using gradient optimization.",46,null],[0,"toolkit","rusty_machine::learning","Module for learning tools.",null,null],[0,"activ_fn","rusty_machine::learning::toolkit","Activation Functions.",null,null],[3,"Sigmoid","rusty_machine::learning::toolkit::activ_fn","Sigmoid activation function.",null,null],[3,"Linear","","Linear activation function.",null,null],[3,"Exp","","Exponential activation function.",null,null],[8,"ActivationFunc","","Trait for activation functions in models.",null,null],[10,"func","","The activation function.",47,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[10,"func_grad","","The gradient of the activation function.",47,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[10,"func_inv","","The inverse of the activation function.",47,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",48,null],[11,"clone","","",48,null],[11,"func","","Sigmoid function.",48,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","Gradient of sigmoid function.",48,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",48,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",49,null],[11,"clone","","",49,null],[11,"func","","",49,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",49,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",49,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"fmt","","",50,null],[11,"clone","","",50,null],[11,"func","","",50,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",50,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",50,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[0,"kernel","rusty_machine::learning::toolkit","Module for kernels",null,null],[3,"KernelSum","rusty_machine::learning::toolkit::kernel","The sum of two kernels",null,null],[3,"KernelProd","","The pointwise product of two kernels",null,null],[3,"KernelArith","","A wrapper tuple struct used for kernel arithmetic",null,null],[12,"0","","",51,null],[3,"Linear","","The Linear Kernel",null,null],[12,"c","","Constant term added to inner product.",52,null],[3,"Polynomial","","The Polynomial Kernel",null,null],[12,"alpha","","Scaling of the inner product.",53,null],[12,"c","","Constant added to inner product.",53,null],[12,"d","","The power to raise the sum to.",53,null],[3,"SquaredExp","","Squared exponential kernel",null,null],[12,"ls","","The length scale of the kernel.",54,null],[12,"ampl","","The amplitude of the kernel.",54,null],[3,"Exponential","","The Exponential Kernel",null,null],[12,"ls","","The length scale of the kernel.",55,null],[12,"ampl","","The amplitude of the kernel.",55,null],[3,"HyperTan","","The Hyperbolic Tangent Kernel.",null,null],[12,"alpha","","The scaling of the inner product.",56,null],[12,"c","","The constant to add to the inner product.",56,null],[3,"Multiquadric","","The Multiquadric Kernel.",null,null],[12,"c","","Constant added to square of difference.",57,null],[3,"RationalQuadratic","","The Rational Quadratic Kernel.",null,null],[12,"alpha","","Controls inverse power and difference scale.",58,null],[12,"ls","","Length scale controls scale of difference.",58,null],[8,"Kernel","","The Kernel trait",null,null],[10,"kernel","","The kernel function.",59,null],[11,"fmt","","",60,null],[11,"kernel","","",60,null],[11,"fmt","","",61,null],[11,"kernel","","",61,null],[11,"fmt","","",51,null],[11,"add","","",51,null],[11,"mul","","",51,null],[11,"fmt","","",52,null],[11,"clone","","",52,null],[11,"new","","Constructs a new Linear Kernel.",52,{"inputs":[{"name":"f64"}],"output":{"name":"linear"}}],[11,"default","","",52,{"inputs":[],"output":{"name":"linear"}}],[11,"kernel","","",52,null],[11,"fmt","","",53,null],[11,"clone","","",53,null],[11,"new","","Constructs a new Polynomial Kernel.",53,{"inputs":[{"name":"f64"},{"name":"f64"},{"name":"f64"}],"output":{"name":"polynomial"}}],[11,"default","","",53,{"inputs":[],"output":{"name":"polynomial"}}],[11,"kernel","","",53,null],[11,"fmt","","",54,null],[11,"clone","","",54,null],[11,"new","","Construct a new squared exponential kernel.",54,{"inputs":[{"name":"f64"},{"name":"f64"}],"output":{"name":"squaredexp"}}],[11,"default","","",54,{"inputs":[],"output":{"name":"squaredexp"}}],[11,"kernel","","The squared exponential kernel function.",54,null],[11,"fmt","","",55,null],[11,"clone","","",55,null],[11,"new","","Construct a new squared exponential kernel.",55,{"inputs":[{"name":"f64"},{"name":"f64"}],"output":{"name":"exponential"}}],[11,"default","","",55,{"inputs":[],"output":{"name":"exponential"}}],[11,"kernel","","The squared exponential kernel function.",55,null],[11,"fmt","","",56,null],[11,"clone","","",56,null],[11,"new","","Constructs a new Hyperbolic Tangent Kernel.",56,{"inputs":[{"name":"f64"},{"name":"f64"}],"output":{"name":"hypertan"}}],[11,"default","","",56,{"inputs":[],"output":{"name":"hypertan"}}],[11,"kernel","","",56,null],[11,"fmt","","",57,null],[11,"clone","","",57,null],[11,"new","","Constructs a new Multiquadric Kernel.",57,{"inputs":[{"name":"f64"}],"output":{"name":"multiquadric"}}],[11,"default","","",57,{"inputs":[],"output":{"name":"multiquadric"}}],[11,"kernel","","",57,null],[11,"fmt","","",58,null],[11,"clone","","",58,null],[11,"new","","Constructs a new Rational Quadratic Kernel.",58,{"inputs":[{"name":"f64"},{"name":"f64"}],"output":{"name":"rationalquadratic"}}],[11,"default","","",58,{"inputs":[],"output":{"name":"rationalquadratic"}}],[11,"kernel","","",58,null],[0,"cost_fn","rusty_machine::learning::toolkit","Cost Functions.",null,null],[3,"MeanSqError","rusty_machine::learning::toolkit::cost_fn","The mean squared error cost function.",null,null],[3,"CrossEntropyError","","The cross entropy error cost function.",null,null],[8,"CostFunc","","Trait for cost functions in models.",null,null],[10,"cost","","The cost function.",62,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"f64"}}],[10,"grad_cost","","The gradient of the cost function.",62,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"t"}}],[11,"fmt","","",63,null],[11,"clone","","",63,null],[11,"cost","","",63,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"f64"}}],[11,"grad_cost","","",63,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"matrix"}}],[11,"cost","","",63,{"inputs":[{"name":"vector"},{"name":"vector"}],"output":{"name":"f64"}}],[11,"grad_cost","","",63,{"inputs":[{"name":"vector"},{"name":"vector"}],"output":{"name":"vector"}}],[11,"fmt","","",64,null],[11,"clone","","",64,null],[11,"cost","","",64,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"f64"}}],[11,"grad_cost","","",64,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"matrix"}}],[11,"cost","","",64,{"inputs":[{"name":"vector"},{"name":"vector"}],"output":{"name":"f64"}}],[11,"grad_cost","","",64,{"inputs":[{"name":"vector"},{"name":"vector"}],"output":{"name":"vector"}}],[0,"rand_utils","rusty_machine::learning::toolkit","Utility functions for random functionality.",null,null],[5,"reservoir_sample","rusty_machine::learning::toolkit::rand_utils","```\nuse rusty_machine::learning::toolkit::rand_utils;",null,null],[5,"fisher_yates","","The inside out Fisher-Yates algorithm.",null,null],[5,"in_place_fisher_yates","","The in place Fisher-Yates shuffle.",null,null],[0,"regularization","rusty_machine::learning::toolkit","Regularization Module",null,null],[4,"Regularization","rusty_machine::learning::toolkit::regularization","Model Regularization",null,null],[13,"L1","","L1 Regularization",65,null],[13,"L2","","L2 Regularization",65,null],[13,"ElasticNet","","Elastic Net Regularization (L1 and L2)",65,null],[13,"None","","No Regularization",65,null],[11,"clone","","",65,null],[11,"fmt","","",65,null],[11,"reg_cost","","Compute the regularization addition to the cost.",65,null],[11,"reg_grad","","Compute the regularization addition to the gradient.",65,null],[8,"SupModel","rusty_machine::learning","Trait for supervised model.",null,null],[10,"predict","","Predict output from inputs.",66,null],[10,"train","","Train the model using inputs and targets.",66,null],[8,"UnSupModel","","Trait for unsupervised model.",null,null],[10,"predict","","Predict output from inputs.",67,null],[10,"train","","Train the model using inputs.",67,null]],"paths":[[4,"Axes"],[3,"Matrix"],[3,"MatrixSlice"],[3,"MatrixSliceMut"],[8,"BaseSlice"],[3,"SliceIter"],[3,"SliceIterMut"],[3,"Vector"],[8,"Metric"],[8,"Criterion"],[8,"LinkFunc"],[3,"GenLinearModel"],[3,"Logit"],[3,"Log"],[3,"Identity"],[3,"Bernoulli"],[3,"Binomial"],[3,"Normal"],[3,"Poisson"],[3,"GaussianMixtureModel"],[4,"CovOption"],[3,"LinRegressor"],[3,"LogisticRegressor"],[3,"BaseLogisticRegressor"],[3,"KMeansClassifier"],[4,"InitAlgorithm"],[3,"KMeansClassifierBuilder"],[8,"Criterion"],[3,"NeuralNet"],[3,"BaseNeuralNet"],[3,"BCECriterion"],[3,"MSECriterion"],[3,"GaussianProcess"],[8,"MeanFunc"],[3,"ConstMean"],[3,"SVM"],[8,"Distribution"],[3,"NaiveBayes"],[3,"Gaussian"],[3,"Bernoulli"],[3,"Multinomial"],[3,"GradientDesc"],[3,"StochasticGD"],[3,"AdaGrad"],[3,"ConjugateGD"],[8,"Optimizable"],[8,"OptimAlgorithm"],[8,"ActivationFunc"],[3,"Sigmoid"],[3,"Linear"],[3,"Exp"],[3,"KernelArith"],[3,"Linear"],[3,"Polynomial"],[3,"SquaredExp"],[3,"Exponential"],[3,"HyperTan"],[3,"Multiquadric"],[3,"RationalQuadratic"],[8,"Kernel"],[3,"KernelSum"],[3,"KernelProd"],[8,"CostFunc"],[3,"MeanSqError"],[3,"CrossEntropyError"],[4,"Regularization"],[8,"SupModel"],[8,"UnSupModel"]]}; initSearch(searchIndex);