28,200 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
50
views
OVR classification not working on MNIST dataset [closed]
I'm coding a classification model using OVR for the MNIST dataset, and then asking users to input images, which the model then predicts the class of. The model accuracy itself (on training and test ...
Tooling
0
votes
0
replies
63
views
Good packages for bounded Linear Quantile Regression?
I'm looking for a good package to train a linear quantile regression model, i.e. $\hat y = \sum_{i=1}^n w_i \cdot X_i$. With $x_i$ are the input features, and $w_i$ are the bounded trainable weights. ...
0
votes
1
answer
40
views
Sklearn2pmml raises an error on 'classes_' parameter
I'm trying to create a PMML from a model, using this way :
from sklearn.preprocessing import LabelEncoder
y_h_train = LabelEncoder().fit_transform(y_train.copy(deep=True))
modele_label_encoded = ...
0
votes
1
answer
64
views
Logging SVC/SVM training to log file
I am trying to save the output from sklearn.smv.SVC training when verbose=True to a log-file. However, since it uses LibSVM in the back-end, I cannot figure out how this works. Copilot hasn't helped.
...
Advice
1
vote
2
replies
133
views
Machine Learning Project using Multidimensional Array Input/Outputs
I am struggling to get my ML model to accept the input and outputs that I need.
My aim is to have it accept this as the input:
input_x = [
((4.11, 8.58, -2.2), (-1.27, -8.76, 2.23)),
((0.43, -...
4
votes
0
answers
154
views
MLflow doesn’t log or show model artifacts after training run
I’m working on a machine learning project using MLflow for experiment tracking (on macOS, Python 3.12, scikit-learn, and DagsHub as the tracking server). The experiment runs successfully — I see the ...
0
votes
0
answers
97
views
How to use sklearn imputation methods on numpy.void (record or structured array, I'm not sure) ndarray
Code:
import numpy as np
import sklearn as skl
data = np.genfromtxt("water_potability.csv", delimiter = ",", names = True)
print(data)
print(data.shape)
print(type(data[0]))
...
0
votes
0
answers
125
views
Shape of tree_.value
According to the sklearn docs the shape of tree_.value is [n_nodes, n_classes, n_outputs]. I just wanted to ask if this is still correct.
I think the correct shape is [n_nodes, n_outputs, n_classes] ...
2
votes
1
answer
132
views
PCA with arpack returns different values when the order of observations change, but why?
I have recently noticed that when I change the order of the observations in a sparse array, scikit-learn PCA with svd_solver="arpack" returns different floating point numbers. Is this an ...
2
votes
0
answers
69
views
Qiskit Problem: Why does this not work with COBYLA and how do i optimize it?
I'm doing a small program that is supposed to classify the data of the Wisconsin Breast Cancer database contained in sklearn.datasets using Quantum Neural Networks (specifically EstimatorQNN).
I think ...
0
votes
0
answers
89
views
How to correct 3rd party sphinx ambiguous cross-reference warnings?
I'm trying to document a variety of classes that use scikit-learn bases BaseEstimator and TransformerMixin. Sphinx builds with a warning that,
/home/jake/github/proj/pkg/__init__.py:docstring of
...
0
votes
3
answers
203
views
n_jobs>=2 breaks reproducibility
I am facing a problem in maintaining the reproducibility in the ML project. I believe the core snippet of my issue is
clf = Clf(random_state=cfg.seed)
# instantiate the K-fold cross-validation ...
0
votes
0
answers
83
views
Flask ML App Stuck on "Loading" Status Despite Successful Model Training
I'm deploying a Flask ML application with book recommendations to Render, but I'm experiencing a persistent issue where my health endpoint always returns "model_loaded": false, "status&...
0
votes
1
answer
73
views
Brier Skill Score returns NaN in cross_val_score with imbalanced dataset
I’m trying to evaluate classification models on a highly imbalanced fraud dataset using the Brier Skill Score (BSS) as the evaluation metric.
The dataset has ~2133 rows and the target Fraud_Flag is ...
2
votes
1
answer
152
views
how to pass pre-computed folds to successiveHalving in sklearn
I want to undersample 3 cross-validation folds from a dataset, using say, RandomUnderSampler from imblearn, and then, optimize the hyperparameters of various gbms using those undersampled folds as ...