Things highlighted in this color will be converted to code blocks.

This is the documentation for running Taiyo-utils’ models package. It can be found in src/taiyo_utils/models

The models package consists of the following files and folders:

  • BaseModel
  • Classical_models
  • Neural_network
  • Linear_model
  • Classifiers
  • Ensembles
class taiyo_utils.models.IndexerModel()

This is an abstract class that is used as a parent class for all model abstractions

build_model(self, *args, **kwargs)
compile_model(self, *args, **kwargs)
fit_model(self, *args, **kwargs)
get_model(self)
get_params(self)
load_model(self, weights_path)
predict(self, *args, **kwargs)
save_model(self, weights_path)

Classical Models

taiyo_utils.models.classical_models
class IndexerDecisionTree(min_samples_leaf)

Decision Tree class Implementation.

Arguments:

  • args: min_samples_leaf

Returns:

  • a Decision tree model based on inputs
class IndexerLogisticRegression(regularization_value)

Logistic Regression class Implementation.

Arguments:

  • args: regularization_value

Returns:

  • a logistic regression model based on inputs
class SKLearnBaseEstimator(args, kwargs)

Base SK Learn Model class Implementation.

Arguments:

  • args: (Dict) arguements of the base model
  • kwargs: (Dict) kwargs of the base model

Returns:

None

toBaseModel
toDecisionTree
toLogisticRegression
class taiyo_utils.models.classical_models.IndexerDecisionTree(min_samples_leaf)

Decision Tree class Implementation.

Arguments:

  • args: min_samples_leaf

Returns:

  • a Decision tree model based on inputs
build_model(self)

Method to build the model based on the inputs when the class is instantiated.

compile_model(self, *args, **kwargs)
fit_model(self, x, y, **kwargs)

Method to fit the model to data provided

Args:

  • xtrain (list(float/int)): inputs to train on
  • ytrain (list(float/int)): outputs to train on
get_model(self, weights_path)

Method to return the model

Returns:

  • SK Learn Model: Designed Model
get_params(self)

Method to return the parameters of the model

Returns:

  • SK Learn Model Summary: Model Summary
load_model(*args, **kwargs)
predict(self, X)

Method to provide predictions from the model

param X_test:

  • test values on which to predict

return:

  • predicted values
save_model(self, weights_path)
class taiyo_utils.models.classical_models.IndexerLogisticRegression(regularization_value)

Logistic Regression class Implementation.

Arguments:

  • args: regularization_value

Returns:

  • a logistic regression model based on inputs
build_model(self)

Method to build the model based on the inputs when the class is instantiated.

compile_model(self, *args, **kwargs)
fit_model(self, x, y, **kwargs)

Method to fit the model to data provided

Args:

  • xtrain (list(float/int)): inputs to train on
  • ytrain (list(float/int)): outputs to train on
get_model(self, weights_path)

Method to return the model

Returns:

  • SK Learn Model: Designed Model
get_params(self)

Method to return the parameters of the model

Returns:

  • SK Learn Model Summary: Model Summary
load_model(*args, **kwargs)
predict(self, X)

Method to provide predictions from the model

param X_test:

  • test values on which to predict

return:

  • predicted values
save_model(self, weights_path)
  • tobasemodel.py contains SklearnBaseEstimator class
  • toDecisionTree.py contains Decision tree class
  • toLogisticRegression.py contains Logistic Regression class

Neural Networks

taiyo_utils.models.neural_network
class IndexerBDLSTM(input_shape, neurons, dropouts, activations)

Implementation of Bidirectional LSTM

class IndexerConvBDLSTM(input_shape, neurons, dropouts, activations, network_width, conv_depth, kernel_size, num_lstmunits)

Implementation of 1D Conv + BDLSTM Model input_shape: shape of input data, (n_memory_steps, n_in_features) network_width : The number of parellel 1D conv - BDLSTM units conv_depth : The number of 1D conv + Maxpool layers before the BDLSTM num_lstmunits : Number of LSTM units in the BDLSTM kernel_size : The kernel_size in the 1D Conv layers (The most important parameter, ideally should be 9)

(1D Conv -- MaxPool1D) -- (1D Conv -- MaxPool1D) -- (1D Conv -- MaxPool1D) -- ... -- (BDLSTM -- Dropout - Dense) (1D Conv -- MaxPool1D) -- (1D Conv -- MaxPool1D) -- (1D Conv -- MaxPool1D) -- ... -- (BDLSTM -- Dropout - Dense) . . Concat -- Dense . (1D Conv -- MaxPool1D) -- (1D Conv -- MaxPool1D) -- (1D Conv -- MaxPool1D) -- ... -- (BDLSTM -- Dropout - Dense) /

class IndexerDilatedConv(input_shape, neurons, dropouts, activations, n_filters, filter_width)

===== Model Architecture ===== 16 dilated causal convolutional blocks Preprocessing and postprocessing (time distributed) fully connected layers (convolutions with filter width 1): 16 output units

32 filters of width 2 per block Exponentially increasing dilation rate with a reset (1, 2, 4, 8, ..., 128, 1, 2, ..., 128) Gated activations

Residual and skip connections 2 (time distributed) fully connected layers to map sum of skip outputs to final output

neurons (any int .ie 8) so the the model looks like [1,2,4,..2^8,1,2,4,..2^8] Note : Some activations are fixed and not meant to be changed.

class IndexerEncoderDecoderRNN(input_shape, output_shape, neurons, dropouts, activations, cell)

Implementation of Encoder Decoder RNN model without teacher forcing input_shape: shape of input data, (n_memory_steps, n_in_features) output_shape: shape of output data, (n_forcast_steps, n_out_features) cell: cell in the RNN part, 'SimpleRNN' / 'LSTM' / 'GRU' cell_units: number of hidden cell unit in RNN part, integer, e.g. 100 dense_units: units of the hidden dense layers, a tuple, e.g, (20,30)

class IndexerGRU(input_shape, neurons, dropouts, activations)

Gated Recurrent Network Implementation

class IndexerLSTM(input_shape, neurons, dropouts, activations, r_dropouts)

Long Short Term Memory class abstraction

Args: r_dropouts (list(float)): list of doubles (0 - 1) of length neurons - 1 defining the dropout at each level - do not include the final layer

class IndexerMLP(hidden_layer_sizes=2, activation='relu', solver='lbfgs', max_iter=200)

Initialising variables

Args:

  • length (int): length of the input array - part of the definition of the first layer shape
  • numAttr (int): number of attributes - second part of the definition of the first layer shape
  • neurons (int): array of ints defining the number of neurons in each layer and the number of layers (by the length of the array) - Do not include the final layer
  • dropouts (list(float)): array of doubles (0 - 1) of length neurons - 1 defining the dropout at each level - do not include the final layer
  • activations (list(str)): array of strings of length neurons to define the activation of each layer - do not include the final layer
class IndexerRNN(input_shape, neurons, dropouts, activations)

Base RNN class Implementation.

Args: input_shape tuple(int, int): A tuple of (length of sequence, number of features) neurons List[int]: array of ints defining the number of neurons in each layer and the number of layers (by the length of the array) - Do not include the final layer dropouts List[float]: array of doubles (0 - 1) of length neurons - 1 defining the dropout at each level - do not include the final layer activations List[str]: array of strings of length neurons to define the activation of each layer - do not include the final layer

class IndexerRNNDense(input_shape, output_shape, neurons, dropouts, activations, cell, dense_units)

Implementation of RNN + Dense Layer Model input_shape: shape of input data, (n_memory_steps, n_in_features) output_shape: shape of output data, (n_forcast_steps, n_out_features) cell: cell in the RNN part, 'SimpleRNN' / 'LSTM' / 'GRU' neurons: number of hidden cell unit in RNN part, integer, e.g. 100 dense_units: units of the hidden dense layers, a tuple, e.g, (20,30)

class IndexerRNNHiddenDense(input_shape, output_shape, neurons, dropouts, activations, cell, dense_units, stack_size)

Implementation of Stacked RNN + Dense Layer Model, here the hidden states go to the dense layers

input_shape: shape of input data, (n_memory_steps, n_in_features) output_shape: shape of output data, (n_forcast_steps, n_out_features) cell: cell in the RNN part, 'SimpleRNN' / 'LSTM' / 'GRU' cell_units: number of hidden cell unit in RNN part, integer, e.g. 100 dense_units: units of the hidden dense layers, a tuple, e.g, (20,30) stack_size : The size of the stack of RNN layers before the dense ones.

class IndexerSimpleRNN(input_shape, neurons, dropouts, activations)

SimpleRNN model using RNN Layers

toIndexerNN
toIndexerRNN

Recurrent Neural Netwrorks

This Class consists of all the classes used for building Recurrent neural network models. Any variations of Recurrent networks should be added here.

class taiyo_utils.models.neural_network.IndexerRNN(input_shape, neurons, dropouts, activations)

Base RNN class Implementation.

Args: input_shape tuple(int, int): A tuple of (length of sequence, number of features) neurons List[int]: array of ints defining the number of neurons in each layer and the number of layers (by the length of the array) - Do not include the final layer dropouts List[float]: array of doubles (0 - 1) of length neurons - 1 defining the dropout at each level - do not include the final layer activations List[str]: array of strings of length neurons to define the activation of each layer - do not include the final layer

build_model(self, *args, **kwargs)
compile_model(self, loss='mse', optimizer='rmsprop', metrics=['mean_squared_error'], **kwargs)

Method to compile the model using the parameters given by the inputs to the method

Args: loss (str): the loss functions to use in the compilation optimizer (str): the optimizer to use in the compilation metrics (list(str)): list of metrics to use in the compilation shuffle (bool): boolean to shuffle values in fitting

fit_model(self, x, y, epochs, n_splits, batch_size, verbose, **kwargs)

Method to fit the model to data provided

Args: xtrain (list(float/int)): inputs to train on ytrain (list(float/int)): outputs to train on epochs (int): number of epochs to train the model batchSize (int): size of batches on which to train the model verbose (bool): boolean (0, 1) value to control the verbosity of the fitting

get_model(self)

Method to return the model

Returns: Keras Model: Designed Model

get_params(self)

Method to return the parameters of the model

Returns: Keras Model Summary: Model Summary

load_model(*args, **kwargs)
predict(self, X)

Method to provide predictions from the model

Args: x (list(ints/float)): values on which to predict

Returns: list of ints/float:predicted values

save_model(*args, **kwargs)
class taiyo_utils.models.neural_network.IndexerSimpleRNN(input_shape, neurons, dropouts, activations)

SimpleRNN model using RNN Layers

build_model(self)

Method to build the model graph

compile_model(self, loss='mse', optimizer='rmsprop', metrics=['mean_squared_error'], **kwargs)

Method to compile the model using the parameters given by the inputs to the method

Args: loss (str): the loss functions to use in the compilation optimizer (str): the optimizer to use in the compilation metrics (list(str)): list of metrics to use in the compilation shuffle (bool): boolean to shuffle values in fitting

fit_model(self, x, y, epochs, n_splits, batch_size, verbose, **kwargs)

Method to fit the model to data provided

Args: xtrain (list(float/int)): inputs to train on ytrain (list(float/int)): outputs to train on epochs (int): number of epochs to train the model batchSize (int): size of batches on which to train the model verbose (bool): boolean (0, 1) value to control the verbosity of the fitting

get_model(self)

Method to return the model

Returns: Keras Model: Designed Model

get_params(self)

Method to return the parameters of the model

Returns: Keras Model Summary: Model Summary

load_model(*args, **kwargs)
predict(self, X)

Method to provide predictions from the model

Args: x (list(ints/float)): values on which to predict

Returns: list of ints/float:predicted values

save_model(*args, **kwargs)
class taiyo_utils.models.neural_network.IndexerLSTM(input_shape, neurons, dropouts, activations, r_dropouts)

Long Short Term Memory class abstraction

Args: r_dropouts (list(float)): list of doubles (0 - 1) of length neurons - 1 defining the dropout at each level - do not include the final layer

build_model(self)

Method to build the model graph.

compile_model(self, loss='mse', optimizer='rmsprop', metrics=['mean_squared_error'], **kwargs)

Method to compile the model using the parameters given by the inputs to the method

Args: loss (str): the loss functions to use in the compilation optimizer (str): the optimizer to use in the compilation metrics (list(str)): list of metrics to use in the compilation shuffle (bool): boolean to shuffle values in fitting

fit_model(self, x, y, epochs, n_splits, batch_size, verbose, **kwargs)

Method to fit the model to data provided

Args: xtrain (list(float/int)): inputs to train on ytrain (list(float/int)): outputs to train on epochs (int): number of epochs to train the model batchSize (int): size of batches on which to train the model verbose (bool): boolean (0, 1) value to control the verbosity of the fitting

get_model(self)

Method to return the model

Returns: Keras Model: Designed Model

get_params(self)

Method to return the parameters of the model

Returns: Keras Model Summary: Model Summary

load_model(*args, **kwargs)
predict(self, X)

Method to provide predictions from the model

Args: x (list(ints/float)): values on which to predict

Returns: list of ints/float:predicted values

save_model(*args, **kwargs)
class taiyo_utils.models.neural_network.IndexerBDLSTM(input_shape, neurons, dropouts, activations)

Implementation of Bidirectional LSTM

build_model(self)

Method to build the model graph

compile_model(self, loss='mse', optimizer='rmsprop', metrics=['mean_squared_error'], **kwargs)

Method to compile the model using the parameters given by the inputs to the method

Args: loss (str): the loss functions to use in the compilation optimizer (str): the optimizer to use in the compilation metrics (list(str)): list of metrics to use in the compilation shuffle (bool): boolean to shuffle values in fitting

fit_model(self, x, y, epochs, n_splits, batch_size, verbose, **kwargs)

Method to fit the model to data provided

Args: xtrain (list(float/int)): inputs to train on ytrain (list(float/int)): outputs to train on epochs (int): number of epochs to train the model batchSize (int): size of batches on which to train the model verbose (bool): boolean (0, 1) value to control the verbosity of the fitting

get_model(self)

Method to return the model

Returns: Keras Model: Designed Model

get_params(self)

Method to return the parameters of the model

Returns: Keras Model Summary: Model Summary

load_model(*args, **kwargs)
predict(self, X)

Method to provide predictions from the model

Args: x (list(ints/float)): values on which to predict

Returns: list of ints/float:predicted values

save_model(*args, **kwargs)
class taiyo_utils.models.neural_network.IndexerGRU(input_shape, neurons, dropouts, activations)

Gated Recurrent Network Implementation

build_model(self)

Method to build the model graph

compile_model(self, loss='mse', optimizer='rmsprop', metrics=['mean_squared_error'], **kwargs)

Method to compile the model using the parameters given by the inputs to the method

Args: loss (str): the loss functions to use in the compilation optimizer (str): the optimizer to use in the compilation metrics (list(str)): list of metrics to use in the compilation shuffle (bool): boolean to shuffle values in fitting

fit_model(self, x, y, epochs, n_splits, batch_size, verbose, **kwargs)

Method to fit the model to data provided

Args: xtrain (list(float/int)): inputs to train on ytrain (list(float/int)): outputs to train on epochs (int): number of epochs to train the model batchSize (int): size of batches on which to train the model verbose (bool): boolean (0, 1) value to control the verbosity of the fitting

get_model(self)

Method to return the model

Returns: Keras Model: Designed Model

get_params(self)

Method to return the parameters of the model

Returns: Keras Model Summary: Model Summary

load_model(*args, **kwargs)
model
predict(self, X)

Method to provide predictions from the model

Args: x (list(ints/float)): values on which to predict

Returns: list of ints/float:predicted values

save_model(*args, **kwargs)

Classifiers

class taiyo_utils.models.classifiers.AdaBoost(data, random_state_value=None, test_value=None)

AdaBoost class Implementation

build_model(self, data, test_value, random_state_value)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
processData(self)

This method pre-processes the data and return the data

score(self, X_test, y_test, y_pred)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.DecisionTree(min_samples_leaf)

Decision tree classifier class

build_model(self)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)

Method to provide predictions from the model

Args:

  • param X_test: test values on which to predict

Returns:

  • predicted values
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.RandomForest(min_samples_split, n_estimators, max_features)

Random forest class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated. Please enter appropriate features before running it

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.SVM(kernel, C, gamma)

Support vector machine class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated. Please enter appropriate features before running it

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.Voting(kernel, C, gamma, voting, min_samples_split, n_estimators, max_features)

Voting classifier class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated. Please enter appropriate features before running it

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.XGBoost(n_estimators, max_depth, learning_rate, objective)

XGBoost classifier class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.GradientBoosting(data, random_state_value=None, test_value=None)

Gradient Boosting classifier class Implementation

build_model(self, data, test_value, random_state_value)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
processData(self)

This method pre-processes the data and return the data

score(self, X_test, y_test, y_pred)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.KNeighbors(data, random_state_value=None, test_value=None)
build_model(self, data, test_value, random_state_value)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on
processData(self)

This method pre-processes the data and return the data

score(self, X_test, y_test, y_pred)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.LightGBM()

LightGBM classifier class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated. Please enter appropriate features before running it

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:


  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.LogisticRegression(regularization_value)

Logistic Regression classifier class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)

Method to provide predictions from the model

Args:

  • param X_test: test values on which to predict

Returns:

  • predicted values
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

class taiyo_utils.models.classifiers.NaiveBayes()

Naive Bayes classifier class Implementation

build_model(self)

Method to build the model based on the inputs when the class is instantiated.

fit_model(self, X_train, y_train)

Method to fit the model to data provided

Args:

  • param xtrain: inputs to train on
  • param ytrain: outputs to train on

Returns:

  • a fitted model
predict(self, X_test)

Method to provide predictions from the model

Args:

  • param X_test: test values on which to predict

Returns:

  • predicted values
score(self, y_test)

Method to check accuracy , recall ,precision score and confusion matrix

Linear Models

class taiyo_utils.models.linear_model.IndexerNF(shift)

Base stats api model (Naive forecaster) class Implementation.

Args:

  • data: dataframe that contains the data

Returns:

  • a Naive forcaster model
build_model(self, *args, **kwargs)
compile_model(self)
fit_model(self, x, y, **kwargs)
get_model(self)
get_params(self)
load_model(self, weights_path)
predict(self, X)

Method to provide predictions from the model

Args:

  • param X_test: test values on which to predict

Returns:

  • predicted values
save_model(self, weights_path)
class taiyo_utils.models.linear_model.IndexerMA(days)

Base stats api model (Moving Average) class Implementation.

Args:

  • data: dataframe that contains the data

Returns:

  • a moving average model
build_model(self, *args, **kwargs)
compile_model(self)
fit_model(self, x, y, **kwargs)
get_model(self)
get_params(self)
load_model(self, weights_path)
predict(self, X)

Method to provide predictions from the model

Args:

  • param X_test: test values on which to predict

Returns:

  • predicted values
save_model(self, weights_path)
class taiyo_utils.models.linear_model.IndexerARIMA(order, *args, **kwargs)

Base stats api model (ARIMA) class Implementation.

Args:

  • data: dataframe that contains the data

Returns:

  • a ARIMA model
build_model(self, *args, **kwargs)

Method to build the model based on the inputs when the class is instantiated.

compile_model(self)
fit_model(self, y_train, y_test, **kwargs)

Method to fit the model to data provided

Args:

  • xtrain (list(float/int)): inputs to train on
  • ytrain (list(float/int)): outputs to train on

Returns:

  • a fitted model
get_model(self, weights_path)
get_params(self)
load_model(self, weights_path)
predict(self, X)
save_model(self, weights_path)
class taiyo_utils.models.linear_model.IndexerIdentity()

Base stats api model class Implementation.

Args:

  • data: dataframe that contains the data

Returns:

  • a stats api model
build_model(self, *args, **kwargs)
compile_model(self)
fit_model(self, x, y, **kwargs)
get_model(self)
get_params(self)
load_model(self, weights_path)
predict(self, X)

Method to provide predictions from the model

Args:

  • param X_test: test values on which to predict

Returns:

  • predicted values
save_model(self, weights_path)

Ensembles (Meta Learners)

class taiyo_utils.models.ensembles.IndexerBagging(model, n_estimators=10)

Method to assign variables when the class is called.

Args: model (Keras Model): Taiyo_ model class instances from the Repo n_estimators (int): the number of estimators for the bagging model.the 10 means ten models of the param model will me made and the results will be combined in a weighted average fashion

build_model(self, loss=, optimizer='rmsprop', metrics=[, , , ])

Method to compile the models using the parameters given by the inputs to the method

Args: loss (Keras Losses Value): the loss functions to use in the compilation optimizer (str): the optimizer to use in the compilation metrics (Keras Metrics Value): list of metrics to use in the compilation

fit_model(self, x_train, y_train, x_val, y_val, epochs=10, batchSize=100, verbose=1, Shuffle=False)

Method to fit the model to data provided

Args: x_train (list(int/float)): a object from the LSTMPreprocessor class y_train (list(int/float)): a object from the LSTMPreprocessor class x_val (list(int/float)): a object from the LSTMPreprocessor class y_val (list(int/float)): a object from the LSTMPreprocessor class epochs (integer): number of epochs to train the model batchSize (integer): size of batches on which to train the model verbose (bool): boolean (0, 1) value to control the verbosity of the fitting

get_params(self)

Method to return the parameters of the model

Returns: Keras Model Summary: Model Summary

load_model(self, weights_path)

Method to Load model and weights to the paths specified

Args: weights_path (str): path to .json file weights_path (str): path to .h5 file

predict(self, x)

Method to provide predictions from the model

Args: x (list(int/float)): values on which to predict Returns: list of int/float: predicted values

save_model(self, weights_path)

Method to save model and weights to the paths specified

Args: weights_path (str): path to .json file weights_path (str): path to .h5 file

class taiyo_utils.models.ensembles.IndexerVotingRegressor(min_samples_split, n_estimators, max_features)
build_model(self, *args, **kwargs)
compile_model(self, *args, **kwargs)
fit_model(self, x, y, n_splits, verbose, **kwargs)
get_model(self)
get_params(self)
load_model(*args, **kwargs)
predict(self, x, **kwargs)
save_model(*args, **kwargs)
class taiyo_utils.models.ensembles.IndexerXGBoost(n_estimators, max_depth, learning_rate, min_child_weight, reg_alpha)
build_model(self, *args, **kwargs)
compile_model(self, *args, **kwargs)
fit_model(self, x, y, n_splits, verbose, **kwargs)
get_model(self)
get_params(self)
load_model(*args, **kwargs)
predict(self, x, **kwargs)
save_model(*args, **kwargs)