var searchIndex = {}; searchIndex["rusty_machine"] = {"doc":"# The rusty-machine crate.","items":[[0,"linalg","rusty_machine","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],[11,"new","","Constructor for Matrix struct.",0,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"vec"}],"output":{"name":"matrix"}}],[11,"rows","","Returns the number of rows in the Matrix.",0,null],[11,"cols","","Returns the number of columns in the Matrix.",0,null],[11,"data","","Returns a non-mutable reference to the underlying data.",0,null],[11,"into_vec","","Consumes the Matrix and returns the Vec of data.",0,null],[11,"clone","","Clones the Matrix.",0,null],[11,"select_rows","","Select rows from matrix",0,null],[11,"select_cols","","Select columns from matrix",0,null],[11,"hcat","","Horizontally concatenates two matrices. With self on the left.",0,null],[11,"vcat","","Vertically concatenates two matrices. With self on top.",0,null],[11,"diag","","Extract the diagonal of the matrix",0,null],[11,"apply","","Applies a function to each element in the matrix.",0,null],[11,"zeros","","Constructs matrix of all zeros.",0,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"matrix"}}],[11,"ones","","Constructs matrix of all ones.",0,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"matrix"}}],[11,"identity","","Constructs the identity matrix.",0,{"inputs":[{"name":"usize"}],"output":{"name":"matrix"}}],[11,"from_diag","","Constructs matrix with given diagonal.",0,null],[11,"transpose","","Tranposes the given matrix",0,null],[11,"is_diag","","Checks if matrix is diagonal.",0,null],[11,"sum_rows","","The sum of the rows of the matrix.",0,null],[11,"sum_cols","","The sum of the columns of the matrix.",0,null],[11,"sum","","The sum of all elements in the matrix",0,null],[11,"elemul","","The elementwise product of two matrices.",0,null],[11,"elediv","","The elementwise division of two matrices.",0,null],[11,"mean","","The mean of the matrix along the specified axis.",0,null],[11,"variance","","The variance of the matrix along the specified axis.",0,null],[11,"solve","","Solves the equation Ax = y.",0,null],[11,"inverse","","Computes the inverse of the matrix.",0,null],[11,"det","","Computes the determinant of the matrix.",0,null],[11,"lup_decomp","","Computes L, U, and P for LUP decomposition.",0,null],[11,"cholesky","","Cholesky decomposition",0,null],[11,"mul","","",0,null],[11,"mul","","",0,null],[11,"mul","","",0,null],[11,"mul","","",0,null],[11,"mul","","",0,null],[11,"mul","","",0,null],[11,"add","","",0,null],[11,"add","","",0,null],[11,"add","","",0,null],[11,"add","","",0,null],[11,"sub","","",0,null],[11,"sub","","",0,null],[11,"sub","","",0,null],[11,"sub","","",0,null],[11,"div","","",0,null],[11,"div","","",0,null],[11,"neg","","",0,null],[11,"index","","",0,null],[11,"norm","","Compute euclidean norm for matrix.",0,null],[0,"vector","rusty_machine::linalg","The vector module.",null,null],[3,"Vector","rusty_machine::linalg::vector","The Vector struct.",null,null],[11,"new","","Constructor for Vector struct.",1,{"inputs":[{"name":"vec"}],"output":{"name":"vector"}}],[11,"size","","Returns the size of the Vector.",1,null],[11,"data","","Returns a non-mutable reference to the underlying data.",1,null],[11,"into_vec","","Consumes the Vector and returns the Vec of data.",1,null],[11,"clone","","Clones the Vector.",1,null],[11,"apply","","Applies a function to each element in the vector.",1,null],[11,"argmax","","Find the argmax of the Vector.",1,null],[11,"argmin","","Find the argmin of the Vector.",1,null],[11,"zeros","","Constructs Vector of all zeros.",1,{"inputs":[{"name":"usize"}],"output":{"name":"vector"}}],[11,"ones","","Constructs Vector of all ones.",1,{"inputs":[{"name":"usize"}],"output":{"name":"vector"}}],[11,"dot","","Compute dot product with specified Vector.",1,null],[11,"sum","","The sum of the vector.",1,null],[11,"elemul","","The elementwise product of two vectors.",1,null],[11,"elediv","","The elementwise division of two vectors.",1,null],[11,"mean","","The mean of the vector.",1,null],[11,"variance","","The variance of the vector.",1,null],[11,"mul","","",1,null],[11,"mul","","",1,null],[11,"div","","",1,null],[11,"div","","",1,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"neg","","",1,null],[11,"index","","",1,null],[11,"norm","","Compute euclidean norm for vector.",1,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,"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,"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.",2,null],[0,"learning","rusty_machine","Module for machine learning.",null,null],[0,"lin_reg","rusty_machine::learning","Linear Regression module",null,null],[3,"LinRegressor","rusty_machine::learning::lin_reg","Linear Regression Model.",null,null],[12,"b","","The mle for the beta parameters.",3,null],[11,"train","","Train the linear regression model.",3,null],[11,"predict","","Predict output value from input data.",3,null],[11,"new","","Constructs untrained linear regression model.",3,{"inputs":[],"output":{"name":"linregressor"}}],[0,"k_means","rusty_machine::learning","K-means Classification",null,null],[3,"KMeansClassifier","rusty_machine::learning::k_means","K-Means Classification model.",null,null],[12,"iters","","Max iterations of algorithm to run.",4,null],[12,"k","","The number of classes.",4,null],[12,"centroids","","The fitted centroids .",4,null],[12,"init_algorithm","","The initial algorithm to use.",4,null],[4,"InitAlgorithm","","Initialization Algorithm enum.",null,null],[13,"Forgy","","The Forgy initialization scheme.",5,null],[13,"RandomPartition","","The Random Partition initialization scheme.",5,null],[13,"KPlusPlus","","The K-means ++ initialization scheme.",5,null],[11,"predict","","Predict classes from data.",4,null],[11,"train","","Train the classifier using input data.",4,null],[11,"new","","Constructs untrained k-means classifier model.",4,{"inputs":[{"name":"usize"}],"output":{"name":"kmeansclassifier"}}],[0,"nnet","rusty_machine::learning","Neural Network module",null,null],[3,"NeuralNet","rusty_machine::learning::nnet","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.",6,null],[16,"Cost","","The cost function for the criterion.",6,null],[11,"activate","","The activation function applied to a matrix.",6,null],[11,"grad_activ","","The gradient of the activation function applied to a matrix.",6,null],[11,"cost","","The cost function.",6,null],[11,"cost_grad","","The gradient of the cost function.",6,null],[11,"default","","Creates a neural network with the specified layer sizes.",7,null],[11,"new","","Create a new neural network with the specified layer sizes.",7,null],[11,"get_net_weights","","Gets matrix of weights between specified layer and forward layer.",7,null],[11,"compute_grad","","Compute the gradient of the neural network.",7,null],[11,"predict","","Predict neural network output using forward propagation.",7,null],[11,"train","","Train the model using gradient optimization and back propagation.",7,null],[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.",8,null],[8,"MeanFunc","","Trait for GP mean functions.",null,null],[10,"func","","Compute the mean function applied elementwise to a matrix.",9,null],[11,"default","","Constructs the zero function.",10,{"inputs":[],"output":{"name":"constmean"}}],[11,"func","","",10,null],[11,"default","","Construct a default Gaussian Process",8,{"inputs":[],"output":{"name":"gaussianprocess"}}],[11,"new","","Construct a new Gaussian Process.",8,{"inputs":[{"name":"t"},{"name":"u"},{"name":"f64"}],"output":{"name":"gaussianprocess"}}],[11,"predict","","Predict output from data.",8,null],[11,"train","","Train the model using data and outputs.",8,null],[11,"get_posterior","","Compute the posterior distribution [UNSTABLE]",8,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],[12,"alpha","","The step-size for the gradient descent steps.",11,null],[12,"iters","","The number of iterations to run.",11,null],[11,"default","","Constructs a gradient descent algorithm\nwith default settings.",11,{"inputs":[],"output":{"name":"gradientdesc"}}],[11,"new","","Construct a gradient descent algorithm.",11,{"inputs":[{"name":"f64"},{"name":"usize"}],"output":{"name":"gradientdesc"}}],[11,"optimize","","",11,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.",12,null],[12,"sig","","Constant in the Wolfe-Powell conditions.",12,null],[12,"int","","Don't reevaluate within `int` of the limit of the current bracket.",12,null],[12,"ext","","Extrapolate max of `ext` times the current bracket.",12,null],[12,"max","","Max of `max` function evaluations per line search",12,null],[12,"ratio","","The maximum allowed slope ratio",12,null],[12,"iters","","The default number of max iterations.",12,null],[11,"default","","",12,{"inputs":[],"output":{"name":"conjugategd"}}],[11,"optimize","","",12,null],[8,"Optimizable","rusty_machine::learning::optim","Trait for models which can be gradient-optimized.",null,null],[16,"Data","","The input data type to the model.",13,null],[16,"Target","","The target data type to the model.",13,null],[10,"compute_grad","","Compute the gradient for the model.",13,null],[8,"OptimAlgorithm","","Trait for optimization algorithms.",null,null],[10,"optimize","","Return the optimized parameter using gradient optimization.",14,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.",15,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[10,"func_grad","","The gradient of the activation function.",15,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[10,"func_inv","","The inverse of the activation function.",15,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func","","Sigmoid function.",16,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","Gradient of sigmoid function.",16,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",16,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func","","",17,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",17,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",17,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func","","",18,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_grad","","",18,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[11,"func_inv","","",18,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[0,"kernel","rusty_machine::learning::toolkit","Module for kernels",null,null],[3,"SquaredExp","rusty_machine::learning::toolkit::kernel","Squared exponential kernel",null,null],[8,"Kernel","","The Kernel trait",null,null],[10,"kernel","","The kernel function.",19,null],[11,"new","","Construct a new squared exponential kernel.",20,{"inputs":[{"name":"f64"},{"name":"f64"}],"output":{"name":"squaredexp"}}],[11,"default","","Constructs the default Squared Exp kernel.",20,{"inputs":[],"output":{"name":"squaredexp"}}],[11,"kernel","","The squared exponential kernel function.",20,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.",21,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"f64"}}],[10,"grad_cost","","The gradient of the cost function.",21,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"t"}}],[11,"cost","","",22,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"f64"}}],[11,"grad_cost","","",22,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"matrix"}}],[11,"cost","","",23,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"f64"}}],[11,"grad_cost","","",23,{"inputs":[{"name":"matrix"},{"name":"matrix"}],"output":{"name":"matrix"}}],[8,"SupModel","rusty_machine::learning","Trait for supervised model.",null,null],[10,"predict","","Predict output from data.",24,null],[10,"train","","Train the model using data and outputs.",24,null],[8,"UnSupModel","","Trait for unsupervised model.",null,null],[10,"predict","","Predict output from data.",25,null],[10,"train","","Train the model using data.",25,null]],"paths":[[3,"Matrix"],[3,"Vector"],[8,"Metric"],[3,"LinRegressor"],[3,"KMeansClassifier"],[4,"InitAlgorithm"],[8,"Criterion"],[3,"NeuralNet"],[3,"GaussianProcess"],[8,"MeanFunc"],[3,"ConstMean"],[3,"GradientDesc"],[3,"ConjugateGD"],[8,"Optimizable"],[8,"OptimAlgorithm"],[8,"ActivationFunc"],[3,"Sigmoid"],[3,"Linear"],[3,"Exp"],[8,"Kernel"],[3,"SquaredExp"],[8,"CostFunc"],[3,"MeanSqError"],[3,"CrossEntropyError"],[8,"SupModel"],[8,"UnSupModel"]]}; initSearch(searchIndex);