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
6
votes
4 answers

Predicting unseen data on Target variable based Encoding Technique

I am working on an automated ML (Regression) algorithm where the flow of process is: User uploads a data -- Data Cleaning -- Encoding(Target Encoder) -- Fitting model -- results. I am completely fine until this point, my confusion is when the user…
SMR
  • 401
  • 4
  • 15
6
votes
4 answers

How to predict future Stock using LSTM Keras

First of all, I must say, I'm a beginner to this AI things. I followed most of the tutorials about stock market predictions and all of them are pretty much same. These tutorials using a data set and split in to two sets. First one is Training set…
6
votes
2 answers

Early Stopping with a Cross-Validated Metric in Keras

Is there a way in Keras to cross-validate the early stopping metric being monitored EarlyStopping(monitor = 'val_acc', patience = 5)? Before allowing training to proceed to the next epoch, could the model be cross-validated to get a more robust…
6
votes
3 answers

how to debug "factor has new levels" error for linear model and prediction

I am trying to make and test a linear model as follows: lm_model <- lm(Purchase ~., data = train) lm_prediction <- predict(lm_model, test) This results in the following error, stating that the Product_Category_1 column has values that exist in the…
ZhouW
  • 1,187
  • 3
  • 16
  • 39
6
votes
2 answers

Individual terms in prediction of linear regression

I performed a regression analyses in R on some dataset and try to predict the contribution of each individual independent variable on the dependent variable for each row in the dataset. So something like this: set.seed(123) …
6
votes
2 answers

How to tune weights in Voting Classifier (Sklearn)

I am trying to do the following: vc = VotingClassifier(estimators=[('gbc',GradientBoostingClassifier()), ('rf',RandomForestClassifier()),('svc',SVC(probability=True))], voting='soft',n_jobs=-1) params =…
Abhinav Gupta
  • 435
  • 1
  • 4
  • 13
6
votes
1 answer

Forecasting model predict one day ahead - sliding window

I'm struggeling with a problem. I'm using SparkR for time series forecasting, but this scenario can also transferred to normal R environment. Instead of using ARIMA model I want to use regression models such as Random Forest Regression etc. to…
Daniel
  • 552
  • 2
  • 9
  • 29
6
votes
3 answers

Linear regression with tensorflow

I trying to understand linear regression... here is script that I tried to understand: ''' A linear regression learning algorithm example using TensorFlow library. Author: Aymeric Damien Project:…
Vladimir Djukic
  • 925
  • 2
  • 9
  • 28
6
votes
1 answer

TensorFlow - How to predict with trained model on a different test dataset?

I am new using TensorFlow and I don't know how to classify a picture with a trained model. I have already built a train, validation and test dataset for my training and all works but I want to predict on second test dataset (called test2). I am…
A. Attia
  • 1,630
  • 3
  • 20
  • 29
6
votes
1 answer

Classification accuracy of binomial glmer() predictions

I've been busting my (non-r-savy) brains on a way to get R to produce the percentage of correct predictions for a binomial glmer model. I know this is not super informative statistically, but it is often reported; so I would like to report it as…
Jeroen Claes
  • 77
  • 1
  • 7
6
votes
2 answers

What is the difference between lm(offense$R ~ offense$OBP) and lm(R ~ OBP)?

I am trying to use R to create a linear model and use that to predict some values. The subject matter is baseball stats. If I do this: obp <- lm(offense$R ~ offense$OBP) predict(obp, newdata=data.frame(OBP=0.5), interval="predict") I get the…
Steve Rowe
  • 19,411
  • 9
  • 51
  • 82
6
votes
1 answer

Python-Predicting/Extrapolating future data given a data set

I'm very new to Python. I have a data set and I'm trying to use numPy/sciPy to predict/extrapolate future data points. Is there a simple way to come up with a mathematical function(say, a Sine function) that fits my current data, and then I could…
ccheng21
  • 61
  • 1
  • 3
6
votes
3 answers

No predictive text in Phonegap 2.2.0 on Android 4.0.3 with input type="text"

I have a PhoneGap app with several fields of input type="text". Besides that it has some HTML textareas. When running the app on Android and typing text into an HTML textarea element, the Android predictive text works fine. However, when I type…
gerbenk
  • 61
  • 3
5
votes
3 answers

Data structure for storing word associations

I'm trying to implement prediction by analyzing sentences. Consider the following [rather boring] sentences Call ABC Call ABC again Call DEF I'd like to have a data structure for the above sentences as follows: Call: (ABC, 2), (again, 1), (DEF,…
WeNeigh
  • 3,489
  • 3
  • 27
  • 40
5
votes
2 answers

Auto ARIMA in Python results in poor fitting prediction of trend

New to ARIMA and attempting to model a dataset in Python using auto ARIMA. I'm using auto-ARIMA as I believe it will be better at defining the values of p, d and q however the results are poor and I need some guidance. Please see my reproducible…
jimiclapton
  • 775
  • 3
  • 14
  • 42