Why do I get an Index Error in MACE for TimeSeries XAI?
for a university project I am currently testing XAI techniques for TimeSeriesData. In particular I am testing MACE and SHAP from OmniXAI MACE from OmniXAI. Even though implementing and running SHAP...
View ArticleConverting data in dataframe to minutes and meters
data.csv: (journeyTime is ms and length is mm)roadNo time journeyTime length speed1544 2024-01-01 00:00:00 1832 34439 18,79861582 2024-01-01 00:00:00 1524 28660 18,80581585 2024-01-01 00:00:00 1789...
View ArticleArduino control motors
I have a python code that sends strings like "1,1,20,1" where the first value is the motor selection, the second is the speed, then the steps and finally the direction.I have tried to move the motors...
View ArticleApproximation of Sin(x) using taylor series in PYTHON
I need to get the approximation of sin(x) using Taylor expansion:Taylor Expansion ImageHere is the Code:def factorial(number): # Factorial Function s = 1 for k in range(1, number): s *= k return sceta...
View ArticleCompare vocabulary size of WordPiece and BPE tokenizer algorithm
I have a text file. I used hugging face tokenizer library to ran WordPiece and BPE tokenizer algorithm on my text file. I trained them on the file and got the vocabulary size. In spite of my...
View Articlematrix multiplication in python "*" [closed]
If A is a matrix of order n, b a vector with n elements and c a vector with n elements, is A@(b*c) equal to (A*b)@c?I check if that was correct by reading some python book but I saw nothing about that...
View ArticleFastAPI / pydantic: field_validator not considered when using empty Depends()
I am following Method 2 of this answer to be able to upload multiple files in combination with additional data using fastapi. It is working fine.After starting to implement the handling of the...
View ArticleCreate new instance with old instance which we do not know the constructor...
I have a new class called DataSheet which is inherit from Pandas.class DataSheet(DataFrame): def __init__(self, name=None, **kwargs): super().__init__(**kwargs) self.name = nameThe initial dataFrame...
View ArticleGet schema of parquet file in Python
Is there any python library that can be used to just get the schema of a parquet file?Currently we are loading the parquet file into dataframe in Spark and getting schema from the dataframe to display...
View Articlehow to use subdomains in flask?
from flask import Flaskapp = Flask(__name__)@app.route('/')def index(): return 'This is the main domain.'@app.route('/', subdomain='<subdomain>')def subdomain(subdomain): return f'This is the...
View Articletensor shapes error only in neural network model fit process
I'm constructing some neural network for a kaggle competition and i acquired a very strange error that i have no idea to fix it.Here I constructed my model successfully and plot then with method...
View ArticleThe Python script for image cropping based on annotation files fails to...
I have annotated images and aim to load and crop them based on the boundary box information provided in a text file. Despite my code implementation, I'm encountering inaccuracies in identifying the...
View ArticleHow To Fix "IndexError: list index out of range" when launched by Systemd?
I'm trying to fix this issue: crawl_oled.service - test OLED SSD1306 Loaded: loaded (/lib/systemd/system/crawl_oled.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since...
View ArticlePython/Telethon on SQLite database operational error: unable to open database...
I have a python/telethon Telegram bot project consisting of a single python file, an SQLite databse, and a config file. The bot runs fine on my local system in a virtual environment (all three files...
View ArticleWhat is the "underlying code" of a Python `with` statement?
Suppose you have:with with_target_expression() as with_variable: with_block_contents(with_variable)I understand the basic high-level intent here - that the target / with_variable will be "gotten rid...
View ArticleIssue with Django's LoginView after customizing User Model
I've encountered an issue after customizing Django's built-in User model (AbstractUser). I've created a custom user model named TheUser which inherits from AbstractUser. After making this change, the...
View ArticleArima model predicitons are not correct
Im working on a project in which im trying to make an ARIMA model in python tht predicts future Stock / Crypto prices. it turns out that the code is functional but when i plot the "Predicitions". it...
View ArticleBuilding recommender system based on user characteristics
I have a database where each row is a user, and it has two types of columns: features of the user and genre grading from 0 to 6. For example:UserAgeSex...Genre 1Genre 2...118M45275F32345M01Let us say...
View ArticleIssue- Getting excel file from sharepoint using python
Error is coming while i am trying to get files from sharepoint using following python code. Here is the error msg : An error occurred while retrieving token from XML response: AADSTS53003: Access has...
View ArticlePartitioning Parquet AWS Wrangler with LakeFs
I was trying to partition the parquet on S3 and it worked with AWS Wrangler.basename_template = 'part.'partitioning = ['cust_id', 'file_name', 'added_year', 'added_month', 'added_date']loop =...
View Article