Category "machine-learning"

tensorflow keras fit not showing any information

When using model.fit(), I only see the text "Epoch 1/10", and after a few seconds, it shows "Finished" with exit code: -1073740791 status: 1. My labels are a on

Remove variable in model_parts() plot

I want to remove certain variables from the plot. # Packages library(tidymodels) library(mlbench) # Data data("PimaIndiansDiabetes") dat <- PimaIndiansDia

Gradient Descent for Linear Regression in One Variable(Octave)

Can anybody give a detailed explaination on how this piece of code works? h=(theta' * X')'; theta = theta -((1/m) * (h - y)' * X)' * alpha; *where X is the fea

Using softmax for multilabel classification (as per Facebook paper)

I came across this paper by some Facebook researchers where they found that using a softmax and CE loss function during training led to improved results over si

Use Index of the Loadings (IL) method to calculate the optimal number of principal components

I want to use Index of the Loadings method to calculate the optimal number of principal components using the index_of_loadings_matrix function. My dataframe was

Weird behaviour when finetuning Huggingface Bert model with Tensorflow

I am trying to fine tune a Huggingface Bert model using Tensorflow (on ColabPro GPU enabled) for tweets sentiment analysis. I followed step by step the guide on

ClassValuePicker in Weka KnowledgeFlow doesn't seem to let you pick a class

Does anyone have any insight? New to using Weka KnowledgeFlow but I've followed the official documentation to a t. I'm trying to generate multiple ROC plots, wh

Talos, syntax to select best_model

I'm running a toy model for learning, on Ubuntu 21.10, in a conda environment that comprises python 3.74, keras 2.4.3 and talos 1.0, among many other packages.

Deploying ML model on Streamlit

I have a code that basically takes in a csv, which can be uploaded from streamlit and then pushes out a classification prediction. Just as a context I use xgboo

am getting NotFittedError: This MultinomialNB instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator

my code is import streamlit as st import pickle import string from nltk.corpus import stopwords import nltk from nltk.stem.porter import PorterStemmer ps = Port

How to train a model to predict picks using multiple independent dataframes?

I have a dictionary of 100+ dataframes all have the same shape [9999 rows x 4 columns] with the following columns: ['time', 'response', 'arrival_1','arrival_2']

How to train a model to predict picks using multiple independent dataframes?

I have a dictionary of 100+ dataframes all have the same shape [9999 rows x 4 columns] with the following columns: ['time', 'response', 'arrival_1','arrival_2']

AttributeError: 'numpy.ndarray' object has no attribute 'columns' even after using pandas dataframe

import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split,cross_val_score from sklearn.tree import DecisionTreeCl

Cannibals and missionaries problem python -artificial intelligence algorithm

I'm trying to solve the cannibals and missionaries problem in python (with some additional criteria, but the main idea is the classic one). So, in the class Gra

How to fix NPE when transforming RasterFrameLayer into Raster?

I'm trying to convert a predicted RasterFrameLayer in RasterFrames into a GeoTiff file after training a machine learning model. When using the demo data Elkton-

I this the correct way of computing the average accuracy?

I am fairly new to coding and getting confused between average accuracy and overall accuracy. I have created a function to calculate accuracy, i then divide thi

How to set AUC as scoring method while searching for hyperparameters?

I want to perform a random search, in classification problem, where the scoring method will be chosen as AUC instead of accuracy score. Have a look at my code f

Non Linear Decision boundary SVM

I need you guys help to find a non linear decision boundary. I have 2 features with numerical data, I made a simple linear decision boundary (see picture below)

Understanding `leafsize` in scipy.spatial.KDTree

Problem statement: I have 150k points in a 3D space with their coordinates stored in a matrix with dimension [150k, 3] in mm. I want to find all the neighbors o

Is it possible to average the output of multiple classification models using pipeline in sklearn?

As an example, suppose there is a random forest and a logistic regression model that accept the same input data, and I want the inference result to be the avera