predict Questions
4
I've got some coefficients for a logit model set by a non-r user. I'd like to import those coefficients into r and generate some goodness of fit estimates on the same dataset (ROC and confusion mat...
7
I have some data with predictors and a binary target. Eg:
df <- data.frame(a=sort(sample(1:100,30)), b= sort(sample(1:100,30)),
target=c(rep(0,11),rep(1,4),rep(0,4),rep(1,11)))
I trained a ...
Beeson asked 23/4, 2014 at 9:27
1
How can I train an XGBoost model on a GPU but run predictions on CPU without allocating any GPU RAM?
My situation: I create an XGBoot model (tree_method='gpu_hist') in Python with predictor='cpu_pr...
3
Solved
How can I obtain the AUC value having fpr and tpr? Fpr and tpr are just 2 floats obtained from these formulas:
my_fpr = fp / (fp + tn)
my_tpr = tp / (tp + fn)
my_roc_auc = auc(my_fpr, my_tpr)
I ...
Tarragon asked 14/6, 2018 at 0:50
3
Solved
I'm trying to run an xgboost regressor model on a dataset without any missing data.
# Run GBM on training dataset
# Create xgboost object
pts_xgb = xgb.XGBRegressor(objective="reg:squarederror...
1
I have some repeated measures, ordinal response data:
dat <- data.frame(
id = factor(sample(letters[1:5], 50, replace = T)),
response = factor(sample(1:7, 50, replace = T), ordered = T),
x1 ...
Cycad asked 22/7, 2019 at 6:28
1
I have trained a model to predict topic categories using word2vec and an lstm model using keras and got about 98% accuracy during training, I saved the model then loaded it into another file for tr...
Pinelli asked 26/7, 2019 at 1:29
2
Solved
After performing a principal component analysis of a first data set (a), I projected a second data set (b) into PCA space of the first data set.
From this, I want to extract the variable loadings ...
2
I used functions ggpredict() and ggemmeans() from package ggeffects 1.3.0 to calculate mean estimates and confidence intervals (hereafter: CI) for a mixed-effect model. These functions rely on pred...
2
Solved
In addition to predicting the class labels, is it possible to return the expectation of each observation in new data when predicting?
library(caret)
knnFit <- train(Species ~ ., data = iris, me...
2
I have trained and saved my H2O AutoML model. after reloading, while I am using predict method, I am getting below error:
java.lang.IllegalArgumentException: Test/Validation dataset has a non-categ...
2
Let's begin with the premise that I'm newly approaching to TensorFlow and deep learning in general.
I have TF 2.0 Keras-style model trained using tf.Model.train(), two available GPUs and I'm looki...
Relate asked 20/11, 2019 at 9:50
3
I'm very new to tensorflow and especially the 2.0 since there's not enough examples about that API but it seems much handy than the 1.x
So far I managed to train a linear model using the tf.estimat...
Lerma asked 7/11, 2019 at 19:48
2
Solved
I am confused with the way predict.glm function in R works.
According to the help,
The "terms" option returns a matrix giving the fitted values of each term in the model formula on the linear p...
Amontillado asked 22/6, 2016 at 9:28
1
Solved
I am working with physical activity data and follow-up pain data. I have a large dataset but for the shake of this example I have created a small one with the variables of my interest.
As my physic...
4
i'm trying to run a very simple example where XGBoost takes some data and do a binary classification. The documentation says that xgboost outputs the probabilities when "binary:logistic" is used
...
Disperse asked 27/6, 2016 at 18:10
2
Solved
Let's consider model :
library(plm)
data("Produc", package = "plm")
model <- plm(pcap ~ hwy + water, data = Produc, model = 'within')
To calculate fitted value of the model ...
1
Solved
I’m working with FastAPI for Model inference in Machine Learning, so I need to have as inputs an array of JSON like this:
[
{
"Id":"value",
"feature1":"value&q...
Organelle asked 12/4, 2022 at 15:32
1
I am currently building an API using FastAPI to deploy my logistic regression model. For some reason, I am getting the above error in the server docs when I test the model.
My code below:
app = Fas...
Balmy asked 24/3, 2022 at 17:8
11
Solved
I'm following this tutorial to make this ML prediction:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
style.use("ggplot")
from sklearn import svm
x = [1, 5, 1.5...
Intertexture asked 7/8, 2017 at 19:2
4
Solved
I use R only a little bit and never use data frames, which makes understanding the correct use of predict difficult. I have my data in plain matrices, not data frames, call them a and b, which are ...
2
I found that the predict function is currently not implemented in cumulative link mixed models fitted using the clmm function in ordinal R package. While predict is implemented for clmm2 in the sam...
Sterigma asked 10/2, 2017 at 1:43
2
Solved
Do the names/order of the columns of my X_test dataframe have to be the same as the X_train I use for fitting?
Below is an example
I am training my model with:
model.fit(X_train,y)
where X_train=d...
Retrogress asked 10/2, 2019 at 0:2
2
Solved
I have a trained model that takes in a somewhat large input. I generally do this as a numpy array of the shape (1,473,473,3). When I put that to JSON I end up getting about a 9.2MB file. Even if I ...
Evangelista asked 27/11, 2017 at 15:53
4
Solved
I have a gamlss model that I'd like to use to make new y predictions (and confidence intervals) from in order to visualize how well the model fits the real data. I'd like to make predictions from a...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.