#data-science-and-ml

1 messages · Page 162 of 1

main fox
#

Accept the limitations

solar siren
#

i did both but i left linguistics behind after graduation to continue with cs

odd meteor
#

The classification report screenshot you shared is related to a classification problem but you're mentioning R2 (coefficient of determination) which is related to regression task.

Confirm you're not making a mistake on your evaluation metrics of choice (R2)

charred light
#

How should I tune a GAN to force a mode collapse? (with the hyperparameters batch_size, lr, n_epochs, hidden_dim, latent_dim, leaky relu t/f)

I tried a small epoch with small hidden/latent dims (100/10) but it fails to generate. (Only noise). Should I be increasing my epochs but keep the dims small?

odd meteor
#

From this image, you have a class imbalance data. For example, out of 480 samples in your data, class 3 and 8 have just 1 and 6 examples respectively.

You need to handle the class imbalance problem. The model will most likely improve when you do that.

safe agate
haughty depot
#

Has anyone tried to integrate concept of linformer into transformers from scratch?

#

I'm having issues with shapes after projection, and was wondering if anyone could direct me to right direction

river cape
#

are there any free llms apis which i can use?

errant lake
#

well all open source models are 'free'

#

as long as you can host one of them

rich river
#

I need help
from torchvision.tv_tensors import Mask
Im using C++ and I really need this function
I have built torchvision from source on my machine
#include <torchvision/vision.h>
the vision.h file looks like this

#pragma once

#include <cstdint>
#include "macros.h"

namespace vision {
VISION_API int64_t cuda_version();

namespace detail {
extern "C" inline auto _register_ops = &cuda_version;
} // namespace detail
} // namespace vision

I tried vision::detail::tv_tensors::Masks(pred_masks)
but it just seems wrong

#

it seems namespace tv_tensors does not exist, and if I remove it, it will say namespace "vision::detail" has no member "Masks"

#

original python codes

        self._pred_masks = F.interpolate(
            model_output[0]["masks"][scores_mask], size=self._color_image.size[::-1]
        )
        self._pred_masks = torch.concat(
            [
                tv_Mask(torch.where(mask >= 0.5, 1, 0), dtype=torch.bool)
                for mask in self._pred_masks
            ]
        )

my C++ codes

  torch::Tensor const masks = torch::from_blob(
      model_output[3].GetTensorMutableData<double>(),
      {num_pred_bbox, 1, target_height_, target_width_}, torch::kFloat32);

  torch::Tensor pred_masks = torch::nn::functional::interpolate(
      masks.index({scores_mask, torch::indexing::Ellipsis}),
      torch::nn::functional::InterpolateFuncOptions().size(
          std::vector<int64_t>({input_height_, input_width_})));

  // mask is a two classificaiton problem
  // use 0.5 as mask confidence threshold
  pred_masks = pred_masks.ge(0.5).to(torch::kUInt8);

  std::vector<torch::Tensor> mask_vec;
  for (int i = 0; i < pred_masks.sizes()[0]; ++i) {
    mask_vec.push_back(pred_masks[i]);
  }
  pred_masks = torch::cat({mask_vec}, 0).squeeze();

but it seems just gives me wrong masks

jaunty helm
#

Openrouter has some as well

weary timber
#

been using it with no issues

#

its a little slow tho

#

1k token prompt = 50sec response time

odd meteor
patent plinth
#

hi does anyone know how i can format python
in discord]

errant lake
#

use triple backticks with py

#
```py
river cape
#

thanks @errant lake @odd meteor @weary timber @jaunty helm

errant lake
#

Np, I also learned the existence of all these free apis 😄

#

Didn't expect to find Deepseek r1 for free or groq for free, that's super cool

river cape
errant lake
#

yeah, that's roughly what happens

#

if you want to inspect how that works in action, you can have a look at Ollama or LMstudio

#

you can host very small models even on a mchine with no GPU

#

Otherwise, it's just a classic rest api

#

you can also explore how that works with python as well, that's probably one of the most popular exercise

river cape
#

oh yea i need to work on apis too , thanks 🙂

warm iron
#

Guys need help with handling large amounts of data. I extracted features with VGG16 from brain CT scan images . 19GB of features and most of numbers are zeroes (I guess it’s all that black area around the brain) . How can I handle that? I can’t just load it all and pass it through a NN for classification.

weary timber
midnight rain
#

has anyone worked with tkinter here?

#

like a professional in tkinter

opaque condor
#

Is there a way of making it so that my python neural network can be graft so I can tell through each training that goes through how well it's doing also how long is usually an epoch cuz I wanted to test my network for a week at least

serene scaffold
opaque condor
#

Yes

opaque condor
serene scaffold
agile cobalt
serene scaffold
#

Is there one for pytorch?

agile cobalt
opaque condor
serene scaffold
solar siren
#

pandas are very useful in this case and it is very easy to use

serene scaffold
solar siren
#

i used pandas to create csv files like grouping and merging from different csvs

opaque condor
#

If I may how come when I try to train my neral network it mainly uses my CPU instead of using my GPU

faint quail
opaque condor
# hearty depot u gotta specify it

I do specify I went into task manager when I was working with my no networking the CPU shot up more than the GPU so that's why I'm wondering

glacial root
#

for anyone who has used the PIL library, is there a way to create grayscale rgba images (it would be from a three-dimensional matrix where there are 2 two-dimensional matrices, one being the image intensities (which makes it grayscale) and the other being the alpha channel)

#

i can't find anything on it when i search it up, nor is this specific case in the documentation

tawdry sleet
#

Hello! sorry, i am a newbie. I have a few questions:
How does ML work?
I was trying to create a malware detection AI.
here is what i did

Get's a cool DB with 56 columns online
use scikit-learn and ExtraTreeClassifer to get most useful columns
Train A.I on those columns(Random forest classifier)
it scores 99%
Tries to use a real file(extract same features)
fails with most of the files.

serene scaffold
#

Train A.I on those columns
this statement hides an absurd amount of information

tawdry sleet
serene scaffold
tawdry sleet
serene scaffold
tawdry sleet
serene scaffold
#
real_train, real_test, malware_train, malware_test

why are these prefixed with real_ and malware_?

tawdry sleet
serene scaffold
#

is the point that the model should be able to distinguish safe programs vs malware programs?

tawdry sleet
#

yes

serene scaffold
#

there needs to be a mix of both safe instances and malware instances in both the train and test data. can you explain why that is?

wise marlin
#

Was given a take home JQR (Job Qualification Requirements) based on a electronic retail store with multiple sheets in excel file with different things about company. What is the most efficient way to go through all the sheets as csv files loaded into python in order to choose the best columns to merge into separate dataset in order to perform analysis? TIA just wanting to see if there are any faster ways

serene scaffold
wise marlin
serene scaffold
wise marlin
serene scaffold
tawdry sleet
shadow atlas
#

Anyone here who may have used CrewAI?

hearty depot
#

tried testing the validation accuracy cuz ur model might be overfitting

wise marlin
odd meteor
# opaque condor I do specify I went into task manager when I was working with my no networking t...

To be able to train your NN on GPU, you need to

  1. Have a machine with GPU (not all GPU works, for example if your machine has Iris XE GPU from Intel instead of Nvidia GPU variants, you won't be able to utilize the GPU to train your NN due to absence of CUDA)

  2. If you've confirmed your machine has NVIDIA GPU, you need to also ensure you installed PyTorch that comes with GPU compatibility. https://pytorch.org/get-started/locally/

  3. Once you've checked 1 and 2, you need to use the .to(device) to train on GPU ( https://pytorch.org/docs/stable/generated/torch.Tensor.to.html )

PyTorch

Start Locally

odd meteor
shadow atlas
#

I'm trying to make the use of tools in crewai specifically using my google Gemini API but somehow i am unable to run it. It keeps giving issues regarding wrong API key while it is working perfectly fine when running without the tool. Has anyone else used the tools with Gemini API in CrewAI?

vocal cove
#

I like the approach because they utilize transformers to tackle prosodic speech. It's really brilliant.

river cape
opaque condor
odd meteor
# opaque condor GPU: Intel(R) UHD Graphics 630

Unfortunately, with Intel(R) UHD Graphics 630, your laptop doesn't support local GPU training for neural networks.

Leider unterstützt dein Laptop kein lokales GPU-Training für neural Networks 😟

opaque condor
#

Okay so does any one of these on this list have anything like cuad?

rugged stream
#

Hi folks, i have an interview/technical assessment coming up for a data analytics position in a major high street bank and i am looking for study focuses, i will be using:

spreadsheets
SQL
Python

Statistics
Probability
Linear Algebra
Quadratics
Polynomials
Calculus

Any prep resources would be greatly appreciated,

Ty!

opaque condor
hearty depot
opaque condor
# hearty depot Y need NVIDIA for cuda

My CPU is being eaten up by my machine learning and I wanted my machine learning to go quick it's still quick but I want to also work on other things too

hearty depot
#

Also cloud gpus might be a better option

opaque condor
#

I want something like physically can have for my machine because Google does not like me for some reason so if I can add it to my machine I'll take whatever I can

opaque condor
glacial root
#

has anyone here tried to implement AlphaDog, if so, do you guys also have the issue of the image not properly forming

#
import numpy as np
from PIL import Image

rgb_ai_image = Image.open('img_data/cars/carsgraz_076.bmp')
rgb_human_image = Image.open('img_data/bikes/bike_112.bmp')

rgb_ai_image_matrix = np.array(rgb_ai_image)
rgb_human_image_matrix = np.array(rgb_human_image)

ai_image_matrix = (0.299 * rgb_ai_image_matrix[:, :, 0]) + (0.587 * rgb_ai_image_matrix[:, :, 1]) + (0.114 * rgb_ai_image_matrix[:, :, 2])
human_image_matrix = (0.299 * rgb_human_image_matrix[:, :, 0]) + (0.587 * rgb_human_image_matrix[:, :, 1]) + (0.114 * rgb_human_image_matrix[:, :, 2])

ai_image_matrix = ai_image_matrix.astype(np.uint8)
human_image_matrix = human_image_matrix.astype(np.uint8)

ai_image = Image.fromarray(ai_image_matrix, 'L')
human_image = Image.fromarray(human_image_matrix, 'L')

normalized_ai_image_matrix = ai_image_matrix / 255
normalized_human_image_matrix = human_image_matrix / 255

one = np.ones((ai_image_matrix.shape))
attack_image_alpha = ((normalized_human_image_matrix - one) / (normalized_ai_image_matrix - one)) * 255
attack_image_alpha = attack_image_alpha.astype(np.uint8)

attack_image_matrix = np.empty((ai_image_matrix.shape[0], ai_image_matrix.shape[1], 4), dtype = np.uint8)
attack_image_matrix[:, :, 0] = ai_image_matrix
attack_image_matrix[:, :, 1] = ai_image_matrix
attack_image_matrix[:, :, 2] = ai_image_matrix
attack_image_matrix[:, :, 3] = attack_image_alpha
attack_image = Image.fromarray(attack_image_matrix, 'RGBA')

rgb_ai_image.close()
rgb_human_image.close()```
agile cobalt
#

I'd recommend sharing Notebooks via GitHub (whenever it's inside of a repository or just a Gist) or Colab instead of just uploading the file to discord

glacial root
#

it's a pretty short program though so i just directly sent it instead of using gist

#

by the way the ai image is the what the ai should see and the human image is what people should see

#

here's the formula by the way

#

I_eye is the image seen by people

#

A is the alpha channel matrix

#

I_in is the grayscale image without alpha channel

#

and BKG is the background color (typically just 1 cause it's a white background)

glacial root
agile cobalt
#

pretty sure that your formula is different from the paper?
in first place you have no reference to the x 0.8 + 0.2 and x 0.2

vestal moth
#

So I have a 3D pose estimation model with the x, y, z coordinates for each bodypart derived in h36m format. I want to smooth it using a butterworth filter to prevent some frames that look glitchy. How does that look? Do I need to apply the filter for each body part x, y, z coordinate respectively? For reference, h36m has 17 body parts so the filter would be used 51 times with this logic, I'm not sure if that's overkill. Should this filter be done with the 2D estimates instead, lowering it to 34, especially since the model is compiling the z coordinates by "jittering" the x and y positions.

safe agate
#

Another option is marimo, you can share a link to your notebook.

glacial root
#

not sure where that comes from though

glacial root
river cape
# opaque condor

i think gtx 1050 ti is cuda-compactible check it out , although I would suggest using colab

sudden turret
#

i'm having basically the same issue currently actually. did you ever find a solution to this?

solar siren
#

that cuda-compactible thing stopped me from using different stuff also, is it possible to enable it somehow for every nvidia gpu

spring field
solar siren
#

i don't really have good knowledge on gpu's but are there any new nvidia gpu that doesn't supports it ?

spring field
#

I don't know, but I'd find that unlikely

solar siren
#

if i buy new nvidia gpu does it have cuda toolkit preinstalled in it or do i have to install it

serene scaffold
solar siren
#

nice it means that is ready to use with CUDA, because two weeks ago i tried to use Wan 2.1 with nvidia gpu and it asked me to install it's toolkit to proceed

solar siren
#

that new video generator made from ali baba team which is completely free to use locally

serene scaffold
#

Did you pip install diffusers?

solar siren
#

no i was trying to use it inside pinokio which is something like virtual environment

iron basalt
#

The CUDA SDK contains the CUDA compiler based on LLVM, this compiler compiles CUDA kernels which get sent to the Nvidia driver (which you also need installed to do anything with the GPU).

solar siren
iron basalt
#

CUDA is Nvidia's thing for all their GPUs for a while now and moving forward.

#

It's nothing special, it's just the API.

#

It's not any different really from Vulkan, OpenCL, etc at a fundamental level.

chilly oar
solar siren
hallow badger
#

ai safety forever

chilly oar
serene grail
warm iron
#

The state of my coding skills… need your advice.

So I’ve been coding for a while , I only deal with artificial intelligence so for me I mostly work with certain libraries like pandas, numpy , os and more , and I deal with CNN , NN architectures.

For example when I need to work with a data frame and do a certain thing(I don’t know how to do it yet) I ask chat GPT and to teach me and show me how to do it. The thing is, most of the time I can understand the code and the logic and how it works (although sometimes I meet something I don’t understand, for example why this variable is here).

So I can understand most of the code I get form chat GPT but I can’t write it on my own , I kinda often forget the steps or the syntax. In my opinion it’s the lack of knowledge of certain libraries.

Does everyone get to this point in learning and once you overcome you become mostly independent in programming?

glad pagoda
#

guys i need help of the AI people here
i have an assignment to make a recipie generator but i have no idea where to get the dataset from

serene grail
glad pagoda
#

what kind of dataset would even be used ehre

#

here

jaunty helm
#

to improve, just write more code
by the 100th time you loc and iloc again I doubt you'll forget how to index for a long time

warm iron
#

Yeah I’ve been doing that , thanks

river cape
zealous girder
#

hello guys, I had a question on how to integrate multiple languages. Suppose I have written the backend in Go, but I want to add a feature for some recommendation/generation. So I used python to make an ML model for it, so how do I integrate this ML model made in python into my Go backend?

mortal star
arctic wedgeBOT
#

Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.

glacial root
#

is graph dbms useful for ml

serene scaffold
acoustic seal
#

can anyone help me with this? im trying to install tensorflow but it just doesn't exist?

ERROR: Could not find a version that satisfies the requirement tensorflow[and-cuda] (from versions: none)
ERROR: No matching distribution found for tensorflow[and-cuda]```
small wedge
glacial root
serene scaffold
glacial root
#

because we can organize words based on semantics

#

for organizing the data

serene scaffold
#

I've used graph databases to represent data that's relational rather than tabular

glacial root
#

so then it would make sense for organizing language data based on semantics

#

they should call relational dbms as tabular dbms instead

serene scaffold
#

that's what I do.

glacial root
# serene scaffold that's what I do.

do you think this would be a good project to work on, making an etl pipeline from a graph dbms that stores language data organized by semantics that send data to a llm built from scratch?

acoustic seal
glacial root
#

oh i'm not sure then

acoustic seal
glacial root
acoustic seal
#

cuda is for using the hardware for processing

but the thing is, even installing tensorflow doesn't work

glacial root
#

i see

serene scaffold
acoustic seal
#

" llm built from scratch? "

hm

glacial root
#

i know nothing about nlp yet and it's not my main field, but it's an interesting field and so i want to learn a bit about it

serene scaffold
acoustic seal
glacial root
glacial root
#

like just something small

acoustic seal
glacial root
#

i thought all chatbots used a large language model

acoustic seal
# glacial root yeah that would be great

try learning the pre processing part first.

and if you want a project to build with, try building a topic modelling project using bert and lda.

once you are through with this, pretty sure you'd have a great idea

#

bert comes under deep learning, lda is simple ml

small wedge
glacial root
#

i've tried a neural network from scratch and it helped me learn a lot about the inner workings

acoustic seal
acoustic seal
small wedge
#

3.13 support isn't out on pypi yet

acoustic seal
#

that makes sense, thanks for the help.

glacial root
#

going through with the arch?

serene scaffold
# glacial root like just something small

look into what was required to train GPT-1--how many parameters, how much GPU memory, how much training data, etc. That would give you a sense for what the lower bound is for an "L" LM.

spring field
# glacial root so i shouldn't try it from scratch?

you can build a transformer from scratch, sure, that's probably not a bad exercise
but you simply do not have enough compute and information to train it from scratch nowhere near the levels of what LLMs, even say GPT2 can do

glacial root
#

so not all chatbots are llms

acoustic seal
spring field
acoustic seal
#

clippy my beloved

glacial root
#

so then are the less computationally heavy ones called slms or mlms?

serene scaffold
# glacial root so not all chatbots are llms

depends on what you consider a chatbot. Eliza was the OG. https://en.wikipedia.org/wiki/ELIZA

ELIZA is an early natural language processing computer program developed from 1964 to 1967 at MIT by Joseph Weizenbaum. Created to explore communication between humans and machines, ELIZA simulated conversation by using a pattern matching and substitution methodology that gave users an illusion of understanding on the part of the program, but ha...

glacial root
#

for small/medium language models

spring field
#

or ELIZA

serene scaffold
glacial root
#

i see

#

so it doesn't actually mean large in computational power required

spring field
#

MLM is what you'd almost call a scam 😁

serene scaffold
#

the first person to call their LM an LLM just wanted to bring the point home that it was large. I guess.

acoustic seal
#

no L refers to to large amount of data it went through during training

glacial root
#

oh

serene scaffold
acoustic seal
#

when you say damn thats a lot

glacial root
#

i'm assuming there's not an explicit cutoff

spring field
glacial root
#

kind of like how there's not an explicit cutoff between regular ml models and dl models

acoustic seal
#

mm that sounds about right

#

LMAO

serene scaffold
#

So, the L in LLM doesn't signify a non-arbitrary distinction between LMs that aren't designated as LLMs. Which is why I advocate for just dropping the first L.

small wedge
#

I feel this way about the term deep learning

glacial root
#

i guess people think that lm doesn't have the same ring to it as llm

small wedge
#

At this point it's sorta just a catchall for any modern ml model

glacial root
#

so dl to ml is like llm to lm

small wedge
#

Imo pretty much yeah

spring field
# serene scaffold what's the cutoff?

I mean... to be fair, there's no clear cutoff between homo sapiens and whatever came before yet we somewhat clearly have defined both species
though of course the field of AI is ironically rather lacking in the taxonomy department...

serene scaffold
glacial root
#

i really gotta learn the theory and terminology

#

i have no idea what architecture means in the context

serene scaffold
#

but that includes language models that aren't generative, and generating is the main thing that people think LLMs are supposed to do.

glacial root
small wedge
#

GPT is probably a more useful term

glacial root
#

generative preprocessing transformer right

small wedge
#

Pretrained

glacial root
#

oh crap

serene scaffold
glacial root
#

oh

#

i meant language models that perform sentiment analysis

serene scaffold
#

you could adapt a language model for that purpose.

small wedge
#

Even the line between a generative/nongenerative model seems pretty blurry like

#

It doesn't actually say much about the model itself

#

Just how we use its output

serene scaffold
small wedge
#

What about like a GAN

glacial root
# small wedge Just how we use its output

i see, so it's like how a convolutional neural network can be used either to detect objects or to classify images into categories (though these are probably the same thing, just kind of opposites of each other) but the inner workings of the cnn are almost the same

small wedge
#

The generator there doesn't get any training data it just produces an image from noise and is scored by the discriminator, does that count as producing the same kind of thing as it's input because it takes a set of pixels and outputs a set of pixels?

small wedge
glacial root
#

so a gan is a model that continuously trains by creating its own data

small wedge
#

A gan is a system where two models train based on each other's outputs

glacial root
#

i see

small wedge
#

A generator makes an image from noise and a discriminator is given the generated image and a real image from the dataset, the score of each model is based on whether the discriminator can pick out the fake one or not

glacial root
#

so this is a way of training against adversarial attacks

small wedge
#

No

#

Different usage of the word adversarial there

#

In a gan adversarial just means they compete and influence each other's scores

#

An adversarial attack is something you do to break a models normal function, like wearing patterns it might recognize as faces to trick a facial detection model to fail at finding yours

glacial root
#

recently i've read a research paper on adversarial attacks that utilize the alpha channel of grayscale rgba images in order to make these attacks universal and eliminate the need for queries

#

it's called AlphaDog

fervent canopy
hallow badger
hallow badger
slim storm
#

can sklearn's KNNImputer impute categorical value by selecting the most frequent value from the neighbors?

slim storm
#

or rather can i tweak the SimpleImputer to only select the most frequent value from the nearest neighbors?

hoary wigeon
#

Hey there, I need help to resolve below error.

Traceback (most recent call last):
  File "C:\Users\cmx\OneDrive\Documents\GitHub\project-x001\background_replacement.py", line 3, in <module>
    import mediapipe as mp
  File "C:\Users\cmx\OneDrive\Documents\GitHub\project-x001\.venv\Lib\site-packages\mediapipe\__init__.py", line 15, in <module>
    from mediapipe.python import *
  File "C:\Users\cmx\OneDrive\Documents\GitHub\project-x001\.venv\Lib\site-packages\mediapipe\python\__init__.py", line 17, in <module>
    from mediapipe.python._framework_bindings import model_ckpt_util
ImportError: DLL load failed while importing _framework_bindings: A dynamic link library (DLL) initialization routine failed.
wise marlin
#

I have a data frame with categorical values that I converted using pd.get_dummies, is there a way to return the data frame with the updated dummy values without creating two extra columns (True/False) ? The extra columns are causing a headache trying to model... TIA

unkempt apex
#

but anyways, excellent idea

fervent canopy
#

Yeah, like I need to handle it gracefully

#

I will fix that

unkempt apex
fervent canopy
#

I am using mobilenet for feature extraction and then feeding the features to a dense network for learning

charred light
#

Is there a faster way to sample a df column of lists of numbers than
df['list_values'].apply(lambda x: random.choices(x, k=sample_n)

#

Or avoid storing it in this format to begin with?

agile cobalt
#

pandas does not supports nested data very well

#

you could try using polars instead if you need of more speed, would be df.select(pl.col('list_col').list.sample(k)) in it, but changing which library you're using is a fairly big change

charred light
#

I was wondering if there's some kind of transformation I could do so I can vectorize the entire process.

#

Since the data looks like:

abc, [323, 3525, 23423]
efg, [4676, 342, 5474, 9893]```
Where values is not fixed length.
untold bloom
#

how big is the frame

#

you can explode, groupby, sample, groupby, aggregate

#
In [32]: df.shape
Out[32]: (20000, 2)

In [33]: %timeit df["values"].apply(lambda x: random.choices(x, k=2))
32.1 ms ± 677 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

In [34]: %timeit df.explode("values").groupby("id").sample(2).groupby("id")["values"].agg(list)
28.3 ms ± 656 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
#

slight speed but

charred light
#

188,517 x 28 columns

#

values is a list of values though.

untold bloom
#

what is that supposed to mean with regards to the code i posted please

charred light
#

Oh, the explode

untold bloom
#

also GroupBy.sample != random.choices but there is probably some parameter to behave as such

#

in terms of replacement

#

or maybe they are the same idk

charred light
#

There's a bunch of applys being used to sample which is really slow once you run it across the 188k rows. zzzzz

exotic star
#

i just got back into programing(3 days ago), watched the 4h codecamp tut on 2x speed and made a simple encryption program i was never good at programming btw. How would i go forward if i wanna get into AI

#

tho i love other aspects of programming as well

#

so a better question would be, how do i get better moving forward and then how can i transition into learning ai

upper bronze
#

Hello, Does anyone recommend DataCamp?

glacial root
#

is sobel operator -> hysteresis thresholding -> canny operator/filter a good framework for an edge detection algorithm?

daring crystal
#

i just started in ml and i am currently going through pytorch? is this right approach?

#

i find pytorch intresting

jaunty helm
barren fable
#

Hi, I'm actually a newcomer in the LLMs field, and I studied the basic vanilla RNN, LSTM, Word2Vec, Seq2Seq (basic encoder-decoder), attention, transformers, decoder-only, and encoder-only all from the StatQuest YouTube channel.

So after it, I encountered lots of terms and topics such as Bert, LangChan, GenAI, MCP, RAG, CAG, Agents, Llama, T5, and others.

So I'm actually confused; I need kind of a structured roadmap because there are lots of terms, and I don't know from where to continue. Also, I read some online articles; some said learn transformers, then do some LLM fine-tuning; others said learn GenAI, then agents, etc.

So can someone help? And thanks!

serene scaffold
barren fable
serene scaffold
#

Bert, LangChan, GenAI, MCP, RAG, CAG, Agents, Llama, T5
do you understand what each of these are?

barren fable
# serene scaffold > Bert, LangChan, GenAI, MCP, RAG, CAG, Agents, Llama, T5 do you understand what...

As I said, I'm a newcomer and what I studied and everything, but yeah, I searched about some of these, like
BERT, which is an encoder-only model, and its use cases are, for example, Text classification and sentiment analysis
T5 is text to text, which is an encoder-decoder model, and its use cases are for translation and text summarizing.
LangChain is a framework related to agents, I guess?
So yeah, that's it.

spring field
lavish wraith
#
    'price': [np.nan, 93.14, 92.97, 93.12, 93.20]  # Use np.nan
})
print(oil.dtypes)
# Only the missing value is filled, other values remain unchanged
oil['price'] = oil['price'].fillna(oil['price'].mean())
print(oil.dtypes)

print(oil)```
 when i add mean on missing value it change all row
#
0  93.1075
1  93.1400
2  92.9700
3  93.1200
4  93.2000```
spring field
lavish wraith
#

it could be display like 93.14, 92.97, 93.12, 93.20 but it add 0 on every row

small wedge
#

!rule ad paid

arctic wedgeBOT
#

6. Do not post unapproved advertising.

9. Do not offer or ask for paid work of any kind.

spring field
hollow pagoda
#

i just transformed this feature material for easier access to material %s, how should it be encoded?

#

theres 20 variants of materials for this case, should it be similiar to OHE with 20 columns with the decimal there

#

seems like itd work the same as ohe but its 0-1 instead of binary 0/1, if theres a better/easier way let me know i pick this back up tmr

hoary wigeon
#

@slate raven @hard night Hi there, I'm facing an issue related to mediapipe
ImportError: DLL load failed while importing _framework_bindings

I saw that even you guys have faced the same issue earlier. May I know how did you guys resolved the issue?

mystic harbor
#

@solid sealWe don't allow recruitment in this server, I've deleted your post.

limber spear
#

Why some of you make data science sound like it’s a chore. We should start at the root words. Data + science

barren fable
fresh harbor
#

I need to transform a user query like "fetch me products from brand X made before 2005" into an api call. i have approx 0 knowledge of ai so what is the easiest way i can do this? i don't want to train any models or use a cloud based approach like openai

grand minnow
opaque condor
#

So I have to download cuda along with getting a GPU that can run it

grand minnow
#

pretty much

opaque condor
#

Is there anything that I need to worry about motherboard,CPU, ect?

opaque condor
#

Here are the specs:

Processer:
Intel(R) i3-10100
CPU @ 3.60GHz 3.60GHz
Installed ram:
8.00GB(7.89 useable)

grand minnow
#

It looks ok. I would pump up the RAM with another 8GB and then add a decent GPU

opaque condor
#

Any recommendations?

#

For gpu?

versed axle
#

what is your budget?

opaque condor
#

Anything that's not really a over then maybe a thousand or even a hundred I didn't find one for $70 on marketplace but you know it's in a shady part of the state that I'm in

calm thicket
serene scaffold
# opaque condor For gpu?

the amount of GPU power you need varies wildly depending on what you're trying to do. I recommend not buying one (unless you want it for gaming) and renting cloud compute.

opaque condor
#

So if I can host it on my main machine I'm all up for it because I want you to pay rent and if I want to do something other for machine learning I can do renderings for Sims blender and panda3d

#

It makes it so that if I can't get into my account because Google just likes my password I can still work with a GPU on my system plus I've been meaning to upgrade it a bit

opaque condor
#

Sorry if I'm being a little off it's just since neural networks require something like a GPU to work more efficiently and Google dislikes me I do have to buy it but if Google likes me this time I can't always say that it will like me the same way each day if I'm counting and no network or training it so what I'm trying to do is get ahead of it so I'm wondering what's the best GPU for the type of material I have

hollow pagoda
limber spear
rugged stream
#

Hi folks, I have an upcoming assessment centre/interview for an apprentice data analyst position, I have pretty basic knowledge with spreadsheets, SQL, Python and some underpinning maths topics - can anyone give me some good resources to help me prep/study please?

glacial root
#

i mean yeah you could get started on the project without learning, but that would still involve learning/studying, it would just be side-by-side while working on a project and your learning would be more project-oriented

hollow pagoda
limber spear
limber spear
rugged stream
gray slate
#

Load some CSV files in, draw some graphs etc

#

what's an "assessment centre/interview" btw? will you actually speak to someone who you'll be working with, or is it some meat-market selling you on?

limber spear
gray slate
#

Oh a Discord server lol

rugged stream
gray slate
#

What do they do?

limber spear
gray slate
#

The org you'll be working for?

rugged stream
#

high street bank

gray slate
#

I'm only half joking - but go in knowing the tech stack they use. Do your research

rugged stream
#

ok i will focus on SQL, excel and maths in the form of probability/statistics/calculus

gray slate
#

Banks generally use Microsoft's stack and they like paperwork because real work is too difficult. But they'll look very smart and act the part that's for sure

#

(If you can't tell, I don't miss my time in retail banking)

#

Check on Glassdoor and see what stack they use, what they value, who their partners are - see if you can get any info. Then you can skim-read about technologies and name-drop them, so they can fight over who discovered you lol

#

Also, LinkedIn, see what technologies people who work there (in the same department you'll be in) have in their skills list

#

At a guess: R, Python + Jupyter notebooks. Probably Power BI and Oracle. If they have cloud then most likely Azure Synapse for big data. But yeah scope them out on LinkedIn.com/Glassdoor.com

lapis sequoia
#

howd you all get started with ai? i heard the salaraies were really high , $300,000

white reef
# opaque condor For gpu?

if you plan to work on big data or deep learning projects, runpod.io is a good provider for cloud gpu, it's not that expensive and you can run your project's docker or a jupyter notebook instance on an A100, a bunch of RTX GPUs and even H100.

#

i've been using it for my projects

#

it's truly useful

echo linden
#

how do i get started with data science and ai
i want to see if i can do machine learning for petroleum engineering

glacial root
#

he was simply quoting the other guy

limber spear
limber spear
hollow lake
#

I want to build a chatbot using an open source LLM?

#

Any suggestions ?

#

I will build this chatbot just for students questions about faculty informations (graduation, fields, ...)

serene scaffold
hollow lake
#

@serene scaffold thank you, I know that I should use RAG for extracting informations from external documents

#

I will try to buy it

#

what do you think about open source LLM like llama ?

serene scaffold
hollow lake
opaque condor
#

what do I have to do for the accuracy

exotic star
#

If I wanna do robotics and ai later on, is doing web scraping, storing and cleaning data with python the way to go for now? I find it fun and I think it'll be a useful skill going forward

#

I'm a beginner

#

Might even be useful for freelancing as well

grand minnow
opaque condor
hollow pagoda
#

Ts got nothing to do with robotics

#

Just use available datasets and learn machine and deep learning

untold pollen
#

How to get knowledge of phyton code which channel ?

delicate apex
#

!rule ad

arctic wedgeBOT
#

6. Do not post unapproved advertising.

grand minnow
arctic wedgeBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

untold pollen
#

!resources Hello

arctic wedgeBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

untold pollen
#

!resources print(“Hello”)

arctic wedgeBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

serene scaffold
#

@untold pollen please go to #bot-commands to experiment with the bot

exotic star
grand minnow
#

Don't overthink it

exotic star
#

i'll go for it

slim lance
#

(Please tell me if this is the wrong place to ask this question.)

Has anyone found a VSCode plugin that offers good support for exploring nested Python data structures? I use Data Wrangler for tabular data, but it isn't great for nested data structures. I use the Jupyter VSCode plugin and know people in the Jupyter community use Spyder for this, but I tried it a while back and it slow and unwieldy.

Note: I've been muddling by with pprint.

pale thunder
#

in a t-SNE plot, is there a useful axis label, and do the magnitudes of the points actually matter? Or should I just leave axes unlabeled?

hollow pagoda
#

i wouldnt know the answer but curious incase i run into tht problem, i just found data wrangler a few days ago its a gem

errant lake
jaunty helm
fresh harbor
#

and impossible to run locally

#

i am looking more at classic nlp solution (i got a bit more educated on this)

forest creek
#

do u guys know something about EHR(electronical healthcare records) and AI?

jaunty helm
# fresh harbor and impossible to run locally

you'd be surprised actually
models come in all sizes nowadays, even a cpu could reasonably run like qwen 3b
though too small to really converse with, it probably does fine turning user requests into api calls

fickle shale
#

How can i reterive reddit post with location like
e.g., "Need help in Austin" → Maps to Austin, TX)

cedar tusk
agile cobalt
# cedar tusk what i dont like about transformer based models is that they are randomized. It ...

for something to produce the correct output 100% of the time, in first place there must always be 0% ambiguity in its inputs

Make a traditional GUI (or even something akin to discord slash commands) and force the user to specify an unambiguous input instead of using any sort of statistical model if ensuring correctness outweighs the risks added from adding natural language convenience

glacial root
#

does anyone here know of a small dataset (around the size of mnist) that contains images of faces and non-faces

#

i tried searching for one but couldn't find what i was looking for

#

the image classifier i'm gonna be working on will just classify whether or not the image contains a human face, not anything more specific than that

serene scaffold
glacial root
#

cause it would take a while to get all of the images into a csv

#

if it's not in a csv and just a folder of images, it would take super long to get each image in matrix format

serene scaffold
glacial root
serene scaffold
glacial root
serene scaffold
#

!docs pathlib.Path.glob

arctic wedgeBOT
#

Path.glob(pattern, *, case_sensitive=None, recurse_symlinks=False)```
Glob the given relative *pattern* in the directory represented by this path, yielding all matching files (of any kind)...
glacial root
#

oh i didn't know that

#

thank you

viscid urchin
glacial root
#

thank you

fresh harbor
#

afaik these models contain knowledge about a lot more things that i wont ever need. can i just carve out the pieces i need and remove the rest? or am i getting it wrong

fresh harbor
#

i am afraid i can't run 7b locally

tepid tartan
#

Any project out on the internet or ideas for data analyst

glacial root
#

perhaps etl pipeline?

weary timber
#

i think that is the easiest way

slim lance
#

FTR vscode has a new setting to allow nested variable exploration in the debugger. It’s not great but it’s infinitely better than having to view nested data in wrangler.

notebook.variablesView

flint onyx
#

I need help interpreting this

#

does this mean that the model is doing good

viscid urchin
#

I'm not an expert at all, but I guess the gap between the red (testing) and blue (training) lines indicates overfitting?

flint onyx
#

thats what I was thinking

viscid urchin
#

Yeah, looks like it's working to me. Maybe you'd like to see more growth with larger training sets but that really depends on the domain I suppose

hollow pagoda
#

overfitting is if the gap grew bigger over time from testing accuracy dropping

#

its good

flint onyx
#

someone else in a diff server told me its still a problem

#

and that I should try to improve further

#

Ill try tuning again tn but if I cant seem to improve it then ig Ill just stay with this

jaunty helm
warm iron
#

Hi everyone
Is this behavior normal? I work with data in chunks, 35000 features per chunk. Multiclass, adam optimizer, BCE with logits loss function

final results are:
Accuracy: 0.9184
Precision: 0.9824
Recall: 0.9329
F1 Score: 0.9570

#

I have a guess why it happens
The data are the features extracted from Brain CT scan images, when i open it i can see chunks of zezors, then chunks of numbers, chunks of zeros, chunks of numbers, i assume chunks of zeors are the background in the image . Mayve this casues this flactuation?
everything black is set to zeros by relu I guess cos I used pretrained vgg 16 for features extraction

fiery bane
glossy zinc
#

!res

arctic wedgeBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

weary timber
#

does anyone know and have access to EmotionLines dataset?

#

as always the homepage of it is down

cold goblet
#

I am working on processing large amounts of JSON files (in PBs). The schema for the JSON is available with a few variations. The JSON schema is nested (two levels) and the values I'm interested in for filter and aggregation are not top level.

I need to filter on a couple of keys that are nested in the JSON and then aggregate the data to get mean, sum, and other statistics.

So, I am thinking of transforming the JSON data into multiple parquet files partitioned based on certain values that I'll filter on combined with SQL database that will store kind of metadata that'll help me figure out what parquet files needs to be processed.

Another concern is that some of these JSON file may be updated and I'll need to replace the data.

Currently, I have decided on MapReduce and Hadoop. I also found Apache Spark. Ideally, I want to distribute this file processing across multiple VMs.

Is there something I am missing in my approach? Is there a better approach or framework for this?

Also, the actual data analytics of the processed file will be happening in motherduck and I want to reduce the analysis time even at some cost to the storage and file processing time.

hollow pagoda
outer cloak
#

yoo

#

How can i use pandas and numpy?

agile cobalt
#

read their user guides

outer cloak
#

i want a simple explaination

woeful escarp
#

Hello, I am starting in ML, I would like to work in a project to improve, send me DM

outer cloak
#

i want to learn ML too it is fun!!

#

i like watching a machine learn things!!

viscid urchin
serene scaffold
viscid urchin
#

OK, my bad.

#

Seemed like it might give them some traction

#

Would you say it's more correct to say that pandas is about organizing/analyze/manipulating the data, and that numpy is about storing it? Or is that still too simplified?

serene scaffold
#

Numpy is for arrays of numeric data, which could be a 2d matrix of floating point numbers, or a 3d array that represents an image (height, width, color channel).

Pandas DataFrames are for tabular data in general, with rows and columns, where each row is a "thing", and each column represents a piece of data about that thing.

When you say "numpy is about storing it", you might be thinking of how DataFrames are often wrappers around a numpy array. But that fact is really just an implementation detail and isn't necessary to know. There's currently more than one option for which "backend" to use, and I think they're planning to eliminate numpy as one of them.

#

arrays and DataFrames don't really have that much in common except that they're "rectangular".

viscid urchin
#

OK, that's fair. To me that relationship has always been 'how it is', but swappable pandas backends would certainly change that. I've just not used that feature yet I guess.

agile cobalt
#

also, numpy provides efficient storage and operations for numerical data, if all of your data is numerical, there is no need to use pandas for loading nor manipulating it

serene grail
agile cobalt
iron basalt
viscid urchin
#

I guess PyArrow is replacing numpy for Pandas

iron basalt
#

I'm guessing that every other backend option is required to support the Python buffer protocol, and so it would all still interact with Numpy arrays.

regal wedge
#

can someone help me with this
i'm trying to maka an mlops project using zenml and mlflow
as far as i know there is no error in the python code
i connected to the zenml server and tried to set my project
but evertime i run my .py file there's an error stating that the project is not set

serene scaffold
#

somewhere in the code is x.name for some x, and that x is None.

viscid urchin
#

Hmm, active_stack's docs claim that it raises an error if the stack isn't set, rather than returning None, so my first guess is wrong.

#

but 'experiment_tracker' could be None

fresh harbor
restive flare
#

Hi, anyone interested in Agentic RAG? I have written a whole article on it build using LlamaIndex and Gemini.

It is handsome on coding style with GitHub repo.

Can you give me your feedback or how I can make it more adavance.

Here is the Link

https://www.analyticsvidhya.com/blog/2025/03/building-a-financial-report-retrieval-system/

Analytics Vidhya

Learn how to build a financial report retrieval system using LlamaIndex and Gemini 2.0 for efficient data extraction and analysis.

weary timber
#

i want to make an app where one would input their mood tempo energy etc. (some music features) and get recommended a music.but i dont know with what i can achieve this, can someone help me pls?

viscid urchin
#

You'll need to compose a few things. The first question that comes to mind is 'where do you plan to get your knowledge base of music'?

#

You need a corpus of songs/albums tagged with their mood/tempo/etc, which presumably the big players have all had to build themselves

agile cobalt
#

Creating a dataset for that from scratch would take a fair bit of work, but using an existing one it isn't too bad

weary timber
#

can i use a nn for thatT?

#

mlp

agile cobalt
#

what would your inputs and outputs be?

weary timber
#

the input will be joy,sadness,neutral,tempo,bpm and some music features

#

the output is the problem

#

280k songs

agile cobalt
# weary timber the output is the problem

there are two major approaches you can take

  • just filtering it in a normal way
  • using a model to engineer more "meaningful" features then filter based on those instead

if you just want to find sounds with joy score in between, say, 0.5 ~ 0.65, you can just do df.filter(pl.col("joy").in_between(0.5, 0.65)), there is no reason to do any machine learning

If you want to use ML for some reason, then you'll likely want to make either a simple clustering algorithm, a classical recommendation system or perform semantic search to identify similar songs
In any of these three cases, your inputs would be songs rather than directly asking for specific values for any given feature

  • For clustering, just look up K-Means and apply it on the song metadata columns
  • For a recommendation system, you would need to gather a bunch of user preferences data first, to then cluster together songs different users like
  • For the last, you would need to use an embedding model to create a representation of the song itself rather than its metadata (then find similar songs using a metric like cosine similarity)
    (note that the datasets you can find and access without qualifying as piracy do not contain the song itself, only metadata)
flint onyx
#

I was playing around with it last night and this is the improved model

#

thoughts? around 400 the gap is still a lil big but Ive been trying to fix it for the past few hrs and nothin seems to work

hollow pagoda
#

that just means it needed more size to be less overfit, also i thought the x axis was epoch for some reason last time

#

it looks converged around 800-830 training batch size

flint onyx
#

after 800-830 it doesnt change much so does that mean i can reduce my size a bit?

glacial root
#

when i set up an integral image, for some reason i end up with values that are inf

#

which is weird cause i shouldn't be anywhere near the max limit for np.int64

#

does anyone know any other causes of ending up with inf values purely through addition

weary timber
glacial root
#

i have no clue as to why this issue is happening, there's no possible way for it to result in having inf values

worldly wagon
#

what do you guys use as a latex editor when writing research papers?(considering overleaf)

mossy mango
#

Hello guys

#

Someone

serene scaffold
serene scaffold
twilit pulsar
serene scaffold
young geode
#

Hi, I'm a beginner trying to use matplotlib to create boxplots. I want to reduce the ymax to like 3000000 in order to get longer boxplots for better visualizatiokn. I have tried using plot.ylim, but I got no result. Can someone help me on that?

jaunty helm
jaunty helm
#

you could also try gradient boosting trees instead; in sklearn there's HGBT, but also there's others like xgboost, lightgbm, catboost, etc

young geode
jaunty helm
flint onyx
#

like made use of the whole dataset?

#

my dataset has 1644 inputs and 997 feats but I reduced it to like 67 feats

#

are the inputs not enough maybe

jaunty helm
jaunty helm
flint onyx
#

It seemed to improve my model by a lot

jaunty helm
#

and also, though it might be tiring, actually examine what each feature you have and select based on what might matter - might give even better results

#

trees are prone to overfitting - this might be why your tree does a lot better after feature selection
but you could also try no feature selection + regularization (such as limiting the depth of how big the trees can grow)

flint onyx
#

feature_params = SelectFromModel(RandomForestClassifier(n_estimators=100, max_depth=3, random_state=42), max_features=100)

flint onyx
jaunty helm
flint onyx
#

Lemme take a pic rq one sec

jaunty helm
flint onyx
#

uhhh u mean like the original questions?

From a scale 1 to 5, how complex is it to make this food

How many ingredients would you expect this food item to contain

In what setting would you expect this food to be served

How much would u pay for this

What movie do you think of when thinking of this food item

what drink would u pair this food with

who does this food remind u of

how much hot sauce

jaunty helm
flint onyx
#

food label I have 3 classes. pizza, shawarma and sushi

jaunty helm
flint onyx
#

yep

jaunty helm
# flint onyx yep

how do you have 997 features then? surely the survey isn't 997 questions

flint onyx
#

because of the movie title question. I used a bag of words approach for that and ended up with like 900+ words as features

jaunty helm
flint onyx
#

I tried dropping the movie question and my model was doing pretty bad

flint onyx
jaunty helm
flint onyx
#

but doesnt selectfrommodel take care of that? it only picks the most informative features right?

jaunty helm
flint onyx
jaunty helm
#

it could also be that, say for example, there's only a few responses that says Ratatouille, but this might be a very strong indicator for pizza (or maybe not)

flint onyx
#

and then get all the words?

#

also another problem is that students filled these up so alot of them are pretty stupid responses

#

I tried my best to get rid of the responses that didnt seem good but for the movie title I kept pretty much all of them

jaunty helm
flint onyx
#

im confused by this "other" group. do you mean introducing a new feature?

jaunty helm
flint onyx
#

how would that help

#

do u mean like converting all the joke responses/low freq responses to the same word or something?

jaunty helm
# flint onyx how would that help

then the tree might not hyperfocus on the fact that for the 3 responses with movie ObscureMovieA, they're all pizza, so that must mean ObscureMovieA == pizza

flint onyx
#

mb I still dont get it

flint onyx
jaunty helm
flint onyx
#

I seeee

jaunty helm
flint onyx
#

mhmm ur right Im going to mess around with it today

#

6 am rn my brain is too slow for this

#

tysm for the help btw

jaunty helm
# flint onyx mhmm ur right Im going to mess around with it today

e.g.

In what setting would you expect this food to be served
how many unique values do you have here? 100s?
what if you tried to group them into e.g.

  • Formal
  • Casual
  • Fast Food
  • Street Food
    maybe this is not the best groups, but you get what I mean; if I were a bit more serious I'd research where your food items (pizza, shawarma, or sushi) are commonly served, and use that as a reference to what groups should be made
#

like if you have the responses:

  • In a wedding
  • Formal setting
    the 2 should be related, when if you just shoved it through a bow it would look completely distinct
flint onyx
#

beside the movie title question. Thats how I ended up with 31 feats instead of 5 (since the other 2 were numeric)

flint onyx
#

like this

young geode
# jaunty helm like [this](https://github.com/apple/turicreate)? looks like it's been abandoned

Sorry for the late reply.. I think it's still used. The context behind this is that I'm following a Machine learning coursera course from the university of Washington. The videos are outdated, as they are using an old abandoned library called graphlab. But they made a note, updating the fact that now the learners should be working with Turicreate. It's a python library easy to use for beginners who want to understand the concepts, focus on tasks instead of algorithms. Up until now, everything worked fine. But when I try to run the code for data visualization by boxplots, I get these boxplots, like in the image, small and not on scale. I'm trying to make them bigger by decreasing the y max value, but in vain..

serene grail
lavish wraith
#

can i got the job if i only pandas,numpy,matplotlib and seaborn ,ploty and dash ??

knotty breach
lavish wraith
flint onyx
#

quick question:

Which would u say is better?

I was thinking the first one but then I asked my classmate and he said that the second plot is better. I dont get it isnt the overfitting case severe in the second one? but he says its because the accuracy for second plot is better and that matters more....

I asked him why he doesnt focus on making sure the overfitting isnt severe and he said:

"the model accuracy is 0.89 and the testing accuracy is 0.97
so it is overfitting a bit
if i try to reduce overfitting the overall accuracy goes down
which i dont think is a good tradeoff
"

glacial root
#

in jupyter notebook if a cell has been running for a long time, with there still being a * in place of the cell number and the kernel hasn't died, does that mean it's still running or is there a chance that the program has stopped running and/or it crashed

#

this thing has been running for over 20 minutes and i have no clue what's been going on

#

it's just a simple knn setup for images, with 800 training images and 200 being used for testing

#

it's actually been running for over 30 minutes now and i have no clue what's going on

#

not even a neural network, it's knn 💀

jaunty helm
jaunty helm
# flint onyx quick question: Which would u say is better? I was thinking the first one but...

I wouldn't choose the 2nd one simply because it's not done right
you split into training + validation set, so you can see how your model does on unseen data
but now that you've introduced hyperopt, while keeping only the train + valid set, you're just picking the hyperparameters that specifically makes the validation set look good... see the problem?
what should be done is have 3 sets, one to train on, the second to hyperopt on, the third to actually test on; then we can see (with reduced bias) if the improvements are real

flint onyx
jaunty helm
flint onyx
#

im pretty sure he did have 3 sets. train, validation and test

#

he used validation for plotting the curve and tuning

jaunty helm
flint onyx
#

no he tested the final acc using test

#

but the thing I dont get is that how can he say that his model is reasonable when the gap is soooo big

jaunty helm
flint onyx
#

oh

jaunty helm
flint onyx
jaunty helm
#

so take your first model as an example, if you kept training and plotted the train vs. test acc, it might look like this
at where the red box is is where it approximately starts to overfit

jaunty helm
flint onyx
#

I seee

#

smh I misunderstood earlier and was so focused on the gap

jaunty helm
#

more like this; at around the red box is when your green model starts to overfit
now let's say we make another model whose testing loss is orange
near the purple box, though the gap between orange and blue is bigger than green and blue, this is not saying that orange is overfitting worse than green (in fact none are overfitting near here); it's just saying that orange is a worse model at this point

worldly wagon
opaque condor
jaunty helm
opaque condor
#

No matplotliblib

jaunty helm
lapis sequoia
#

is tensorflow givning any of you a problem with python 3.12?

quaint rivet
#

I was working on deep learning model and my model doing some image classification. But when i tried to pass output in loss function(cross-entropy loss) . i am getting RuntimeError: 0D or 1D target tensor expected, multi-target not supported. Any guide how to fix this error?

num_classes = 8
 self.classifier = nn.Sequential(
          nn.Linear(128 * 8 * 8*12, 256),
          nn.ReLU(),
          nn.Linear(256, 128),
          nn.ReLU(),
          nn.Linear(128, num_classes),
      )

Here's the full traceback

---> 12     loss = criterion(outputs, labels)
     13     loss.backward()
     14     optimizer.step()
fickle shale
fickle shale
#

How can i collect data?

lapis sequoia
#

why does bert not need the same amount of text cleaning as say : logistic regression, naivebayes, Rnns,lstms,grus ect?

opaque condor
#
Accurecy of the network: 75.0 %
Traceback (most recent call last):
  File "c:\Users\iorn\Desktop\neral network\convelutional.py", line 122, in <module>
    print(f'Acurecy of {classes[i]}: {acc:L.2f} %')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid format specifier 'L.2f' for object of type 'float'
#

how do i fix this acurecy error?

serene scaffold
opaque condor
#

yes

serene scaffold
#

remove the L

opaque condor
#

ok

serene scaffold
#

where did you get the idea that you needed the L?

opaque condor
#

i was following a tutorial video

serene scaffold
#

when you have f"{x:y}", do you understand what x and y are?

opaque condor
#

yes

#

x is how far you are from zero

serene scaffold
#

No

#

I mean in general

#

f-strings

opaque condor
#

a little

serene scaffold
#

!e

pi = 3.14159
print(f"{pi * 2 : .4f}")
arctic wedgeBOT
serene scaffold
#

make sense?

opaque condor
#

yes

#

it shows the output to a certain degree

serene scaffold
#

it's also worth noting that it does some of the math (pi * 2) right in the f-string. the expression (which is the actual code) is on the left of the :, and the format specifier is on the right.

opaque condor
#

lets hope my network works now

#

23/500 done

opaque condor
#

And currently on epoch 366 I'm terrified but also excited

hollow pagoda
#

should this be standardized/normalized if its the target label or does that not matter, its right skewed

lapis sequoia
#

!e

print("hello")
arctic wedgeBOT
lapis sequoia
#

i thought this ran my code💔🥀

storm heron
#

hey guys

#

i would like someone to suggest ways to integrate AI into codebase

#

what ideaas can be implemented

#

and also what sources could be learnt from

#

i would rather the level of information would not be sofisticated because i am learning

viscid urchin
#

AI is just another subsystem; if you design the rest of your code carefully, composing it with an AI library to add features should be kinda painless. Easier said than done of course.

#

Stuff like dependency injection, "open/closed principle" etc helps a lot, in my opinion.

serene scaffold
storm heron
#

is a language learning model that has or is being trained ?

storm heron
#

but what i mean is what are some simple, ideas that i can integrate ai with programming

viscid urchin
#

Logic flows that seem like they would require a crazy number of "if" statements are a good place to start maybe

#

If you can exactly code the branching logic for something, you don't want an LLM, because why add the possibility of incorrect answers?

serene scaffold
spring field
#

and metrics too, right?

opaque condor
#
    acc = 100.0 * n_class_correct[i] / n_class_samples[i]
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero```
grizzled ice
#

or anyone tbh

grizzled ice
#

i just wanted to know

grand minnow
#

tbh its just a matter of implementation

grizzled ice
grand minnow
grizzled ice
#

like what is AI and what is not AI?

opaque condor
jaunty helm
#

(oh hey that's what the video says)

fresh goblet
#

Hello guys. im currently first year in DataScience and I am doing a project in CompSci. I really need you help with a small logic mistake in my post in the help section. I would greatly appreciate it.

river cape
#

check it out if you want faster data processing

#

i think it works for scikit-learn mostly

#

the time taken for processing is impressive

bright comet
#

helo guys

lapis sequoia
#

is tensorflow dead?

#

are more imporantly, are you all dancing on it's grave?

serene scaffold
lean fiber
#

guys which tools or languages should i learn for data science?,im learning python rn and im 16.im going for ml.

serene scaffold
maiden moat
#

Hello just wondering if anyone has dabbled here with LLMs + Microsoft Graph API

viscid urchin
#

No but in what sense do you mean?

serene scaffold
maiden moat
serene scaffold
maiden moat
#

I've been trying to do a project that prompts the AI to set meetings etc for me with microsoft teams, since I've been wanting to make a 'secretary' per se when student orgs run out of manpower

viscid urchin
#

I've had to build IVRs by hand several times before, and I'd be glad to not do it again manually

maiden moat
#

Either that or I'm just gonna do a script but if that was the case the project would be redundant, I just want to prompt it in and do it for me because I can't be bothered clicking and typing more than I have to lmao

maiden moat
#

I just have a specific usecase in mind that I want to explore

serene scaffold
#

You'd need to run some tests to confirm that the LLM consistently performs the desired tasks correctly

maiden moat
#

Yeah that's already a given, I'm literally just curious if others have done the thing I'm trying to do

#

Anyways thanks!

lean fiber
#

I already got my answer anyway so dw

serene scaffold
lean fiber
#

I didn’t understand what you meant by “concepts”, and I think I’ll need tools to learn those concepts anyways(idk).

serene scaffold
#

you'll see what I mean by "concepts" when you get into it.

#

do you know what a classifier is?

lean fiber
#

No

serene scaffold
#

Start with that.

lean fiber
#

Ok 👍🏿

iron basalt
# grizzled ice hey. I just came across this message and I had been wondering what it actually m...
Rational agent definiton of AI (the "standard model" of AI):

"A rational agent is one that acts so as to achieve the best outcome or, when there is uncertainty, the best expected outcome.

In the 'laws of thought' approach to AI, the emphasis was on correct inferences. Making correct inferences is sometimes
part of being a rational agent, because one way to act rationally is to deduce that a given action is best and then to act on
that conclusion. On the other hand, there are ways of acting rationally that cannot be said to involve inference. For example,
recoiling from a hot stove is a reflex action that is usually more successful than a slower action taken after careful deliberation.

All the skills needed for the Turing test also allow an agent to act rationally. Knowledge representation and reasoning enable agents
to reach good decisions. We need to be able to generate comprehensible sentences in natural language to get by in a complex society.
We need learning not only for erudition, but also because it improves our ability to generate effective behavior, especially in
circumstances that are new.

The rational-agent approach to AI has two advantages over the other approaches. First, it is more general than the 'laws of thought'
approach because correct inference is just one of several possible mechanisms for achieving rationality. Second, it is more
amenable to scientific development. The standard of rationality is mathematically well defined and completely general.
We can often work back from this specification to derive agent designs that provably achieve it--something that is largely impossible
if the goal is to imitate human behavior or thought processes.

For these reasons, the rational-agent approach to AI has prevailed throughout most of the field's history. In the early decades,
rational agents were built on logical foundations and formed definite plans to achieve specific goals. Later, methods based on
probability theory and machine learning allowed the creation of agents that could make decisions under uncertainty to attain
the best expected outcome. In a nutshell, AI has focused on the study and construction of agents that do the right thing.
What counts as the right thing is defined by the objective that we provide to the agent. This general paradigm is so
pervasive that we might call it the standard model. It prevails not only in AI, but also in control theory, where a controller
minimizes a cost function; in operations research, where a policy maximizes a sum of rewards; in statistics, where a decision
rule minimizes a loss function; and in economics, where a decision maker maximizes utility or some measure of social welfare."

(Artificial Intelligence: A Modern Approach. Russel & Norvig)```
#

There are other definitions, but this one is a pretty good.

opaque condor
#
    acc = 100.0 * n_class_correct[i] / n_class_samples[i]
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
austere prawn
#

Has that marimo presentation been yet? 😅😊

#

I'm so out of the loop 😮‍💨

viscid urchin
#

Well, what do you want to do when n_class_samples[i] returns a 0?

#

Arguably you want NaN in such cases it seems to me.

opaque condor
# viscid urchin Well, what do you want to do when `n_class_samples[i]` returns a 0?

No I'm trying to get it to return the accuracy of what it learned I don't you might want to look at this video because I'm just following what I can https://youtu.be/pDdP0TFzsoQ?si=cY-8u9T80R8LTwq1

New Tutorial series about Deep Learning with PyTorch!
⭐ Check out Tabnine, the FREE AI-powered code completion tool I use to help me code faster: https://www.tabnine.com/?utm_source=youtube.com&utm_campaign=PythonEngineer *

In this part we will implement our first convolutional neural network (CNN) that can do image classification based on th...

▶ Play video
viscid urchin
opaque condor
#

yes

viscid urchin
#

The issue is this code:

    n_class_correct = [0 for i in range(10)]
    n_class_samples = [0 for i in range(10)]

initializing them to 0 means you need to be more careful when you divide later

opaque condor
#

which lines?

viscid urchin
#

106-107

#

and then 127-end

#

You could replace line 127 onward with:

for i in range(10):
    if n_class_samples[i] == 0:
        print(f'No samples for {classes[i]}.')
    else:
        acc = 100.0 * n_class_correct[i] / n_class_samples[i]
        print(f'Accuracy of {classes[i]}: {acc} %')
agile cobalt
opaque condor
viscid urchin
opaque condor
#

Thank you

opaque condor
#

Is there anything I should be worried about with this data currently trying to be afraid that it's overfitting?

opaque condor
viscid urchin
#

Of that I'm not sure, I'm still learning how to spot that myself

#

Is your training accuracy much higher than your test accuracy? Doesn't look like it right?

opaque condor
#

Yes but it seems like the networks accuracy went down and then the last few rounds.

viscid urchin
#

Your code only prints test accuracy after training is complete; there’s no monitoring of training accuracy or loss over epochs, so I don't think we have enough information to tell

opaque condor
#

Darn it

queen oyster
#

guh

#

i'm messing around with some tools i don't fully understand

#

trying to create a program to use audio samples to generate geometry dash layouts

#

do i need to multiply my frequency-amplitude function by this funny curve

queen oyster
#

I'm using a log scale so they obviously aren't represented equally to the bass when shown like this

#

now how do I turn this into a geometry dash layout

#

I need to work out either how the icon should move or where the player should click

#

or perhaps where the player collides or interacts with an object

#

and what object it should be

opaque condor
#

My convolutional neural network is doing good hectic trains while I'm asleep I just need something to show me that it's actually learning and not overfitting

lean fiber
#

Guys this is my current plan: • 100 days of code by Angela Yu (current)
• Machine learning a-z by Kirill Eremenko, Hadelin de Ponteves, SuperDataScience Team, and Ligency Team
• The data science course by 365 careers
• Coursera machine learning course by Andrew Ng
• Coursera deep learning course by Andrew Ng.

#

What else can I learn to boost my chance of finding a job

grand minnow
lean fiber
#

Thanks! I’ll for sure do this.

primal apex
meager canyon
#

has anybody worked with RAG? looking to build one

#

I have a got huge markdown file

serene scaffold
meager canyon
#

or tips

meager canyon
#

I mean

#

I got the whole data

#

stored yk

#

Later on i'll work with Agents

meager canyon
serene scaffold
#

oh I guess I know what they mean by split

meager canyon
#

LangChain is where should I start ig

serene scaffold
#

I've never actually used langchain.
admittedly I'm not being very helpful

meager canyon
#

its ok

viscid urchin
#

Sweet lord, langchain has a lot of things to import

meager canyon
#

right

viscid urchin
#

I guess that's where you are?

meager canyon
#

yeah

#

ill follow it

#

actually understand how it works

viscid urchin
#

"Detailed Walkthrough" is where the action starts

#

Oh that's cool it has specialized TextSplitters for all sorts of things

meager canyon
#

my boss wanted me to use cursor to do all the job

viscid urchin
meager canyon
#

but i dont really like cursor

#

it just do everything for me

#

i'm not that lazy

viscid urchin
#

Claude Code is the only one of the agentic tools I've run into that produces decent results often enough so far. I still much prefer to do it myself but it can be handy when I'm trying to get some unmaintained dependency to build on my Mac.

meager canyon
#

Claude is pretty decent

#

I agree w u

viscid urchin
#

Dang, I guess I should build something with LangChain, it looks powerful and relevant

meager canyon
#

indeed it is

flat roost
#

does using openai api require you to setup a payment method?

viscid urchin
#

Yeah, you have to load at least $5 of credits to start these days I believe.

#

(Anthropic has the same minimum)

lean fiber
#

Why do people prefer Claude over ChatGPT? Isn’t ChatGPT supposed to be better?

viscid urchin
#

Claude is way better at coding from my testing

tropic shore
#

hi im trying to implement one stage retina net object detector. Is here anybody willing to help? Or if this is not approriate platform to ask can you recommend some?

viscid urchin
#

and Claude Code is a very well-implemented agent loop

viscid urchin
#

Caveat: I don't have 'Pro' so I haven't tried o1-pro, it might be the best. Claude is better than GPT-4.5 from my testing though.

robust forge
flat roost
#

i am just playing around with these so

tropic shore
viscid urchin
viscid urchin
flat roost
viscid urchin
flat roost
#

raise self._make_status_error_from_response(err.response) from None
openai.RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}

tropic shore
flat roost
#

this is the error i get

viscid urchin
viscid urchin
flat roost
#

when i asked chatgpt about this it said its cuse i didt setup a payment method

tropic shore
viscid urchin
meager canyon
#

Btw which LLM you guys think is worth paying for?

#

For coding mainly

#

I do know GPT plus or pro is way too expensive

viscid urchin
#

I've paid Anthropic for more Claude API dollars than I like to think about

#

If you know exactly what you want, I've found it to be very good

#

(I've been using it to automate the analysis of network traffic with wireshark/tshark etc)

meager canyon
#

Fair

flat roost
meager canyon
#

Kinda

viscid urchin
flat roost
#

alright so basicaly paid

tropic shore
# viscid urchin As much as you feel comfortable with really

oki here is the loss. I dont know if i put there right things def custom_loss(y_pred, y):
# logits from heads
cl_logits, reg_logits = y_pred # shape cl: [batch, anchors, 11] reg: [batch, anchors, 4]

    # assigned anchor calsses according to iou metric, bboxes in rcnn format
    anchor_bboxes, anchor_classes = y

    # foreground anchors
    valid_mask = anchor_classes > 0

    # convert anchor classes to one hot
    num_classes = cl_logits.size(-1)
    target_classes_one_hot = torch.nn.functional.one_hot(anchor_classes, num_classes=num_classes).float() 


    classification_loss = torchvision.ops.sigmoid_focal_loss(cl_logits,
                                                            target_classes_one_hot,
                                                            reduction='sum')

    regression_loss = torch.nn.functional.smooth_l1_loss(reg_logits[valid_mask], 
                                                        anchor_bboxes[valid_mask],
                                                        reduction="sum")
    
    total_loss = (classification_loss + regression_loss) / valid_mask.sum()

    return total_loss
viscid urchin
#

Can we see your anchor code? You might not have enough positive anchors?

#

You can do three backticks followed by the word python, and then paste your code, and then close it with three backticks, to get Discord to format it

tropic shore
viscid urchin
#

OK I think that helps me understand the problem

#

You are using Softmax as the approach?

#

Focal loss is meant for single sigmoid, where each class gets a separate classifier

#

I think you're mixing the two worlds maybe?

tropic shore
viscid urchin
#

Hmm, OK

tropic shore
#

i dont understand idea of separate classifiers. Should i construct separate heads for predicting all 10 digits?

viscid urchin
#

I think you do need a separate binary tensor target for each of 10 classes? You could also make an explicit 11th class for 'background'?

#

Also I don't think one_hot is correct?

#

I think you want binary targets for each class, not one_hot across classes?

viscid urchin
#

Sorry I wish I knew more about this topic, I'd probably be able to suggest something more specific

limpid dew
#

Looking to find some collaborators for an esports related machine learning project. Is this the right place to post about that?

tiny vale
#

I'm looking for recommendations of ML models/algorithms for a small dataset of tabular data. It must be flexible to null data also.

odd meteor
tiny vale
#

How does that compare with Random Forests? (Im new to ML)

odd meteor
# tiny vale How does that compare with Random Forests? (Im new to ML)

CatBoost and Random Forest are both tree-based models, however they differ significantly in how they build and combine trees.

Random Forest uses a technique called Bagging to build the decision trees that makes up the forest, while CatBoost uses Boosting technique in building its trees.

In terms of individual performance on your proposed task, there's no straightforward answer other than experiment with both and find out which is better

tiny vale
#

My app needs to flex to various tenant's data -> would it make sense to have both models available and use the one with highest accuracy against untrained data?

#

Thank you for the detailed answer btw 🙂

odd meteor
tiny vale
#

Thank you!

opaque condor
#

Is there a way of showing the image that the neural network sees?

serene scaffold
opaque condor
serene scaffold
opaque condor
serene scaffold
#

pretend I know absolutely nothing

opaque condor
#

It's a conversation neral network with the data = {'cat','dog','plane','car','deer'}
After it's gone through in each label and looking at it the recognization of the image goes down which I know is a good thing cuz it's basically the network saying that it knows what its looking at and returns of value of how well it's learned which is given to a loss function which tells the model how long it is and then I'm in second pass or fourth pass it's only gets smaller and smaller than number of how wrong it is now I want to test my model make sure that's truly understanding it by giving me a visual aid I was going to have it load up one of the images from one of the classes and have the neural network make a bounding box around what it sees in the image and then place a label if it's a cat dog playing deer etc so that I can know that it's validating correctly

serene scaffold
opaque condor
serene scaffold
opaque condor
#

I know I just want to know if it's starting to recognize a pattern

serene scaffold
opaque condor
#

Darn it

opaque condor
serene scaffold
queen oyster
#

i need help with something

#

i have an image consisting of black and white

#

and i want to assign each white pixel a number representing the gradient of the line it is on

#

like this

viscid urchin
#

What value should a white pixel far from any black line get? Also 0?

#

You could do a 'distance transform' to find the closest black pixel to each white pixel, and then read the slope of that black pixel. Before all that you need to detect the black lines, and there are various things you could do there.

#

OpenCV has a HoughLinesP that might be the right choice.. You may want to play with a few of its options.

opaque condor
opaque condor
cerulean violet
#

Hello i need a good free db to train my chatbot(around 15-20gb)
I tried to use the break dataset but found it too be empty

serene scaffold
opaque condor
indigo aspen
#

hello guyss

#

hope everyone has a nice day

#

I'm studying to become a data scientist and im still learning some basics in python

#

nice to be here

weary timber
#

can someone who is familiar with both kohya_ss and modal (a cloud gpu provided) help me with using trainers like kohya_ss in a cloud gpu?

spring field
# opaque condor Darn it

If you look into something like ViT (Vision Transformer), then you are able to visualise where the model is attending to in an image to sort of see what features it mainly looks for in an image to classify it

glacial root
#

typically what is used for ml/computer vision in c++ in place of numpy

#

is there a c++ equivalent of numpy

iron basalt
#

In theory there are Numpy-likes, but it does not work well in practice, because C++ is C++.

glacial root
#

i see

#

oh yeah i guess c++ already has ways to manage memory efficiently unlike python

#

so for python it's kind of needed to have numpy arrays

iron basalt
#

For example, https://github.com/xtensor-stack/xtensor might seem like a nice idea. But the problem with C++ is that when you typo something, etc, you get some giant template compile time error that makes no sense. In addition your compile times go through the roof. C++ can do a lot on things in theory, but in practice anything other than really simple C++ has major problems.

GitHub

C++ tensors with broadcasting and lazy computing. Contribute to xtensor-stack/xtensor development by creating an account on GitHub.

iron basalt
#

By calling a Numpy function you are moving this loop to C (it does it internally).

glacial root
#

i see

iron basalt
#

(Or maybe Fortran, Numpy has multiple backends)

glacial root
#

and then the numpy array gets stored as all one object

iron basalt
#

The C side just loops over this.

glacial root
#

i see

#

that's super cool

iron basalt
#

Python lists are a bit more complicated, since they can hold different types for the elements.

serene scaffold
#

python lists are also strictly one-dimensional (nested lists are entirely separate objects)

glacial root
#

so if i wanted to (in theory, probably wouldn't actually do this unless it's truly meaningful to do), i could use cython and sort of "create" my own numpy

#

pretty much just bringing in similar functionality

iron basalt
glacial root
#

for nested lists

serene scaffold
iron basalt
#

Important to note here is that it's an array, not a dynamic array. So it's terrible at appending elements, unlike a list, which is a dynamic array (of Python objects (pointers to them), hence the multiple different types allowed in one list).

#

So try to not change its size all the time.

#

Best to make once upfront, then change the values in it.

iron basalt
# glacial root for nested lists

In this case it's really slow because you are chasing a bunch of pointers. You are first looking up a pointer with the first index, then following that pointer to the nested list it points to, and then using the second index to get the pointer to the python object, and following that. That is basically 4 address lookups (4 jumps (that could be anywhere in memory (random access))).

limber spear
#

Check out this beauty chat 😏

iron basalt
limber spear
#

ehhh the plot title is not clean cool_cry

viscid urchin
#

Has the same 'views and strides' kind of thing going on as numpy

iron basalt
# iron basalt

In C++ you just make a (matrix/nd-array) class for this that you give the indices to and it uses the formula.

#

Note that by convention C users use row-major, Fortran uses column-major.

#

Numpy lets you pick (default row-major (the name "row-major" stops making sense for higher dimensions but we use it anyway)).

glacial root
#

it was egregious

#

but also i had barely any data

#

forgot how much, less than 1000 images for sure though

#

maybe even less than 500, i'll have to check

#

but it was insanely slow so i had to cut down the amount of data

#

probably cause i don't have a gpu, but also just cause that's the nature of knn

iron basalt
#

https://docs.python.org/3/c-api/buffer.html if an object supports this (e.g. Numpy arrays or array.array or bytes, etc) they can all interact with each other directly by passing around the underlying buffer; also with C/C++/etc code (with no copies being made importantly).

limber spear
#

I pretty’d up the final plots/graphs chat 1 moment 😏

limber spear
#

they're so beautiful 😏

#

any guess what this model is studying

viscid urchin
#

Pictures of goats.

limber spear
neat pasture
#

I wish to do my thesis on BCI by using sensors to read brainwaves and then use AI to interpret the data which will be used for both emotion classification and for using brain waves to move objects, in this case the computer cursor

But I’m not sure whether to do the whole thing on Raspberry Pi or on my PC or use Arduino as well

agile cobalt
#

generally speaking you'll want to use something that has a descent GPU, at least for training the model

for inference you might be able to get away with a Raspberry Pi in exchange for either having a rather small model and/or slow sampling rate

neat pasture