Skip to main content

Questions tagged [numpy]

NumPy is one of the fundamental packages used for scientific computing in the Python ecosystem. Specifically, NumPy is used for numerical computing and uses n-dimensional arrays.

4votes
0answers
23views

Trying to train ML model to do regression for US Department of Transportation Kaggle Flights Dataset with 5 million records and 7 features

For a college project for my data science course I am trying to fit a model based on the U.S. DOT's 2015 Kaggle Flight Cancellations dataset, but am not having great luck with model performance (MSE ...
Jake Malis's user avatar
1vote
0answers
19views

Implementing the Discriminant Algorithm for Reduced Multidimensional Features in Python

I need to implement the Discriminant Algorithm for Reduced Multidimensional Features proposed in the paper https://www.jstage.jst.go.jp/article/nolta/1/1/1_1_37/_pdf/-char/en as Algorithm 2. I am ...
Josip Rođak's user avatar
3votes
1answer
117views

How to plot the marginal distributions of features in Iris dataset?

I'm trying to plot the marginal distribution of each feature (sepal length for example) of the Iris dataset use Numpy and Seaborn libraries like the first plot in the image below: However, I don't ...
Kt Student's user avatar
0votes
2answers
50views

Float to int of vector

I have vector with data type of float, mainly float32. The zero value is the baseline a.k.a. mean/center of data. It has shape (batch_size, seq_len). I want to ...
Muhammad Ikhwan Perwira's user avatar
1vote
1answer
26views

implementing the SIRD model in python

im doing a project for my class where im trying to implement the sird model with the vaccinated population. Ive written my code based on the equations i have but something seems off in my graph. the ...
arthika 's user avatar
0votes
0answers
28views

Numpy implementation of Matern covariance kernel derivative

For my research, I'm making use of the Numpy implementation of the Matern covariance kernel. To make sure I'm understanding what's happening, I try to derive the formulas inside the Numpy ...
Woutervh's user avatar
0votes
0answers
37views

scikit-learn upgrade - how to fix breaking change?

i've inherated a solution that runs in databricks runtime 7.3, and it is using scikit-learn 0.21. Databricks runtime must be upgraded, and so existing scikit-learn version is not compatible with ...
otk's user avatar
  • 121
0votes
0answers
8views

Iterating over ranges defined by a pair of integer arrays

I have a multidimensional array $\boldsymbol{A}$ of values and want to calculate the sum of values for every orthogonal range. The orthogonal ranges are defined by a pair of "antipodal" ...
Manfred Weis's user avatar
1vote
1answer
124views

Difficulty understanding .moveaxis in Numpy

I am having difficulties understanding .moveaxis in Numpy. I first create an array by using a=np.arange(24).reshape(2,3,4). The ...
Nighty's user avatar
0votes
1answer
45views

ValueError: Found input variables with inconsistent numbers of samples: [0, 6]

I am trying to fit some data inside an algorithm, but i am getting this error: ValueError: Found input variables with inconsistent numbers of samples: [0, 6] How i ...
Filipy's user avatar
-1votes
1answer
82views

AttributeError: 'numpy.ndarray' object has no attribute 'columns' when I try to scale the dataset

...
Pranav Kaushik's user avatar
1vote
0answers
14views

Efficiently Implement a Data Transformation || Pytorch || coding advice

I have created the following class and function to create a 'custom' dataset. The use case was to sample every nth image from a data set to reduce the size of the data set while still maintaining ...
James's user avatar
0votes
1answer
28views

Why does largest eigen value used for eigen vector calcuation?

Why is the largest eigenvalue used for eigenvector calculation? What is the significance of using a largest absolute value for the whitening of a picture?
EMKAY's user avatar
-1votes
1answer
82views

TypeError: unhashable type: 'slice' K-Means; Custom code for K-Means

Problem Statement The goal is to have the K-Means customer code run for clusters and not use scikit-learn libraries. Learning exercise. This K-means has the standard predict, fix, centroids, cluster ...
Data Science Analytics Manager's user avatar
0votes
2answers
908views

Solve a non-linear system, in Python, with the GAUSS-NEWTON algorithm? (Jacobian matrix J, etc.)

I would like to solve a non-linear system (which contains the goals of a football team in previous matches) using the Gauss-Netwon algorithm, in order to find the parameter (of frequency) to use as ...
Zollikofen4's user avatar

153050per page
close