ValueError: X has 32 features, but GradientBoostingRegressor is expecting 33 features as input - gradient

i encountered a problem whereby i kept getting the error 'ValueError: X has 32 features, but GradientBoostingRegressor is expecting 33 features as input.'
i have checked through all my code using.shape and it showed 33.
However, as i tried to apply PSO to it, it kept telling me my X only has 32 featues. May i know what is wrong?
Below is the link to my Github Repository! Much Appreciation in advance!
https://github.com/chinsiang96/Thomas-IMRE/blob/main/Gradient%20Boosting%20%26%20INVERSE%20Trial%20-%2029062022-Copy1.ipynb

Related

OpenNN Release library not found during make?

First, if this is not a good place to ask this/put this please let me know
so I have been trying to get this to work for.... a week or two now, but to no avail, and getting the same error every single time and I no longer know what to do
heres what I get every single time I try to run the command make after running cmake -DCMAKE_TYPE_BUILD=Release .
any help would be appreciated as I want this to work(I have tried litterally now about 23 different libraries for C++ neural networks that support lstm and/or CNN's, and only 1 has worked but it doesnt support either of those)
Thanks!

Knative/Istio error: INTERNAL:inconsistent global dictionary versions used: mixer knows 221 words, caller knows 222

I'm getting this error on Google Kubernetes Engine when I try to call my Knative Endpoint:
INTERNAL:inconsistent global dictionary versions used: mixer knows 221 words, caller knows 222
A quick google search led to no one reporting any error like this before. I started reading the Istio code, but I'm at a total loss as to what this error means: https://github.com/istio/istio/blob/master/mixer/pkg/api/grpcServer.go#L87
I've gotten this error in a number of different contexts with a number of different versions of Knative, Istio and Kubernetes. Basically I'm looking for some sort of guidance as to what this error means so I can go about debugging it.
Thanks!

Error after mosaicing face in opencv and c++

Following my previous post Mosaicing face problems in opencv , everything was working fine until I tried it again today and I get this error . Everything seems to be alright but I am confused why I am getting this error. Can anybody help please?
thanks
The error says that the source vector or the destination vector of some algorithm does not have enough data required by a particular algorithm present in imgwarp.cpp
As I have no idea of your code, I assume that you may be using getAffineTransform or perspective transform.
Probably the assertion failure must be from getAffineTransform. It must require 3 points for its input and output. Have a look at the code on how these points are selected.
As you mentioned that the code was previously working, there is a possibility that the input images are changed, mostly the new one is with a different dimension.

libav video encoding ratecontrol.cpp:766

I'm having a bit of trouble trying to encode a video using libav.
I get an assert error from ratecontrol.c : 766 saying that q>0.0
I have no clue what is going on, I know that the letter q usually stands for quality, where 0 is lossless.
But in this case, I just can not grasp what could be wrong.
I have a lot of code regarding this, and posting it here is not possible. I'm using the ffmpeg package 1.0 with gpl and libx264. I'm trying to encode using the libx264 encoder with a crf value of 1.
I've checked the values going in and they seem sensible, I tried to save the given images to separate .bmp files and everything seems to be in order.
Edit:
Got it, bitrate was not compatible with the encoder.
It's strange that it should do something like this to indicate this problem..
The file in question seems to be libav ratecontrol.c
The lines surrounding that one is:
763 q= modify_qscale(s, rce, q, picture_number);
764
765 rcc->pass1_wanted_bits+= s->bit_rate/fps;
766
767 assert(q>0.0);
So it seems you'd have to dive into and understand modify_qscale.
Since this question is very general, I suggest you try poking around the code, trying to understand it a little bit.

Reed-Solomon Decoding

I've got a sequence of 28 bytes, which are supposedly encoded with a Reed-Solomon (28, 24, 5) code. The RS code uses 8-bit symbols and operates in GF(28). The field generator polynomial is x8+x4+x3+x2+1. I'm looking for a simple way to decode this sequence, so I can tell if this sequence has errors.
I've tried the Python ReedSolomon module, but I'm not even sure how to configure the codec properly for my RS code (e.g. what's the first consecutive root of the field generator polynomial, what's the primitive element). I also had a look at Schifra, but I couldn't even compile it on my Mac.
I don't care too much about the platform (e.g. Python, C, Scilab) as long as it is free.
I successfully built an embedded data comms project that used Reed Solomon error correction a few years ago. I just had a look at it to refresh my memory, and I found that I used a fairly lightweight, GPL licenced, C language subsystem published by a well known guy named Phil Karn to do the encoding and decoding. It's only a few hundred lines of code, but it's pretty intense stuff. However I found I didn't need to understand the math to use the code.
Googling Phil Karn Reed Solomon got me this document.
Which looks like a decent place to start. Hope this helps.