Lathe.models
— Module| Model Type | Model Name |
|:––––– | ––––– |
| Baseline | MeanBaseline |
| Baseline | ClassBaseline |
| Continuous | LinearRegression |
| Continuous | LinearLeastSquare |
| Categorical | RandomForestClassifier |
| Categorical | DecisionTree |
| Tools | Pipeline |
| Tools | PowerLog |
Lathe.models.LinearRegression
— TypeLinear Regression is a well-known linear function used for predicting continuous features with a mostly linear or semi-linear slope.
==PARAMETERS==
[y] <- Fill with your trainY values. Should be an array of shape (0,1) or (1,0)
[x] <- Fill in with your trainX values. Should be an array of shape (0,1) or (1,0)
==Functions==
predict(xt) <- Returns a prediction from the model based on the xtrain value passed (xt)
Lathe.models.Pipeline
— TypePipeline
Description
Rescales an array. Pipelines can contain a predictable Lathe model with preprocessing that occurs automatically. This is done by putting X array processing methods into the iterable steps, and then putting your Lathe model in.
Input
Positional Arguments
LatheObject :: steps - An infinte argument of LatheObject types. These types are any Lathe model or preprocessor.
Output
Pipeline :: A Pipeline object.
Functions
Pipeline.predict(xt) :: Applies the steps inside of the pipeline to xt.
Data
steps - An array of LatheObject types that are predicted with usng the predict() function call.
Methods
Base.+ - The + operator can be used to add steps to a pipeline.
Pipeline + LatheObject
Base.- - The - operator can be used to remove steps from a pipeline.
Pipeline - Int64(Position in steps)
Lathe.models.RandomForestClassifier
— TypeRandom Forest Classifier
Description
The Random Forest Classifier uses a multitude of decision trees to solve classification problems.
Input
RandomForestClassifier(x, y, rng ; maxdepth = 6, minnoderecords = 1, ntrees = 100)
Positional Arguments
Array{Any} - X:: Array of x's for which the model will use to predict y.
Array{Any} - Y:: Array of y's for which the x's are used to predict.
RandomNumberGenerator - rng:: Determines the seed for the given model.
Key-word Arguments
Int64 - max_depth:: Determines the max depth which the tree should use as a stop parameter.
Int64 - minnoderecords:: Determines the minimum number of nodes a constructed node is allowed to have.
Int64 - n_trees:: Determines how many decision trees should be trained.
Output
model:: A Lathe Model.
Functions
Model.predict(xt) :: Predicts a new y based on the data provided as xt and the weights obtained from X.
Data
storedata :: A tree node type that contains the weights and their corresponding values.
Lathe.models.DecisionTreeClassifier
— FunctionDecision Tree Classifier
Description
The decision tree classifier is a model ideal for solving most classification problems.
Input
DecisionTreeClassifier(x, y, rng ; maxdepth = 6, minnode_records = 1)
Positional Arguments
Array{Any} - X:: Array of x's for which the model will use to predict y.
Array{Any} - Y:: Array of y's for which the x's are used to predict.
RandomNumberGenerator - rng:: Determines the seed for the given model.
Key-word Arguments
Int64 - max_depth:: Determines the max depth which the tree should use as a stop parameter.
Int64 - minnoderecords:: Determines the minimum number of nodes a constructed node is allowed to have.
Output
model:: A Lathe Model.
Functions
Model.predict(xt) :: Predicts a new y based on the data provided as xt and the weightsz obtained from X.
Data
storedata :: A tree node type that contains the weights and their corresponding values.
Lathe.models.LinearLeastSquare
— MethodLeast Square regressors are ideal for predicting continous features.
x = [7,6,5,6,5]
y = [3.4.5.6.3]
xtrain = [7,5,4,5,3,5,7,8]
Type = :LIN
model = models.LeastSquare(x,y,Type)
y_pred = models.predict(model,xtrain)
HYPER PARAMETERS
==Functions==
predict(xt) <- Returns a prediction from the model based on the xtrain value passed (xt)
Lathe.models.LogisticRegression
— FunctionMajority class baseline is used to find the most often interpreted classification in an array.
==PARAMETERS==
[X] <- Fill with your trainX values. Should be an array of shape (0,1) or (1,0)
[y] <- Fill with your trainy values. Should be an array of shape (0,1) or (1,0)
λ = .0001 <- Lambda Value
fit_intercept = true <- Boolean determines whether to fit an intercept.
max_iter = 1000 <- Determines the maximum number of iterations for the model to perform.
==Functions==
predict(xt) <- Returns a prediction from the model based on the xtrain value passed (xt)
Lathe.models.MeanBaseline
— MethodA mean baseline is great for getting a basic accuracy score in order to make a valid direction for your model.
==PARAMETERS==
[y] <- Fill with your trainY values. Should be an array of shape (0,1) or (1,0)
pipl = Pipeline([StandardScalar(),LinearRegression(trainX,trainy)])
==Functions==
predict(xt) <- Returns a prediction from the model based on the xtrain value passed (xt)
Lathe.models.PowerLog
— MethodA powerlog can be used to perform a one-tailed test, as well as get the proper sample size for a testing population.
==PARAMETERS==
p1 <- A Float64 percentage representing the probability of scenario one.
p2 <- A Float64 percentage representing the probability of scenario two. These two probability values should follow these guidelines: p1 = p1 + x = p2
alpha = 0.05 <- Sets an alpha value
Returns power, sample_size
Lathe.models.ClassBaseline
— MethodMajority class baseline is used to find the most often interpreted classification in an array.
==PARAMETERS==
[y] <- Fill with your trainY values. Should be an array of shape (0,1) or (1,0)
==Functions==
predict(xt) <- Returns a prediction from the model based on the xtrain value passed (xt)
counts() <- Returns a dictionary with the counts of all inserted keys.
highest() <- Will return a Dictionary key with the count as well as the value for the most interpreted classification.
Lathe.models.feature_best_split
— Methodfeature_best_split
For a given feature search best split value.