Skip to content
Advertisement

Tag: machine-learning

Difference between the calculation of the training loss and validation loss using pytorch

I wanna use the following code of this traditional image classification problem for my regression problem. The code can be found here: GeeksforGeeks-Training Neural Networks with Validation using Pytorch I can understand why the training loss is summed up and then divided by the length of the training data in this example, but I can’t get why the validation loss

trying to callibrate keras model

I’m trying to calibrate my CNN model by Sklearn implementation CalibratedClassifierCV, tried to wrap it as KerasClassifier and to override the predict function but without success. someone could say me what I did wrong? this is the model code: this is me trying to calibrate it : the output : valX_cnn and val_y_cnn are of type np.array. tried even to

How to define an array of action spaces?

I am trying to create a crypto trading bot that can trade multiple crypto coins simulatenously. So for example if I have n=4 coins (e.g. : 0-BTC, 1-ETH, 2-DOT, 3-SOL), then an example of action space would be something like: Where: BUY if action > 0 HOLD if action == 0 Sell if action < 0 So, in the given

TensorFlow TextVectorization producing Ragged Tensor with no padding after loading it from pickle

I have a TensorFlow TextVectorization layer named “eng_vectorization”: and I saved it in a pickle file, using this code: Then I load that pickle file properly as new_eng_vectorization: Now I am expecting, both previous vectorization eng_vectorization and newly loaded vectorization new_eng_vectorization to work the same, but they are not. The output of original vectorization, eng_vectorization([‘Hello people’]) is a Tensor: And

Fixing points as non-outliers during outlier detection in Python

I found this Scikit Learn page explaining how to use different algorithms to detect outliers: https://scikit-learn.org/stable/modules/outlier_detection.html Is it possible to set a group of instances as non-outliers so that the algorithms understand that those specific points should not be detected as outliers? Answer If you have enough so called non-outliers for training, one option is to use Novelty detection with

Advertisement