Questions tagged [machine-learning-model]

For questions about machine learning modelling, architectures and design choices, as well as traditional models (AlexNet, VGGNet, Inception, ResNet, etc).

131 questions
1
vote
3 answers

Python Dataframe: Shuffle group of rows

What is the best way to shuffle a group of rows in a data frame? Need this for a shuffled train set of the model. For example, shuffle every 10 rows as a separate group or have some logical condition to create separate groups and shuffle them as a…
Ron Warshawsky
  • 314
  • 2
  • 11
1
vote
0 answers

Prepare SKlearn model with Isolation Forest to deploy on Google Cloud

I'm new to machine learning world and working on a project in which I have trained a model for fraud detection using SKlearn.I'm training the model in this way as: from sklearn.metrics import classification_report, accuracy_score from…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
1
vote
2 answers

Python SKlearn contamination must be in (0, 0.5] error

I'm new to Machine Learning and working on a project using Python(3.6), Pandas, Numpy and SKlearn. I have done classifications and reshaping but while in prediction it throws an error as contamination must be in (0, 0.5]. Here's what i have tried: #…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
1
vote
0 answers

Recommendation Engine using Apache Spark MLIB showing up Zero recommendations after processing all operations

I am a newbie when it comes to Implementation of ML Algorithms. I wanted to implement a recommendation Engine and Got to know after little experimenting that collaborative-filtering can be used for the same. I am using Apache Spark for the same. I…
1
vote
0 answers

Passing a dataframe as train data and multiple columns of dataframe as train labels to a machine learning prediction model

I have a dataframe like the following: BankNum | FirstName | LastName | ID | 00987772 | Michael | Brown | 123 | 00987772 | Bob | Brown | 123 | 00987772 | Michael | Mooney | 123 | 00987772 | Raven | Mallik | 245 | 00982122 …
0
votes
0 answers

How to detect target object's offset from a reference point?

How to detect a target object's offset from aa reference point in an image using .NET Machine Learning? For example, let's say I have five images (1,2,3,4,5). these images have a ball in it (the ball is the target object). Image-1 is the "reference…
0
votes
0 answers

Runtime Error while transfer learning a model using learn.fit_one_cycle(32)

Runtime Error while transfer learning a model on Pycharm in line while using learn.fit_one_cycle(32).The code is also running twice on its own. firstly it executes till last line,then again everything executes(output is shown twice) and then this…
0
votes
0 answers

Machine Learning - Random Forest Classification - AxisError Axis 1 is out of bounds for array of dimension 1

def evaluate_model(predictions, probs, train_predictions, train_probs): """Compare machine learning model to baseline performance. baseline average error is compared to baseline performance. Computes statistics and shows ROC curve. …
0
votes
0 answers

How create blending ensemble properly and call as ussual Libary, how to integrate in below my model

Objective is create ensemble model including tuning params from weak learner and integrate with my model always problem TypeError Traceback (most recent call last) Input In [19], in () ----> 1…
0
votes
1 answer

ModuleNotFoundError: No module named 'segmentation_models'

i need to work with the segmentation model module, but even though I installed the module with the current version, it doesn't work what should I do codes: import os import cv2 import keras import numpy as np import tensorflow as tf import…
0
votes
1 answer

Cant install tensorflow-gpu in google colab, what am i doing wrong?

When trying to install tensorflow to the gpu in google colab i get an error message. code being used I have looked at several forums and tutorials but i seem to be the only one getting this error message so i was wondering if anyone knows how to…
0
votes
1 answer

Tensorflow keras, Shapes (None, 6, 36) and (None, 216) are incompatible

i'm new to ML and AI, and i'm trying to build a model for reading text images and I'm kind of lost here. this code is what i'm using to build the model but i'm not able to. import os import random import numpy as np import tensorflow as tf from…
0
votes
0 answers

Why does my ML model always show the same result?

I've already trained several models for a binary classification problem, basing my election on F-Score and AUC. The code used has been the following: svm = StandardScaler() svm.fit(feat_train) feat_train_std = svm.transform(feat_train) feat_test_std…
Alfonso
  • 1
  • 1
0
votes
1 answer

ValueError: Found input variables with inconsistent numbers of samples: [7167, 9557]

This is my code. I am trying to fit the model on RandomForestClassifier here: I know that the shape of the datasets is not the problem but still it says inconsistent number of samples. X_train = df_train.drop('Target',axis=1) y_train =…
0
votes
0 answers

why is my Whatsapp Chat Analyser ML Model showing an error?

Image 1 Image 2 I'm building a WhatsApp chat analyzer ML Model in jupyter notebook and I got some errors. In the second image in the 3rd line, those rows are not placed in proper columns. two rows are combined in one row. Please help me out with…
1 2 3
8 9