28,209 questions
Tooling
0
votes
0
replies
38
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
0
answers
18
views
Class labelling influences the gini importance of features [closed]
Problem: In sklearn Random Forest classifier, the class labelling influences the gini importance of features.
I would expect the labelling of classes should not influence the importance values and ...
-1
votes
1
answer
59
views
How to randomly select a pixel within a kernel and attribute its value to the center pixel? [closed]
In order to investigate whether the decisions of a CNN for image classification are predominantly driven by image regions related to relatively fine object features, I am looking for an image ...
0
votes
1
answer
39
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
63
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
127
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, -...
3
votes
0
answers
107
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
95
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
123
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
126
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
59
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
80
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
201
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
78
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
68
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 ...