2,741 questions
0
votes
0
answers
96
views
How to apply the Best Parameters From Optuna To Predictions
I have done a XGBoost model, and used Optuna to get the best parameters.
I saved the trained model and the features used.
My question is, when I got to load the model and use it when making ...
3
votes
0
answers
91
views
Python GEKKO MPC IPOPT / MUMPS solver older version is causing the optimization not to converge
Context:
Hello to everybody and to Prof. John Hedengren, I am using the Python Gekko library to use MPC with a heating system of a multi-zone building. The objective is to either minimize a ...
0
votes
1
answer
67
views
GNN Link Prediction (GraphSAGE/PyG) - Validation AUC Consistently Below 0.5 Despite Overfitting Control
I'm working on a task dependency prediction problem using Graph Neural Networks with PyTorch Geometric. The goal is to predict directed precedence links (A -> B) between tasks within specific sets (...
0
votes
0
answers
49
views
Markov Chain prediction using Excel Macro - accuracy differs significantly in real time prediction and back testing
I have a macro for inventory replenishment prediction using Markov Chain. It uses data for last 10 days including today to predict inventory replenishment (rep R) or not (blank B).
The model works ...
2
votes
1
answer
85
views
R predFit(): Problem with prediction interval for nls in two variables
I am fitting a nonlinear regression on a dataset with two explanatory variables Day and Treatment modelling a response Amount using {nls}. I want to get the predicted values for Amount together with ...
0
votes
1
answer
233
views
Do Python version issues with TTA lead to fasttransform vs. fastcore bugs in Python >= 3.10?
Test Time Augmentation (TTA) in FastAI should be easily applied with learn.tta, yet has led to numerous issues in my Cloud Run deployment. I have a working Cloud Run deployment that does base learner ...
2
votes
1
answer
62
views
Issue with predict.plm() when using lag() inside the regression
I've recently encountered a problem with predict() function for plm regression that uses AR(1) term in form of lag().
Here is an toy example: 3 countries, 3 periods, current population as a function a ...
0
votes
0
answers
18
views
Running SDM with SVM in R svm_model <- svm(response ~ ., data = train_data, kernel = "radial", probability = TRUE)
svm_model <- svm(response ~ ., data = train_data, kernel = "radial", probability = TRUE)
Erreur dans contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]]) :
les contrastes ne peuvent ...
0
votes
0
answers
47
views
Does temporal fusion transformer use the ground truth of target during testing?
In this neural network structure, I want the model to do the train and validation without using the historical target values and to make the prediction directly through the covariates, so I set these ...
0
votes
0
answers
20
views
Outputs standardization in caretEnsemble
I'm using R's caretEnsemble with HMDA data to implement "voting" method. After I fitted the base models with caretList, stack them together using caretEnsemble, and predict the trained ...
0
votes
0
answers
50
views
Prediction of research data easiest method in python
I'm researcher and want to predict how data from instrument will be after more than 10k cycles. I got data from 10,000 cycles and now would like to make a precise prediction. With the simplest version ...
0
votes
0
answers
92
views
How to Structure Data for Transformer Model to Predict categorical variable
I’m working on training a transformer model to predict a categorical variable in my dataset, which includes 10 features, an ID variable, outcome, and a relative timestamp variable. Each row represents ...
0
votes
0
answers
29
views
The model does not predict the data several steps ahead
I'm trying to train a model to predict the close column 2 steps ahead. Prepared the dataset:
datetime
close
close_forward
close_shift_1
close_shift_2
close_shift_3
close_shift_4
close_shift_5
2024-10-...
0
votes
0
answers
26
views
Customize sources of word suggestions?
I just discovered the webversion of vscode and it seems amazing for big chunk of work I have to do regular. In particular, the IntelliSense is unexpectedly awesome because it automatically populated ...
1
vote
0
answers
30
views
I keep getting this 'object not found' error. How do I fix it?
trying to use predict function to find ValueScore (vs in my chart) using different independent variables and a regression. encountered an error I cannot get passed.
sales <- read.csv("...
1
vote
1
answer
32
views
Question about making prediction code at the end of Section 4.1.6 in Applied Machine Learning Using mlr3 in R
In going through the online mlr3 book Applied Machine Learning Using mlr3 in R (https://mlr3book.mlr-org.com/chapters/chapter4/hyperparameter_optimization.html), I am having a bit of difficulty ...
2
votes
1
answer
107
views
Python Gekko step-wise variable in a time domain problem with differential equations
I am coding an MPC problem in Python Gekko to heat a building on a winter day (for now I am working with a simple building with 2 zones only). The building is expressed with a Resistor-Capacitor (RC) ...
-1
votes
1
answer
111
views
Classifying Table Headers from Column Data
I have a large set CSVs with numeric and text data; here's a sample:
Company ID
Company Name
Group ID
Currency
Amount
...
8494494
Acme Inc
F942G
EUR
$1.56
...
9283422A
Walmart
XXH3F3
AUD
$5.64
...
...
...
1
vote
0
answers
58
views
Non-linearity/interaction terms in Fine Gray model
I am modeling the risk of cancer-specific mortality in a Fine-Gray model with three variables: the TNM-stage, age at diagnosis (ie, Age_wins) and Cancer subtype (ie, Disease). The competing risk is ...
1
vote
1
answer
108
views
different R^2 depending on 2SLS and ivreg function (AER)
I want to run an IV regression in R using ivreg from the AER package. The output gives me a negative R^2 which should be impossible as far as I know. When running the same regression manually with ...
0
votes
1
answer
61
views
Error to estimate prediction interval in glmm with gamma family
I gathered 3 studies on healthy subjects assessing same biological parameter y.
y is a positive bounded parameter. His distribution follows a gamma distribution.
I have a model glmm wth gamma family
...
1
vote
0
answers
32
views
How do I set the seed for predictive modeling with glm.nb?
I’m uncertain about how to set the seed for training the model. When I use different seeds, the results vary. Is there a gold standard for choosing a seed, or should I try multiple seeds and select ...
1
vote
0
answers
30
views
How to modify my MATLAB code to train a neural network with images from different directions?
I am working on a project to estimate the weight of pears using their RGB and Depth images in MATLAB. Initially, I used only front-facing images for training, but now I want to improve the accuracy by ...
3
votes
3
answers
208
views
Random, yet predictable cronjob schedule based upon arbitrary user data in Bash
I'm trying to construct a random, yet predictable cronjob schedule for a monthly and daily cronjob based upon arbitrary user-provided data. The daily and monthly cronjobs should run with a sufficient ...
0
votes
1
answer
51
views
How to compute the predicted response variable after an ANOVA with anova1 in MATLAB?
I want to replicate in MATLAB a simple demo outlined here that uses SAS. The SAS code is
ods rtf file='residual plot SAS output.rtf';
proc print;
run;
proc reg;
model hddt=bloc entry/r p;
output out=...
1
vote
0
answers
36
views
Error when converting forecast_it to list in GluonTS Transformer Predictor: "Setting an array element with a sequence"
I'm using GluonTS to make time series predictions with the TransformerPredictor. However, when I try to convert the forecast_it iterator to a list, I encounter the following error:
Setting an array ...
0
votes
0
answers
154
views
Why does my forecast/prediction using a VAR in statsmodels quickly converge to zero?
Outline: I am using a vector autoregression (VAR) model from the statsmodel package https://www.statsmodels.org/stable/vector_ar.html#var.
My two time-series, let us call them time-series 1) ts1 and 2)...
0
votes
0
answers
45
views
How to make predictions on un-labeled test data using j48 in weka(3.9.0)?
I have tried converting all the files (training, labeled test data and un-labeled test data) prefereably in arff format and it is working good for my labelled test data. But for unlabelled test data ...
-1
votes
1
answer
91
views
How I solve "ValueError: Found array with 0 sample(s) (shape=(0, 5)) while a minimum of 1 is required by LinearRegression."
I have built a drought prediction algorithm. The inputs of this model are future year range such as Start year and end year, Month, and City. The output of this model is a bar chart, its Y axis ...
2
votes
1
answer
2k
views
How to Calculate and Plot Prediction and Confidence Intervals for Linear Regression
I need to plot prediction and confidence intervals and need to use python and only the following packages. How do I plot both intervals in the same model. I managed to plot the prediction intervals ...
0
votes
1
answer
117
views
How can I display predictor importance + feature name in multivariate regression?
I'm exploring a dataset with the goal to find any interesting relationships (there are a bunch of variables of interest and I want to see which features or feature combinations predict them).
As a ...
0
votes
1
answer
191
views
How to use (Rolling/Sliding) Window Linear Regression to Predict Future Data
I am trying to implement a sliding window regression to predict stock prices and I realized I didn't understand how sliding window regression works for prediction. I have some training data (the ...
1
vote
0
answers
76
views
How can I use pickle file of model to predict on Image classification?
I have image classification model on trained on dataiku which is efficinet B4.
Now I want to use it pickle file to make prediction on image but I am unable to make predictions.
What is the image ...
0
votes
0
answers
118
views
StepReg library won't load in R
I'm trying to construct a prognostic prediction model. To do this I've installed the StepReg package. However, whenever I try to load StepReg from my library, it comes up with a bunch of error ...
0
votes
0
answers
166
views
How do I visualise an lmer model adjusted for covariates using ggplot?
I'm trying to visualise my adjusted lmer model showing an interaction of education status using the predict function and ggplot, but I get a zig-zag output when I add in my covariates. I want to ...
0
votes
1
answer
181
views
Python - Kalman Filter (Unscented) not working corretly
I am trying to implement a Kalman Filter which is used to filter calculated values of Speed, Heading, Acceleration and Yaw Rate. I also use the Kalman Filter to predict future values and use those to ...
-1
votes
1
answer
1k
views
Logistic Regression Model - Prediction and ROC AUC
I am building a Logistic Regression using statsmodels (statsmodels.api) and would like to understand how to get predictions for the test dataset. This is what I have so far:
x_train_data, x_test_data, ...
0
votes
1
answer
462
views
ValueError: Input X contains NaN. SVR does not accept missing values encoded as NaN natively
I use SVR to predict my data
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.svm import SVR
from sklearn.model_selection import GridSearchCV
from sklearn....
1
vote
0
answers
157
views
Why is error "OSError: GetModuleFileNameEx failed" generated in running scikit-learn k-nearest neighbours?
In using scikit's 'KNeighborsClassifier' (with n_neighbors = 3) and '.fit' to train, then using '.predict' to do multinomial classification I am getting the error message "OSError: ...
1
vote
3
answers
124
views
Average of multiple ggpredict objects
I have generated 10 model summaries after fitting the same model on 10 different subsets of the dataset which is as follows
library(mice)
data("nhanes")
head(nhanes)
imp <- mice(nhanes, ...
0
votes
1
answer
55
views
ValueError: X has 16 features, but SVC is expecting 17 features as input in disease prediction system
I am trying multiple disease prediction system and among them the error occur when trying malaria disease prediction system using svm algorithm. I have no idea how to fix the problem since other 4 ...
0
votes
0
answers
49
views
valueerror: input 0 of layer "model_2" is incompatible with the layer: expected shape=(none, 128, 128, 3), found shape=(1, 224, 224, 3)
I am trying malaria detection using cnn model and Streamlit UI. But it show the error of "valueerror: input 0 of layer "model_2" is incompatible with the layer: expected shape=(none, ...
2
votes
0
answers
72
views
Time series predictions using python GEKKO
This a follow up question to this one: Predictions using python GEKKO
I'm trying to create an ARX model to be able to model rotations on a masonry wall using past observations and temperatures ...
0
votes
1
answer
117
views
incorrect prediction from sklearn DummyClassifier
I'm trying to perform a dummy classification on a dataset for a school project. The idea is to get an idea of the frequency in which different political parties give speeches. My idea is to write this ...
2
votes
1
answer
83
views
Predictions using python GEKKO
I have created an ARX model using sysid function, and now I want to extrapolate this model for other inputs.
I firstly created this model and identified its parameters for a training subset of data.
m ...
0
votes
1
answer
77
views
Is it possible to perform a predictive fit of an unknown equation curve with the ROOT framework?
I am a Physics student and I would like to learn how to use the ROOT framework so I am trying to convert the data analyzes of the laboratory experiences of the Radiation-Matter Interaction Laboratory ...
-1
votes
1
answer
138
views
Calculating BLEU score between two sumamries in python
prediction = "I am ABC. I have completed my bachelor's degree in computer application at XYZ University and I am currently pursuing my master's degree in computer application through distance ...
-1
votes
1
answer
113
views
Handle NaN values in Scipy.mannwhitneyu (scipy.stats.mannwhitneyu)
I have a dataset of logIC50 values(say A) and another dataset of categorical clinical drug response (say B). There are mainly two important observations in B - sensitive and resistant. But there are ...
0
votes
1
answer
402
views
Should I use training or validation set for parameter otimization?
I am training a model using Decision Tree and parameter otimization.
I read that the objective of the validation set is to assess model performance during training and help tune parameters.
With this ...
4
votes
2
answers
88
views
How can I find the date for which a model from family = poisson(link = "log") predicts a specified value?
I have data that consists of values on dates, here represented as timestamps:
json <- structure(list(creation_date = c(1689356840L, 1689366017L, 1689376446L,
1689504809L, 1690366268L, 1690472012L, ...