Questions tagged [prediction]

For questions related to statistical prediction, especially for programming tasks.

In science, a prediction is a rigorous, often quantitative, statement, forecasting what will happen under specific conditions; for example, if an apple falls from a tree it will be attracted towards the center of the earth by gravity with a specified and constant acceleration. The scientific method is built on testing assertions that are logical consequences of scientific theories. This is done through repeatable experiments or observational studies.

Mathematical equations and models, and computer models (e.g., ), are frequently used to describe the past and future behaviour of a process within the boundaries of that model.

In microprocessors, permits avoidance of pipeline emptying at branch instructions. In engineering, possible failure modes are predicted and avoided by correcting the mechanism causing the failure.

2846 questions
0
votes
0 answers

When I change my x.shape it states tupple index out of range, and this error ValueError: Unexpected result of `train_function` (Empty logs)

I am working on a multivariate LSTM project where I am forecasting future Sales by SKU. I also included features in my model that affect Sales. I am having trouble properly splitting my train and validation set. When I try to fit the model, I get…
Mria
  • 1
0
votes
0 answers

Is there an algorithm (or set of algorithms) that finds optimal weights of variables for a function

Current state: I have a dataframe with input states and results of the decision made. Currently, the decision is made based on the binary state (true/false) of the variable. Goal: Since each variable has a different weight on the outcome, we need to…
0
votes
0 answers

ValueError: Error when checking input: expected dense_1_input to have shape (784,) but got array with shape (307200,)

I try to use the code bellowm I use python 2, the link of the whole code is here https://www.kaggle.com/code/manthansolanki/image-classification-with-mnist-dataset/notebook preds = model.predict_classes(x) prob =…
nada nada
  • 1
  • 1
0
votes
0 answers

Predict function from linear regression model in r

I am attempting to follow thisn step-by-step guide in order to create a prediction from my dataset. https://www.statology.org/predict-in-r-multiple-regression/. However, when i print these following lines of code I get thousands of output when I…
0
votes
0 answers

What model to predict GYM Leavers based on recent GYM Joiners? HELP!! Time series vs Multiple Linear Regression

I work in the gym space, and I'm trying to predict the numbers of gym leavers we will see next month, the following month etc. The number of leavers are directly be impacted by the number of joiners we had 13 months ago (for a 12 month contract) or…
0
votes
0 answers

How to extract k-means cluster centroid?

I did a k-means cluster analysis using the kml and kml3d packages. Now I want to extract the cluster centroids to predict the cluster memberships on another dataset. Does anyone know how to do that? Thanks in advance!
P_aza
  • 107
  • 1
  • 8
0
votes
1 answer

Saving and Loading CNN model

I have a CNN model and I want to save it and load it for prediction in different tab. But I am confused whether the model.evulotion part is included in the part I will save. And I don't know if it would be better to use Model.checkpoint or…
0
votes
0 answers

I am trying to run this code but getting error

for (i in 1:196) { if(UnKnownGroup_Data$L[i]==0 & UnKnownGroup_Data$W[i]!=0 & UnKnownGroup_Data$H[i]!=0) Error in if (UnKnownGroup_Data$L[i] == 0 & UnKnownGroup_Data$W[i] != 0 & : missing value where TRUE/FALSE needed I am trying to run this…
0
votes
1 answer

Jupyter notebook linear regression problem

in jupyter notebook when we input this we expect this output as shown in screenshot But in my notebook when i enter same query i am getting different output why
0
votes
0 answers

Time series forecasting of outcome variable based on current performance of outcome variable in R

I have a very large dataset (~55,000 datapoints) for chicken crops. Chickens are grown over ~35 day period. The dataset covers 10 sheds of ~20,000 chickens each. In the sheds are weighing platforms and as chickens step on them they send the weight…
0
votes
0 answers

Conversation Language Understanding Azure: Can you add a regex pattern in Entity which will exclude another entity?

I am working on creating an entity that will match anything(letter/number)in an utterance, excluding another entity. Right now, I have the below pattern added to my entity(Stockpattern): MatchAnything .* I want to edit this pattern to match…
Rose
  • 1,490
  • 5
  • 25
  • 56
0
votes
0 answers

How to build a ggplot alike with plotFit or how to extract geoms from autoplot

The following simplified code is creating a time series and building an autoplot with the Holt's model: library(dplyr) library(tidyverse) library(fpp2) df <-data.frame(y = c(85.1,86.0,86.5,86.9,87.2), x = 1:5) mdl <-ts(df$y)…
asd-tm
  • 3,381
  • 2
  • 24
  • 41
0
votes
2 answers

Predicting new data with statsmodels gives ValueError: shapes

I built a multiple regression model using Python statsmodels. X = df[['var1','var2','var3','var4']] X = sm.add_constant(X) ## let's add an intercept (beta_0) to our model y = df['target_trait'] model = sm.OLS(y, X).fit() #argument order:…
Amilovsky
  • 397
  • 6
  • 15
0
votes
0 answers

Quadratic fit function of two large data samples in python to predict

using this csv: https://docs.google.com/spreadsheets/d/1QbFIUE1AcFCOgDZH5K2vPColxXeBVDV-sJhS9On2BYY/edit?usp=sharing I'm trying to figure out how to write a program to fit a quadratic function to predict the change in global temperature (y) as a…
0
votes
0 answers

Twilio : Calculating estimated wait time in multi queue multi server system

I have a system that has multiple queues, whenever a user calls if no agent is available it will wait in the queue. The queue has multiple filters which separates the agent based on their skills. I want to calculate the estimated wait time for each…