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
Tag: machine-learning
Is it possible to optimize hyperparameters for optional sklearn pipeline steps?
I tried to construct a pipeline that has some optional steps. However, I would like to optimize hyperparameters for those steps as I want to get the best option between not using them and using them with different configurations (in my case SelectFromModel – sfm). The error that I get is ‘string’ object has no attribute ‘set_params’ which is understandable.
Training, Validation and Test sets for imbalanced datasets in Machine Learning
I am working on an NLP task for a classification problem. My dataset is imbalanced and some authors have only 1 text, and thus I want to have this text only in the training set. As for the other authors I need to split the dataset into 70% training set, 15% validation set and 15% test set. I tried to
How to make a Confusion Matrix with Keras?
I have trained my model (multiclass classification) of CNN using keras and now I want to evaluate the model on my test set of images. Is there a way to create confusion matrix? Answer Thanks for answers. I did like this:
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
Audio recognition and fingerprint using sklean & librosa [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question I want to create a model that can predict who has speak with different word. In this case i try to
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
Get names of the most important features for Logistic Regression after transformation
I want to get names of the most important features for Logistic regression after transformation. I know that I can do this: But with this I’m getting feature1, feature2, feature3…etc. And after transformation I have around 45k features. How can I get the list of most important features (before transformation)? I want to know what are the best features for