#data-science-and-ml

1 messages · Page 62 of 1

wooden sail
#

treat wsl as if it were a separate computer

cold osprey
#

until i get a linux/dual boot machine

#

would dual boot but i use a laptop now

serene scaffold
#

hi

wooden sail
#

i was gonna say "why is that a problem?" but i know the answer

cold osprey
#

slots

wooden sail
#

slots?

serene scaffold
#

slots

cold osprey
#

m.2 slots

wooden sail
#

what about them?

cold osprey
#

huh

cold osprey
serene scaffold
cold osprey
#

wut

wooden sail
#

the pigeonslot theorem

wooden sail
cold osprey
#

no slot for extra ssd

wooden sail
#

you only need 1 drive to dualboot

#

i don't understand

cold osprey
#

hmm u can?

#

welp

wooden sail
#

yeah

cold osprey
#

i only have 19gb of space left anyw

#

it varies between 10 to 25gb

wooden sail
#

well that's on you 😛

cold osprey
#

tiny ssd

#

256gb

#

scary if i fuck smth up too

#

having 2 physical disks feel safer

wooden sail
#

they're kinda treated the same way logically after partitioning

#

i thought you were gonna complain about linux and laptop hardware compatibility

#

over the last 3 years i've gone through several stages of only windows, only linux, dual booting, dual booting + wsl, and windows + wsl depending on how long it takes me to ruin the previous setup

night prawn
#

when I press a key the window disappears

wooden sail
#

only linux and windows + wsl tick the most boxes so far

cold osprey
#

ok ill start

wooden sail
cold osprey
#

wanted to convert my old laptop to be a torrent box/ media centre of sorts

#

can get ubuntu/mint etc installed and working but it doesnt boot correctly after a restart

night prawn
#

it's do the same things

cold osprey
#

sec

night prawn
#

thank

wooden sail
wooden sail
cold osprey
#

i think the video covers it

#

may be wrong

night prawn
cold osprey
#

oh it doesnt

wooden sail
night prawn
wooden sail
past meteor
#

Btw WSL has a major issue surrounding networking or something

#

It doesn't play well with VPNs, it was an issue setting it up on my work machine

#

You need to edit some obscure linux files but then you should be good to go.

wooden sail
#

that's kinda weird to hear, since it nats through windows by default

#

no config should be needed

past meteor
#

There was a bunch of people in a bunch of git issue treads with the same issue

wooden sail
#

was about to ask for the link, thanks!

night prawn
#

i can go windows 11 if it was more easy

past meteor
#

I use WSL2 on my old desktop and it works like a charm there

wooden sail
#

super interesting, i use anyconnect as well but haven't had this issue

past meteor
wooden sail
#

maybe i just haven't used them simultaneously

past meteor
#

But yeah idk

#

Maybe it happened because I installed WSL when my VPN was on? Idk, all I know is that it's sorted and I'm happy lol

wooden sail
#

i did that too on my work laptop, but using a different vpn from these

#

thanks for the info though, i'll star these in case i run into it in the future

night prawn
#

i used this command Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux and it seems to work now

wooden sail
#

yeah i thought that might be it

jolly dock
#

My models_dir is in the correct path but ide still says "The system cannot find the path specified."

#

Can somebody help me please?

boreal gale
#

use \ as opposed to /? looks like windows to me, and i don't think the later works for windows. idk i don't use windows really

jolly dock
#

that didn't change anything

#

I asked it to chatgpt and it didnt helped too

young granite
jolly dock
#

wdym

#

sorry im kinda new on this stuff

young granite
jolly dock
young granite
#

can u provide the code

#

!code

jolly dock
#

Sistem belirtilen yolu bulamıyor means the system cannot find the path specified in turkish

arctic wedgeBOT
#
Formatting code on discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

jolly dock
#

It's too long

#

but i can provide a link

young granite
#

snippet should be enough

jolly dock
young granite
#

or can u try to load a diff file for example a txt in that folder

jolly dock
#

I'm trying to use this on my computer but i cant

young granite
#

did u check manually if the file is there

jolly dock
#

yep

young granite
#

thats a folder not a file

jolly dock
#

sorry

#

i didnt understand

#

please forgive my ignorance

bright juniper
#

In what order do FPR and TPR values supposed to be plotted? I want to plot a ROC curve but I get this if I plot what I calculate per epoch of training in order

jolly dock
#

@young granite do you mean this files?

#

but you said file not files

scarlet kite
#

scores_combined_df['HomeAway'] = scores_combined_df['HomeAway'].replace('@', 'A').replace('NaN', 'H')

Any idea why I get this error: TypeError: string indices must be integers, not 'str'

young granite
jolly dock
#

what does this even means

serene scaffold
scarlet kite
#

what would I use to replace an NaN colunm with 'H'?

#

@serene scaffold

young granite
#

where model folders are inside

wooden sail
mild dirge
young granite
#

if even that understanding is missing i would suggest starting with the basics @jolly dock

mild dirge
#

The image on wiki is pretty good

jolly dock
#

which file/folder are we talking about?

young granite
young granite
jolly dock
#

because it has models inside of it

jolly dock
#

no.

young granite
#

then im not the right person to ask im sorry

jolly dock
#

😭

serene scaffold
scarlet kite
bright juniper
young granite
#

@serene scaffold u got a recommendation for good scoring metrics for a cloud-shaped dataset?

serene scaffold
scarlet kite
#

TypeError Traceback (most recent call last)
Cell In[16], line 1
----> 1 scores_combined_df['HomeAway'] = scores_combined_df['HomeAway'].fillna('H')
2 scores_combined_df.head()

TypeError: string indices must be integers, not 'str'

#

@serene scaffold

serene scaffold
#

try restarting your notebook kernel.

serene scaffold
young granite
serene scaffold
#

what do the colors and the dots represent

young granite
#

an features

serene scaffold
#

that's pretty vague

#

if you said the dots represented numbers, that would be less vague, but you wouldn't accept that as answer if our roles were reversed.

wooden sail
# bright juniper What is a decision threshold?

well, in your case, you're learning some parameters that make the classification. you can interpret it as your network learning the parameters that make the decision as good as possible. you'd plot it in the order you get the results per epoch then, as you did

#

but the plot will not look as nice as conventional ones because sgd does not follow a nice pattern in general

young granite
wooden sail
#

what you plotted is already "correct"

serene scaffold
young granite
agile cobalt
#

its not my data (cause i cant show that here)
I strongly recommend asking for help in some place in which you can show your data instead

young granite
#

i dont want to get a deepdive on my usecase just some discussion

#

generalisation works well but i want better scoring metrics

#

so i wanted to brainstorm a bit

bright juniper
wooden sail
#

lemme see if i can reword what i'm trying to say

bright juniper
#

I understand, because on some epochs, it gets more falses so it goes back

#

With Adam it went like this

wooden sail
#

you can't make a ROC curve the way you're used to, because those curves are made by changing the decision threshold. instead, you can plot what the current tpr and fpr are given how many epochs you've trained for. this actually represents a single point on the curve, and you track the evolution of this point over epochs. that is why the curve looks so weird.

#

the only thing you can hope is that the point moves toward the upper left corner over time. whether this happens at all, with which behavior and how fast depends on the optimizer and its hyperparams

bright juniper
#

Yep

#

Here I think it went terribly

wooden sail
#

this adam one kinda looks like it got worse

#

i agree. it's better than the other you showed, since the tpr is higher. but it's getting worse

#

probably an issue with the step size

#

actually, i'm assuming it started at the left. i don't know that

#

you could mark the start and end points with something so we can tell them apart

#

if it started at the right and moved to the left, it got really good

bright juniper
#

It's weird because the confusion matrix (prediction vs reality labels of the last epoch) tell a different story about this label

wooden sail
#

i mean, the behavior in that "ROC" plot you showed is good everywhere

#

that does match this confusion mat

bright juniper
#

Doesn't the confusion matrix show true positives on the main diagonal?

wooden sail
#

yeah

bright juniper
wooden sail
#

0.88 is pretty high

bright juniper
#

Oh I didn't pay attention to the actual number

wooden sail
#

that's why i told you, the adam one is great everywhere. much better than the earlier one you showed

#

but you should really mark the start and end points with some markers

#

cuz if it started at the right and moved to the left, it got crazy good

#

if it was backwards, the hyperparams can probably be spiced up a little

#

could you add some markers and show the plot again?

bright juniper
#

I don't know how to mark start and end points in matplotlib

#

I mean I bet I can simply scatter two points

wooden sail
#

you already did plt.plot, yeah?

bright juniper
#

Yes

wooden sail
#

now call plt.scatter. yeah

#

that'd be the easiest i think

bright juniper
#

So let me scatter two points of different colors

#

Red is where it began and green is where it stopped

#

So ye it learned well

wooden sail
#

very nice

#

and so for completeness, what this is doing is tracking a point on a family of ROCs, it's not a ROC itself

#

(that's me being nitpicky)

bright juniper
#

Is there a way I can make a ROC out of this or anything

wooden sail
#

not really

bright juniper
#

So how does it usually go with decision thresholds

wooden sail
#

you'd have to modify the parameters of the network by hand to produce different decision thresholds in your case

#

in the classical way, you'd do something simple. you have data that can be of any of 2 classes (as an example) and you want to pick the threshold at which you say "if x > thresh, it's of class a. otherwise, it's b"

#

then you vary thresh and plot the tpr vs fpr

#

vary thresh again, plot tpr vs fpr again.

bright juniper
#

My classifier is multi class

wooden sail
#

in your case, this would mean you would modify parameters of the network by hand yourself. and if multiclass, it gets even worse

#

i only did 2 classes for clarity in the example

bright juniper
#

I can yoink the class probabilities instead of the classes it predicts by argmaxing though

wooden sail
#

hmm but that's kinda different

#

in any case you'd have to modify the parameters to see how the probabilities change

bright juniper
#

Well if it's 66% sure it's A, can't I say it's 33% sure it's not A?

wooden sail
#

sure, but how do you then change that %

#

you do it automatically by training here

#

this is very much just a nitpick from my side btw

jolly dock
#

can you guys help me to solve my problem?

#

yea im still trying to solve it

bright juniper
#

I guess I'll be moving on

jolly dock
#

fuck it, im gonna play valorant

merry wadi
boreal gale
steel forge
#

opinion on this assingment for an interview?

gloomy saddle
# steel forge opinion on this assingment for an interview?

Sounds like it breaks into 2 parts. First is to identify if there is a common pattern to allow navigation or if it needs to be hard coded. Then similar for the actual details. E.g. does one use "contact number" does one use "ph:" and does another use a link

honest skiff
#

What is a statistical p-value test?

queen cradle
# honest skiff What is a statistical p-value test?

The statistical jargon for these is "hypothesis test." The goal of a hypothesis test is to decide between two possibilities. Conventionally, one of these possibilities is called the "null hypothesis" and represents "nothing interesting is happening." The other possibility is called "alternative hypothesis." Usually, the alternative hypothesis is some kind of interesting phenomenon whose existence you'd like to confirm. Most often, the test works as follows: First, decide on a significance level alpha. Usually alpha = 0.05 or alpha = 0.01. Second, collect data. Third, determine how likely the data is under the null hypothesis. In most situations, the alternative hypothesis corresponds to the data being more extreme than we would expect under the null hypothesis. We compute the probability, under the null hypothesis, of observing a result as or more extreme than the actual data. If that probability is less than alpha, we "reject the null hypothesis," meaning we decide that the alternative is likely to be correct.

steep echo
#

Hi, I'm relatively new to coding so I'm not familiar with the proper terminology and I don't know exactly what to ask. I am trying to return the value from a pandas dataframe when another function returns true. This has to do with time-series, I need the price from the right column at the time where the other function returns True.

somber pollen
honest skiff
queen cradle
steep echo
serene scaffold
somber pollen
serene scaffold
#

if the goal is for df["time-series"].map(lambda x: x> some_value) to reduce the number of rows, they can't add it back as a column of df.

somber pollen
#

I don't think that's the goal

#

It's to have an additional column that communicates the result of some pre-defined computation on the other elements of the row

serene scaffold
#

the name of the new column has "filtered" in it

somber pollen
steep echo
#

Wait no i'm not trying to add to the dataframe. I want the price information to be pulled from the data frame so I can store it in a separate list.

#

and then work with that list separately which I can do, its this part that I'm lost on

somber pollen
#

I mean you could just turn the columns you want into lists, and then use the normal map function

#

lists of tuples

steep echo
#

The library I'm working with needs them to be dataframes. Its a paid tool and I'm out of my depth tbh

somber pollen
#

you can use the map function for that as I did earlier, but this time don't name it filtered otherwise sucrelets will come

steep echo
#

Dataframe has multiple columns (asset names with price descending) with rows (time with price across). I have a function(made in the paid library) that analyzes the columns and returns T or F. I do not know how to grab the price when the function returns True. I don't need to modify the dataframe, I want the value that is in the data frame

honest skiff
#

Sorry - I'm a little confused

somber pollen
#

and then pass in the lambda function or whatever other function that will be returning true or false

queen cradle
steep echo
honest skiff
queen cradle
#

It starts with an editorial that you can skip. The statement itself is the useful thing.

honest skiff
#

Gotcha - thank you

steep echo
timber flame
#

Is anyone here interested in learning statistics / math for machine learning with me ?

agile cobalt
steep echo
slow totem
#

Aight, I want to make a chatbot. I have the basic Intent classification in place, and I am using vector similarities to respond with questions further down the conversation. I want to integrate the two parts, into one nn, which would have context/history recognition. I do not want to use haystack or such libraries :((, would prefer a NN

#

any help on how would I go about doing it?

somber pollen
past meteor
somber pollen
slow totem
somber pollen
#

if you have a specific framework you want to use, I can also find resource for that framework

#

for almost all of these networks you will want to first tokenize the text, and then embed each token (or word, most of the time, but a small chunk) there are a lot of libraries and resources on how to do this. then you can feed each token into the lstm, it will produce an output that will depend not only on what it was fed, but the order in which the tokens were fed

arctic wedgeBOT
#

model.py line 77

class LSTM_with_Attention(nn.Module):```
slow totem
#

aaah, gotcha

somber pollen
#

the general term for this type of model is seq2seq because you have lstms on one side that summarize a sequence, and then it's fed into something that kinda does the reverse to produce an output sequence

#

the last time I actually implemented something like this was a couple of years ago though, and it was really hairy

#

all of the open source resources are good to learn with, but don't produce amazing results. if you want to get really good results, you kinda have to go down a rabbithole of other techniques to optimize the architecture

slow totem
#

Thanks a lot!

dusty bay
#
import pandas as pd
import matplotlib.pyplot as plt


def plot():
    df = pd.read_csv("RMS Level 2ch.csv", skiprows=[0,1,2])
    x1 = df["Hz"]
    y1 = df["dBSPL"]
    x2 = df["Hz1"]
    y2 = df["dBSPL1"]
    fig, ax = plt.subplots()
    line1 = ax.plot(x1, y1, label="Ch1")
    line2 = ax.plot(x2, y2, label="Ch2")
    leg = ax.legend(fancybox=True)
        
    lines = [line1,line2]
    lined = {}
    for legline, origline in zip(leg.get_lines(), lines):
        legline.set_picker(True)
        lined[legline] = origline
            
    def on_pick(event):
        legline = event.artist
        origline = lined[legline]
        visible = not origline.get_visible()
        origline.set_visible(visible)
        legline.set_alpha(1.0 if visible else 0.2)
        fig.canvas.draw()
        
        #plt.semilogx(self.x, self.y)
    plt.xlabel("Frequency (Hz)")
    plt.ylabel("RMS Level (dBSPL)")
        
    fig.canvas.mpl_connect('pick_event', on_pick)
    plt.show()
    
plot()

Why appears Error 'Error tokenizing data. C error: Expected 1 fields in line 5, saw 3' in the code above guys. Anyone can help me 🙂

boreal gale
cold osprey
#

random guess

#

csv file problems

boreal gale
#

that's my guess too, though i wanted to reinforce the habit of posting traceback upfront hence i held back my guess

cold osprey
#

yeye

#

ofc

bold timber
#

I have a question about the decoder block in the Transformers architecture: Is each process of the decoder block only for one token or all of the decoder block is just for one token?

lapis sequoia
#

Hello not sure hope this is a good channel to ask my question in. I just got started with python and using jupyter notebookts.

#

I installed the data science docker container from a github site (dont know the repo atm). But when i connect to the server i do not have autocompletion neither do i get the documentation etc. I have seen some issues being posted on this. So i installed Pylance but checking the LSP did not help. Is there any resource you could point me to that guides me on to how to get this working with a remote jupyter notebook? Using VSCode insiders.

queen cradle
rich condor
#

Hi, is anyone familiar with ReLU?

I am trying to understand how ReLu allows a model to recognize complex features whereas a linear model would not.

From chatGPT:

This nonlinearity allows the network to learn complex, nonlinear features such as edges and corners. For example, a filter in the convolutional layer that detects edges might have a negative weight for one side of the edge and a positive weight for the other side. Without the ReLU activation function, the output of this filter would be zero if there is no edge present in the input image, even if there are some positive values in the input image. However, with the ReLU activation function, the positive values in the input image would pass through the filter and produce a non-zero output.

I am having trouble trying to visualize this example that Chatgpt is giving me. Are there any other learning aids I can use to better understand what ReLU actually does in this context?

rich condor
#

I feel stupid

#

Idk what i am looking for

#

What is the significance of the differences here

cold osprey
#

u gotta run the model

#

u will that relu will be able to fit this data but linear wont

mild dirge
#

It's also important to know that a linear combination of a linear combination, will itself just be a linear combination of the initial input.
So if you have 1 linear layer, or 100 linear layers, they can do the exact same.

#

But that is not the case for non-linear layers

scarlet kite
#

I've got a pandas df with a list of baseball player stats over the last years. Is there there a way to get a weighted mean of their stats to put more emphasis on recent years?

plain jungle
agile cobalt
#

20% accuracy on multiplication and 0% on division?
and telling it which kind of operation to perform?

plain jungle
serene scaffold
#

if you were to just write out what the ReLU function is, like ReLU(x) = ..., what is it?

#

I am trying to understand how ReLu allows a model to recognize complex features whereas a linear model would not.
ReLU is an activation function, but here, you're comparing ReLU to a "linear model". It might be that you meant to say "linear activation function", but activation functions are never linear (which is why they're sometimes called "nonlinearities", as in the ChatGPT response).

plain jungle
agile cobalt
#

@still moon by "how many times have it gone through each item in the data?" I mean how many batches have it gone through (I'm assuming that you are using 1 epoch = 1 mini batch and that you have a fixed training set?)

still moon
#

Oh right uh... batch size is 3200 over 10000 epochs... I'm playing with values though so this is very fluid at the moment lol

cold osprey
#

3200lel

agile cobalt
#

uh, "batch size" is how many items you have in each mini batch
I seriously hope that you do not have that many in each?

cold osprey
#

for 10 samples?

agile cobalt
#

or you meant 3200 total training examples? (number of rows of the training data)

still moon
#

I have 37000 records in my database which I'm splitting for training, testing and validation sets

10000 epochs with batch size 3200

I really don't know if this is just a really shit way to train or not but I'm still very new at this stuff so experimenting

#

batch size 32 over 1000 epochs using the same data doesn't appear to improve accuracy at all

agile cobalt
#

3200 sounds way too high, try lowering it to like 256 or 320 at most

are you using any regularisation like dropout layers?

still moon
#

I'm alternating between an L2 layer and a dropout layer to see what differences look like

still moon
#

exit

#

oops

fresh tiger
#

Hey, not sure if this is the right place, but I have a scatter plot that I want to convert to a heatmap showing density of points in areas.

I have been trying to follow a few different posts, in particular I want to achieve the same as this post: https://stackoverflow.com/questions/2369492/generate-a-heatmap-using-a-scatter-data-set.

I first loop through csvs that have the same columns, and extract the 2 columns I base my scatter plot on:

        everyMortonValueDf = pd.concat([pd.DataFrame({'morton': data['morton'], 'index': data.index}), everyMortonValueDf.loc[:]]).reset_index(drop=True) 

After this loop, I try to plot a heatmap via:

heatmap, xedges, yedges = np.histogram2d(everyMortonValueDf['morton'].values.tolist(), everyMortonValueDf['index'].values.tolist(), bins=(10, 10))
    
    
    extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] # [-1] lets us access the last value of array.
    print(xedges[0])
    print(xedges[-1])
    print(yedges[0])
    print(yedges[-1])

    print(np.count_nonzero(heatmap.T))
    plt.clf()
    #plt.imshow(heatmap.T, extent=extent, origin='lower', cmap="viridis", norm=LogNorm())
   # plt.colorbar()
    plt.imshow(heatmap.T, extent=extent, origin='lower')
    plt.show()

when outputting everyMortonValueDf['morton'].values.tolist() and print(heatmap.T) via a print statement, I do get values, so I know that it doesnt return empty data.

The plot that is output can be seen in the attached screenshot.

I would appreciate any guidance on how to approach this issue.

#

As a side note, when plotting contours, I do get an output:

   # Heatmap based on: https://stackoverflow.com/questions/2369492/generate-a-heatmap-using-a-scatter-data-set
    heatmap, xedges, yedges = np.histogram2d(everyMortonValueDf['morton'].values.tolist(), everyMortonValueDf['index'].values.tolist(), bins=(100, 100))
    
    
    extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] # [-1] lets us access the last value of array.
    print(xedges[0])
    print(xedges[-1])

    print(yedges[0])
    print(yedges[-1])

    print(np.count_nonzero(heatmap.T))
    #plt.clf()
    #plt.imshow(heatmap.T, extent=extent, origin='lower', cmap='hot')
    #plt.show()
    plt.contour(heatmap.T, extent=extent)```
thorn swift
#

I finally finished my first webapp!!!!!!

#

WOOOO

still moon
#

Congrats

#

I got my model to about 22% accuracy but I don't know how lol

boreal gale
still moon
#

okay 1000 epochs with 32 items per batch gets me higher accuracy with no overfitting

agile cobalt
#

hard to tell what to try without knowing what your model is like, what your data is like or even which kind of problem you are trying to solve, but you might need to try using a larger model (more layers (deeper) or more features per layers (wider))

echo vapor
#

im displaying a 30 fps video with opencv and using a waitkey() parameter of 1000//30 to display each frame with 33 ms delay. I thought this would be right and online sources seem to confirm it, but the video still plays slower than it should be. any idea what might be affecting this? could it be device limitations? im in a 3.8 venv so could it be that?

hasty mountain
#

I've seen a paper where the Batch size were actually the sequence of tokens. In that case, you'd probably have something like (Sequence, d_model) ---> (Sequence, vocab_size)

lapis sequoia
#

# Get predictions for the test dataset
predictions = model_VGG_2_simple_reg.predict(test_generator)

# Convert predictions to class labels
predicted_labels = np.argmax(predictions, axis=1)

# Get true labels for the test dataset
true_labels = test_generator.labels```
#

Is this the correct way to do it guys?

#

The accuracy from it and this model_VGG_2_simple_reg.evaluate(test_generator) is vastly different

#

Like look at this

agile cobalt
#

what exactly is model_VGG_2_simple_reg? it should explain what evaluate is doing on the documentation

#

the loss is a completely different concept from the accuracy though

broken saffron
#

I’ve been trying to use OpenAPI’s free tier to generate responses in my program but it says I’ve reached my token limit. I’ve never successfully made a request to the API so I’m not sure how that’s possible. I have max tokens = 50

young granite
#

someone here know about polarplots?
the r should be the magnitude of my real part and the angle should be related to my imag part, right?
Why when i got a complex val of lets say:

#

!e

import numpy as np

z = np.array([4e6+4e6j])
r = np.abs(z)
theta = np.angle(z)

print(r, theta)
arctic wedgeBOT
#

@young granite :white_check_mark: Your 3.11 eval job has completed with return code 0.

[5656854.24949238] [0.78539816]
young granite
#

all my frequencies are spread across +3 and -3° and im trying to figure out what a polarplot tells me other then phase information

#

i guess thats good when im trying to model them with a SVR or LR

wooden sail
#

depends on what you mean by polar plot

#

if you just represent the coordinates in a cylindrical system, it will look exactly the same as cartesian ones, it's just a reparametrization

#

if you plot the polar coords as rectangular, you deform space by the amount specified by the jacobian (should be something like r sin theta)

young granite
#

im looking at my data x,y (real, imag) and the resulting polar plot for the complex numbers

wooden sail
#

that would probably look identical to the usual cartesian plot

young granite
#

yes but im trying to get information out of it and finding the usecase for it 😄

wooden sail
#

what do you mean by "information" here?

young granite
#

so its just for visualisation not to determine trends

#

just to show all info of my complex vals

#

real vs imag + polarplot sums up pretty much all my complex val got to offer right?

wooden sail
#

those two are the same thing

young granite
wooden sail
#

right, but then you wouldn't wanna make a polar plot of that

young granite
#

can u elaborate

wooden sail
#

the polar representation is just an alternative parametrization

agile cobalt
young granite
wooden sail
#

well, that's if you use polar coordinates and not a polar plot, which is also what i mentioned

young granite
#

so i did use the wrong wording, sorry

#

so i did everything correctly yes? 😄

wooden sail
#

i think so. lemme see if i can find the name

#

eh i can't find it

#

but you'd wanna find the magnitude and angle, and then do something like plt.plot(magnitudes, angles) without using projection="polar"

young granite
#

so i can finde correlations in my dataset

wooden sail
#

here's a MWE of what i mean

#

the two plots are the same, just using different parameters

#

1 sec

wooden sail
#

idk if this will look good here

#

!e

import numpy as np
import matplotlib.pyplot as plt

x = np.random.uniform(-1, 1, size=(5,)) + \
    1j*np.random.uniform(-1, 1, size=(5,))
real = np.real(x)
imag = np.imag(x)
r = np.abs(x)
angle = np.angle(x)

plt.subplot(1,3,1)
plt.scatter(real, imag)
plt.title("rectangular")
plt.xlabel("real part")
plt.ylabel("imag part")
plt.subplot(1,3,2, projection="polar")
plt.scatter(angle, r)
plt.title("polar")
plt.subplot(1,3,3)
plt.scatter(angle, r)
plt.title("rect. plot of polar params")
plt.xlabel("angle [rad]")
plt.ylabel("magnitude")
plt.savefig("moderate_oof.png")
arctic wedgeBOT
#

@wooden sail :white_check_mark: Your 3.11 eval job has completed with return code 0.

wooden sail
#

yuck, some overlap. but the point is. the plot on the left and the one in the middle are identical, just different parametrizations. the one of the right has a different appearance though

young granite
#

i see

#

thanks for ur effort what do u say to check for correlation in between my complex values

wooden sail
#

it will change if you reparametrize, sure

#

but i would kinda avoid doing it in polar coords

young granite
#

+1

wooden sail
#

the issue will be with 2 pi. angles close to 2 pi should be highly correlated with angles close to 0, but you'll have to take care of that as an edge case yourself

#

you can look for correlation using the rectangular ones though. iirc you said magnitude didn't matter, so you were gonna normalize the vectors

#

that'd mean you can directly use cauchy-schwarz to measure similarity

young granite
#

as always thanks edd ❤️

#

edd what kind of math geek are u to know all that on the fly? (always comes to my mind hahaha)

wooden sail
#

hmm you just happen to ask questions that land in the small set of things i have either read about or have dealt with in the past

young granite
#

funny

#

maybe one day i can become edd2.0

#

hahahaha

proud beacon
#

Hello, I need help please with making a bar graph. Here is my code below and I am trying to set the x-axis as all the states and then the y-axis as the number of shipments. I'm not sure what to inser in the plt.bar() so it outputs just the names of the states and the values corresponding to them. I've been at this for hours ._. I am very beginner.

arctic wedgeBOT
#
Formatting code on discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

young granite
#

makes it easier for us to read what u just did

proud beacon
#

ohh, do i just type "!code" and then past it under?

young granite
#

no u use the backticks

plain jungle
#

The title is not in quotes

#

@proud beacon

young granite
#

3x backtick +py then ur code and then close it with 3 new backticks

proud beacon
#
import matplotlib.pyplot as plt
import csv
from matplotlib.pyplot import figure

df = pd.read_csv('COVID-19_Vaccine_Distribution_Allocations_by_Jurisdiction_-_Moderna .csv')
print(df.head())

df = df[['Jurisdiction', 'Total Allocation Moderna"Second Dose" Shipments']]

plt.bar()
plt.title(Shipments of Second Dose of COVID Vaccine of Each US State)
plt.xlabel('Jurisdiction')
plt.ylabel('Total Allocation')
plt.show()```
proud beacon
#

omg yay, thank you it worked

young granite
#

if u edit it and write directly onto the first 3 backticks "py" (without ") u even highlight em

#

without py

import numpy as np

with py

import numpy as np
plain jungle
proud beacon
#

ohh okok, ill do that

plain jungle
#

String*

young granite
proud beacon
#

so like, in the plt.bar() would how would i include the values for x and y bc i am indexing only those values

#

ohh hwhat traceback?

young granite
#

the error

plain jungle
#

The plt.title(“…”)

#

Whatever the title name is it needs to be in quotes

young granite
#

plt.title(Shipments of Second Dose of COVID Vaccine of Each US State) u wrote it as a "variable" but u have to define it as a string
plt.title("Shipments of Second Dose of COVID Vaccine of Each US State")
also u need to assign data to ur plot or it will be empty with only axis labels and title

#

x and height are what u want to give into that

#

if there is "default" mentioned u do not need to define that (but u can do so)

wide crag
#

im having a dtype error could i get some help

lapis sequoia
#

The 2 elements in list are loss and accuracy respectively

#

Don't know why keras had to make their own syntax and not be sklearn kind

serene scaffold
frail sable
proud beacon
#

Hello, can you guys let me know if my code is done well? I am trying to use an excel spread sheet for the dad and i want to make a bar graph with the US states on the x axis and the total vaccine distributions for each state. Here is my code. I think there is an error in plt.bar()

#
import matplotlib.pyplot as plt
import csv
from matplotlib.pyplot import figure

df = pd.read_csv('COVID-19_Vaccine_Distribution_Allocations_by_Jurisdiction_-_Moderna .csv')
print(df.head())

df = df[['Jurisdiction', 'Total Allocation Moderna"Second Dose" Shipments']]

plt.bar()
plt.title(Shipments of Second Dose of COVID Vaccine of Each US State)
plt.xlabel('Jurisdiction')
plt.ylabel('Total Allocation')
plt.show()
frail sable
proud beacon
#

ohh okay ill change that

frail sable
#

I'm doing search on a directed graph, to play games, do GOAP, the works, it's very abstract and generalized. As part of that, I said to myself "Let's get rid of these 'two players, moving alternatingly' restriction. Every player moves every turn, and if it's not such a game, the non-moving player makes a null move." So now instead of Minimaxing state/node values on alternating levels of tree (graph) depth, I do a game theory matrix and do minimax on that. That seems to work, but is it formally valid? (This is an intermediate question, the whopper will come next.)

Okay, now I want to implement alpha-beta pruning. Instead of having alpha and beta values, I think I will again only have one value to consider. After expanding a node and giving the successors estimated values, but before enqueueing them for further expansion, I would calculate my optimal action on the parent, and then would only expand the successors than my action can lead to, and of those only those that will minimize the score I can get for that action? I think that would only be alpha or beta though so far?

rich condor
gloomy saddle
#

@nova pollen seems the above guy has only advertised things since joining

bold timber
junior stone
hasty mountain
#

But your generated token, the text generation actually happens outside the Decoder, after the whole forward propagation through the Transformer, in the FCC + Softmax layer

#

The decoder output is still...let's say... a hidden layer output...I guess one could say that...

rich condor
#

What type of models are Stable Diffusion and ControlNet respectively? They are definitely neural networks but are they GANs or CNNs?

hasty mountain
agile cobalt
hasty mountain
#

I think it's a Latent Diffusion with probabilistic Sampling.

I don't know about the ControlNet.

agile cobalt
steep echo
agile cobalt
rich condor
hasty mountain
# rich condor I saw all the copywriting and was terrified it was a paid course but the 'get st...
#

This blog is from an OpenAI's Research Leader

#

She even participated in GPT-4.

bold timber
steep echo
hasty mountain
nova pollen
arctic wedgeBOT
#

6. Do not post unapproved advertising.

bold timber
hasty mountain
timber flame
#

it's like teaching AI ? No teaching wrapper libraries right

#

import fastai n shit

hasty mountain
#

The text generation in fact happens at Fully Connected layer + Softmax, which is when the model will select the most likely token to be generated.

timber flame
#

I would recommend do this instead :

#

an actual ml / ai base forming course

bold timber
hasty mountain
bold timber
hasty mountain
#

Yes, the positional encoding is in fact done at the beginning. And you apply directly the positional encoding to both the input and target sentences

#

The picture isn't exactly wrong, but it's confusing

#

It tends to make things look more complicated than they really are

#

(Which seems to be a pattern when dealing with Transformers, by the way)

bold timber
hasty mountain
#

Like it's done in RNNs

#

But yes, in vanilla configuration, the decoder(which is composed of decoder blocks) will generate a hidden size which, in the FCC + Softmax will generate a single token

#

A decoder block does not generate a token per se, it generates a hidden size, features, just like a Fully Connected Layer generates, as output, numbers that represents features, or a Convolution Layer.

The process of selecting a token from the vocabulary is done in fact in the FCC + Softmax layer, which comes after the decoder

agile cobalt
# timber flame import fastai n shit

the part 2 literally doesn't uses fast.ai, it recreates things from scratch (then import from pytorch / hugging face since the performance of the from scratch things cannot compare)

agile cobalt
novel remnant
#

Hello, I've been trying to research methods when it comes to processing semi-big data with high cardinality (up to 1M rows and 4k columns) for simple but explainable machine learning tasks. Are there alternatives to pyspark or dask? I'm experimenting with polars and data.table and although they are really fast, they don't really solve the memory issues.

On a separate note, I noticed that pyspark is quite slow and has memory leaks performing column-wise operations on datasets with high cardinality. Are there general tips to tune pyspark jobs to accommodate for that? I can provide more details if needed

past meteor
#

Where is your data stored? Are you using scan_<datasource> instead of read_<datasource>?

novel remnant
#

my data is in parquet format which I'm reading from disk. I have tried the lazy evaluation with scan instead of read and fetching the results back with streaming=True. No UDFs are used.

past meteor
lapis sequoia
wheat snow
#

is this the right place to ask for matplotlib stuff?

wooden sail
#

sure thing

lapis sequoia
#

I am trying to build a treemap from the linux kernel git data set on keggle. I got so far as getting the total number of modifications per commit per file, with summing up the modifications through the directories. But it seems a bit clunky. https://github.com/TreeHappy/Kaggle/blob/main/commit-treemap.ipynb . When i sum up the modifications is there any way to keep the FilePaths also somehow?

GitHub

Contribute to TreeHappy/Kaggle development by creating an account on GitHub.

jolly dock
#

Ide says system can't found the path but there isn't any problems on the path. Can somebody help me to solve this?

#

I tried py models_dir = "C:/Users/hmtbr/Desktop/python/gpt-2/models/117M" but it didn't worked.

#

this is the code i use

fair magnet
#

I'm planning to train an AI that able to make song covers by a specific singer according to the data trained.
Just wanna ask is it possible to convert the audio datasets into a csv file? lemon_bald

flint gazelle
#

You theoretically can but its not recommended. But there should be other ways to load audio files into your libraries. For instance Tensorflow has a function tf.keras.utils.audio_dataset_from_directory()

fair magnet
#

just a sec
i dont think i can convert human singing sounds to midi right?

flint gazelle
#

Yeah but you need some kind of RNN to generate sounddata

#

This is a complex topic that requires a considerable amount of experience and time. If your new to this i would recommend starting simple with an easier task.

sullen kernel
#

I'm doing a machine learning project an AI that recognizes dogs and cats
I did the prediction thing
anyone knows what do I need to do after that?

flint gazelle
sullen kernel
#

i created a dataframe with the path, label and the rgb of the cats and dogs pictures (i used only 20 pictures 10 dogs and 10 cats) and after that i split them to train datas and test datas (70% train 30% test) and then i tested it and i think it guessed right
i need to find "best k"?

dusk aurora
#

You're probably looking for K means clustering here

simple tapir
#

hey

coral cradle
#

do you guys think I am overusing the dropout? it has a dropout of 0.5

hasty mountain
#

Except for that Dropout before the softmax. I'd risk to say that one may compromise things

#

Hm... Variational AutoEncoders are a bit sad... The math around them makes so much sense, the ELBo...the decoder having to find the most likely values for each pixel...
Yet, they seem to be so inefficient... Can only output blurred images unless they receive some help from a feature extractor or from a Discriminator...

thorn swift
#

does anybody have a project that could use another coder? i just wrapped something up and im looking to jump onto something

simple tapir
shell zodiac
#

Hello

CAPUCHIN_FILE = os.path.join('D:\\archive (4)\\Parsed_Capuchinbird_Clips')
file_contents = tf.io.read_file(CAPUCHIN_FILE, name=None)

I am running this in jupyter-lab and I get this error
NewRandomAccessFile failed to Create/Open: D:\archive (4)\Parsed_Capuchinbird_Clips : Access is denied.

#

the path is to a folder should I change it directly to the wav file?

foggy kestrel
#
  File "c:\Users\Main\Documents\Testing\server.py", line 11, in <module>
    from tensorflow import keras
ImportError: cannot import name 'keras' from 'tensorflow' (unknown location)```
tried upgrading and uninstalling tensorflow, nothing works. what should i do?
narrow crane
#

Could someone review my study plan for datascience? I'd like to know from successful people in the field whether it's holistic or not. I'm going to make a forum so I don't flood this channel. I'd also appreciate any additional advice y'all would have to offer.

fleet plover
unkempt egret
night prawn
#

I continued installing tensorflow gpu with wsl but it gives me this error message

sullen kernel
#

what is a hyperparameter?

dusk aurora
foggy kestrel
hoary plume
#

I'm reviewing a code that I need to run but I have a error in this line with Keras engine, the error is basically this:

ValueError: Exception encountered when calling layer "mrcnn_bbox" (type Reshape).
Tried to convert 'shape' to a tensor and failed. Error: None values not supported.
Call arguments received by layer "mrcnn_bbox" (type Reshape):
• inputs=tf. Tensor (shape=(8, None, 8), type=float32)

the line that causes the problem is the image I sent

#

I understand the error

#

but I dont understand how to solve it

#

maybe it's too little context

quartz ivy
#

Hi, i'm ML beginner. im training a simple cnn model on colab, i always get this kind of gpu memory spikes, and i can't run the training loop twice, as it will give me cuda out of memory error. is this common?

quartz ivy
#

Please advice 🙂

hasty mountain
#

You'll have to use less GPU memory, like decreasing your batch size or your model parameters

quartz ivy
#

can i show you my code?

hasty mountain
#

Or manipulate your code so it has to use/save less variables

#

Sure, send it here

#

Ok, I see the problem...

#

You're using a linear layer with more than 400 million parameters

quartz ivy
#

nn.Linear(808064, 1024),
nn.ReLU(),
nn.Linear(1024, 512),
nn.ReLU(),
nn.Linear(512, 2)

hasty mountain
#

nn.Linear(80*80*64, 1024)
You're basically creating a matrix with 409,600 (80x80x64) x 1024 elements

quartz ivy
#

thanks! do i change the 1024 to something smaller?

hasty mountain
#

Which will totalize 419,430,400 elements

quartz ivy
#

oh geez, i copied this part from someone else's code

hasty mountain
#

If you were to stick to the linear layer, you'd have to use something like nn.Linear(80*80*64, 16) in order to not blow up your memory

#

But this would be a too aggressive bottleneck of information, which may prejudice the model.

quartz ivy
#

nn.Conv2d(64, 128, 3, 1, 1), # [128, 64, 64]

        # nn.BatchNorm2d(128),
        # nn.ReLU(),
        # nn.MaxPool2d(2, 2, 0),      # [128, 32, 32]

        # nn.Conv2d(128, 256, 3, 1, 1), # [256, 32, 32]
        # nn.BatchNorm2d(256),
        # nn.ReLU(),
        # nn.MaxPool2d(2, 2, 0),      # [256, 16, 16]

        # nn.Conv2d(256, 512, 3, 1, 1), # [512, 16, 16]
        # nn.BatchNorm2d(512),
        # nn.ReLU(),
        # nn.MaxPool2d(2, 2, 0),       # [512, 8, 8]
        
        # nn.Conv2d(512, 512, 3, 1, 1), # [512, 8, 8]
        # nn.BatchNorm2d(512),
        # nn.ReLU(),
        # nn.MaxPool2d(2, 2, 0),       # [512, 4, 4]
#

so i guess that is what this commented out code was doing

hasty mountain
#

Indeed

quartz ivy
#

having incorrectly defined the NN structure is indeed a cause. But i also notice if i move the model variable declaration outside the training loop it can run without error. i wonder why is this

#

i'm using a cross validation in the training loop. and according to templates found online, they put the model and optimiser inside the training loop.

#

like ``` #model = Classifier().to(device)
model.apply(reset_weights) # reset the weights to be sure

#optimizer = torch.optim.Adam(model.parameters(), lr=0.0003, weight_decay=1e-5)

hasty mountain
#

Uh... Those definitions must be outside the training loop, actually... Otherwise you'll just be recreating your model and there'll be no backpropagation

#

The backpropagation is the part that tends to cause trouble with memory

quartz ivy
#

i copied from this article. it sounds like either there's a mistake in it or i interpreted wrong

#

it's on line 12-14

quartz ivy
hasty mountain
#

for fold, (train_idx,val_idx) in enumerate(splits.split(np.arange(len(dataset)))):

    print('Fold {}'.format(fold + 1))

    train_sampler = SubsetRandomSampler(train_idx)
    test_sampler = SubsetRandomSampler(val_idx)
    train_loader = DataLoader(dataset, batch_size=batch_size, sampler=train_sampler)
    test_loader = DataLoader(dataset, batch_size=batch_size, sampler=test_sampler)
    
    model = ConvNet()
    model.to(device)
    optimizer = optim.Adam(model.parameters(), lr=0.002)

    for epoch in range(num_epochs):
#

There's a loop for each k-fold, and there's a loop for each epoch

#

The model is indeed redefined for each fold, but it's kept for each epoch

quartz ivy
#

yeah that makes sense.

#

thanks

quartz ivy
#

it turns out to be so much faster than before. problem solved

maiden widget
#

I want to make audio classification model which will identify audios into alphabet and numbers from 0 to 9

#

I can't find any dataset which will have audio files of alphabets and numbers

#

I have made dataset on my own having 15 files for each class (36x15 files)

#

but my model has very low accuracy because of such small dataset

#

does anyone have any resource or idea for me to work on ?

#
num_classes = 36

input_shape = (num_mfcc, max_len, 1)

model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=input_shape))
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Conv2D(64, kernel_size=(3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Conv2D(128, kernel_size=(3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))


model.add(Flatten())

model.add(Dense(128, activation='relu'))

model.add(Dense(num_classes, activation='softmax'))

model.compile(loss=keras.losses.categorical_crossentropy, optimizer=keras.optimizers.Adam(), metrics=['accuracy'])
dreamy phoenix
#

Not sure if I should ask about this in one of the python help channels or in here but, so I was training a YOLO model and in the end I get two weights (last.pt and best.pt)
The "best.pt" weights come from the epoch which had the best results or how exactly does it work?
Cause I trained a few YOLO models with different hyper-parameters and I need to compare them and in my results file (which was auto generate during training I have)

epoch    recall    mAP@50  mAP@50-95
0        0.69      0.79    0.56
1        0.67      0.76    0.52
2        0.58      0.67    0.43
....
19       0.66      0.76    0.52

Does that mean that my "best.pt" comes from the first epoch and the rest of the epochs are essentially useless?
Please @ me if any1 has the answer when you see this

south edge
#

someone help

#

can someone tell me why should our input values should be two dimensional when we use the predict function, and numpy makes my head spin when i use concatenation, is there any alternate way to concatenate or reshape my dependent values

#

print(np.concatenate((y_pred.reshape(len(y_pred),1), y_test.reshape(len(y_test),1)),1))

#

i cant seem to remember this most of the times is there any alternative way'

serene scaffold
#

But generally speaking, python ML stuff operates on batches of data. So whatever you're doing, the outermost dimension stores instances of the same kind of information

#

If your data points are one dimensional arrays with four values, then an array of shape (n, 4) would be n of those.

#

And if your data points were two dimensional arrays of shape (3, 4), then an array of shape (n, 3, 4) would be n of those.

#

If you have a list (not an array) of those arrays that you want to predict for at once, you could use np.vstack

#

Which stands for vertical stack.

dreamy phoenix
#

A precision-confidence plot tells you at what confidence the model has 100% precision, right?

#

For example in the first one the precision is 1 when the model has 100% confidence
and in the second one the precision is 1 when the model has 97.7% confidence

bold timber
#

Hi, I have a question What is the actual input to the decoder in the first iteration (from input in the word embedding and positional encoding):

<sos> <token1> <token2> <token3> <token4> or just <sos>? @hasty mountain

hasty mountain
#

Protip: this inference mode is actually rubbish, though. It was meant to be used with powerful hardware that could make it possible for a single model generate multiple sentences at a short time. In the end, it would be selected.the sentence with the best BLEU or Perplexity score.
When you finish building the model, search for Schedule Sampling for Transformer, which is more convenient for mere mortals that don't have dozens of Teslas T4 available.

bold timber
hasty mountain
#

During training, you'll have both the input and the target sentences.

But that's not the case during inference, when you have the input sentence, but not the target (ex: ChatGPT knows what you said to it, but it doesn't know what it must say).
In that case, your target sentence will be just <SOS> and, as the model generates token by token, you'll append the generated token to the target sentence and make another iteration. This will repeat until your model generstes a <EOS> token or simply reaches the maximum length you'll stablish.

bold timber
#

whether it means that the Encoder will process the original sentence input, while the Decoder input is the target sentence in the form of <sos><token target1><token target2> <token target 3><token target 4> and so on.

Since the Decoder is autoregressive, the Mask Multi-Head Attention will mask other words and only focus on certain tokens so that means the token sequence becomes <sos><0><0><0> ==> the value 0 refers to the result of infinite negative.

For example, in the first iteration of the process the output of the Decoder is the word "I". Well, that means that in the second iteration of the process the input to the Decoder is <sos><I><token target3><token target4> and so on.

Just like before, inside the Mask Multi-Head Attention will also do masking so that the token sequence becomes <sos><I><0><0><0>.

For example, in the second iteration of the process the output of the Decoder is the word "want". Now, that means that in the third iteration of the process the input to the Decoder is <sos><I><want><token target4>.

And this will repeat until it produces <eos>

Is this really the process? please correct me if I'm wrong. @hasty mountain

quartz ivy
#

If i have a very small dataset of 80, each sample is 160x160x15, essentially an image with 15 channels. an ordinary cnn is way too complex for this and it leads to serious overfitting. What might be a good way to train this? Any suggestions?

cold osprey
#

dropout?

queen cradle
still moon
#

I'm not currently working on my neural network but it's on my mind so I'll ask...
Summary is I have arrays of floats that I'm working on. Each array is a row of data from my database which contains 37000 records.

I'm splitting this data into 3 sets, train_data, test_data, and val_data to train my model which I've structured so that each element of the array is a neuron on the input layer. (I hope my terminology is correct, I'm still learning).

The layers are activated with relu (or tanh - or some combination) and I'm using a single regularization layer with L2.

The model is compiled using Adam on a learning rate of 0.01 and is being fitted in batches of 320 over 10000 epochs.

Best I can manage in this or any other configuration (I've spent the weekend tweaking my hyperparameters) is about 14% accuracy which doesn't change. My loss rate decreases until about the 4000th epoch at which point I think it starts overfitting.

I don't have the foggiest idea how to improve the accuracy of my model so if anyone can make any suggestions, I'll be more than happy to try them out. I'm completely at a loss at this point.

#

Sorry for wall of text.

solemn breach
#

so you change the order the neural network reads the data without actually randomizing it

#

and subtitute change the prexisting images so new images are changed and differ by certain attricibutes

agile cobalt
solemn breach
still moon
#

I mean, changing it is obvious, but I don't know how to change it that would make a meaningful change

solemn breach
#

are u using RMSProp

#

and cross entropy

#

oh you mean how to increase its accuracy without changing relu

still moon
#

I tried to use categorical cross entropy but it errored... I'm using MeanSquaredError for loss

solemn breach
#

it seems like relu would a be a bit slow

#

one sec

#

why dont u use meansquarred error as inputs for relu?

still moon
#

Wish I had the project with me at work so I could fiddle with it

#

But I'll try it when I get home in a few hours... Trying to learn between actually working 🤣

solemn breach
#

oh lol

#

and using cross entropy for tanh is not a bad idea

still moon
#

Monday to Friday 6-3. It's about 6 hours left plus about an hour drive home

solemn breach
#

Its quite interesting...you can predict a good amount of it out by using language models as a objective argument to fit to

#

oh wow

#

hellas bro

#

maybe u can play around with the truth statements in linguistics

still moon
#

Funny you should mention language models because my entire education in this field so far consists of harassing ChatGPT about anything I don't understand

solemn breach
#

most of the loss functions are to compensate for lack of true or known truth statements

#

More like a confirmation step after having a rough estimate

#

based on repetition and closeness of subsequent prompts?

#

variance gets bigger or smaller

quartz ivy
still moon
#

Question: since I seem to be getting to overfitting within 4000 epochs, is it still worth it to run 10000 epochs?

solemn breach
#

create varianceee or create nodes that predict variance

quartz ivy
solemn breach
#

but you have to keep the ith row and jth height as consistent shift value

agile cobalt
quartz ivy
#

from what i understand, the 15 features at each pixel value are parameters to fit a radioactive decay, the image was taken using FLIM imaging

agile cobalt
#

I meant how many are cancerous and how many are benign

quartz ivy
#

84 samples in total, 61 benign, 23 cancerous

#

i used cross validation btw, tried 4, 6, 8fold,

agile cobalt
#

that really does not sounds like enough data to fit a model for me

quartz ivy
#

yeah ikr

solemn breach
#

check how many are similiar

#

and u can bs more images based off how similiar they are and in what range the cancerous types would apepar in

agile cobalt
#

you can try applying regularisation, using simpler models and/or using ensembles, but comparing the number of features you have (160*160*15 = 384k) to the number of rows (81)... not so sure about it

still moon
quartz ivy
cold osprey
#

a graph would be easier to see

#

loss/accuracy curve

quartz ivy
#

that's basically all there is, acc and loss don't change after this

cold osprey
#

r u sure its actually 0.91% and not 91% ?

solemn breach
quartz ivy
quartz ivy
agile cobalt
#

you could get an accuracy of 75%ish if you just guessed benign all of the time?

cold osprey
#

F1 score

solemn breach
#

u need a lot more data

#

lol

quartz ivy
#

thanks for the suggestions!

#

really appreciate if someone could help take a look at the code and output and if there is some major obvious error

#

h ttps://colab.research.google.com/drive/12uCuDc5s2J2O_BlZKaxZBbr-y2E_yI8f?usp=sharing

cold osprey
#

nice h

#

xd

quartz ivy
#

if dataset is too small theers nothing i can do. might just give up on this one lol

solemn breach
#

ill take a look lol

#

maybe try increasing the attributes

#

categorization method

cold osprey
#

more transforms can help with overfitting maybe

quartz ivy
#

like the number of classes?

#

currently im putting the high cancer, medium cancer, and mild cancer all under the category "cancer"

quartz ivy
cold osprey
#

hmm why is that so

solemn breach
#

to truly increase the attributes, you need to have definitions that go outside their bounds and refer to like reason for severity of cancer

cold osprey
#

cant run the nb coz the data not in my gdrive

solemn breach
#

yeah try everything tilting, colors, contrast

quartz ivy
#

the 15 features define or mimicks this decay curve

#

they are like parameters for an equation

cold osprey
#

wavelengths?

quartz ivy
cold osprey
#

each channel here is a decay curve?

quartz ivy
#

each pixel has 15 features, these 15 features define the decay curve itself(at this pixel point)

cold osprey
#

so each of the 15 is at a certain time stamp

quartz ivy
#

there were 900 features at each pixel initially, then my supervisor turn them into 15 somehow

#

900 refer to the value at each timestamps maybe

cold osprey
#

i think so

#

from what i know from reading about fluorescence decay and what u mentioned

cold osprey
#

each channel is an image at time t right, so not sure why u can transform them like normal images

#

ive a physics background so now imagining ur images is like having a sensor detecting some particle/substance decaying

quartz ivy
#

it's like 800 mb

cold osprey
#

sure, but i cant look at it in much detail rn

#

rushing for a work deadline tmr haha

quartz ivy
#

ok rly appreciated

potent lynx
#

guys I had a doubt

#

how can we plot fourier transforms

#

graphs with either the extension expanded fourier sequence

#

or the simple quadratic equations

#

and can it be done using matlab or plt

lapis sequoia
#

hiya

wooden sail
solemn atlas
#

I want to learn about transformers in NLP but i don't know where to begin

past meteor
gloomy saddle
solemn atlas
#

Ty very much

past meteor
# solemn atlas Ty very much

If you haven't done this yet: I recommend you download zotero and add the arxiv version to your library. It's a great place to mark text, take notes, ...

solemn atlas
drowsy timber
#

is there a spark sedona package for reading netCDF files?

I'm having trouble trying to load multiple large netCDF files into a pyspark dataframe

#

xarray won't work cause it keeps crashing the kernel and I can't really use any other method since I'm just coding on a school env that I can't edit

frank blade
#

Yo, how do you decrease the majority and increase the minority data at the same time? Is it possible with sklearn smote?

I'm trying to balance my data.

potent lynx
#

I know about SMOTE

#

Synthetic Minority Oversampling technique

#

heres the link

#

might be helpful

frank blade
#

just finding the right technique

potent lynx
#

its pretty much the right one

#

easy to use

#

effective and helpful

frank blade
#

alright, maybe I'll just change the parameters of my model

potent lynx
#

or

#

you could go with the classic upweighting and downsampling techniques

#

just for the imbalanced data

frank blade
potent lynx
#

sampling and splitting

#

machine learning

#

data-prep

#

construct/sampling-splitting/imbalanced data

past meteor
#

As usual, I'm skeptical about SMOTE, class weights, ...

#

I prefer just doing it as-is and selecting a cut-off myself through PR-curves / ROC / ...

frank blade
#

thanks, I'll look up for it!

queen cradle
# quartz ivy if dataset is too small theers nothing i can do. might just give up on this one ...

You don't have enough data for a "big data"-style approach. In order to make any progress, you will need a simpler model. You could try random forests or support vector machines, though they might not work any better.

You might consider feature engineering. This is not fashionable, but it works on small data sets. The idea is that you use your domain-specific knowledge and your understanding of the data to construct, by hand, new features as functions of the old ones. For example, maybe the distribution of decay rates is different between benign and cancerous cells. (E.g., maybe the average decay rate is different, maybe the maximum decay rate is different, etc.) You could construct new features for the distribution of decay rates in the image; maybe these features can distinguish the two cell types. Or maybe it's the case that the height of the peak values is different between the two cell types, or the width of the peak is different, or the time to reach the peak, or lots of other things.

If you have enough data, then a fancy neural network model can discover these relationships. Feature engineering is most useful when you don't have enough data. It requires a lot of time thinking of potential features and evaluating them. It may be worthwhile if the application is valuable enough. However, it can be fragile. If your data set is too small, then it's possible that the relationship you discover is spurious and will disappear in a larger data set. (You can view this is a multiple hypothesis testing problem: For each potential engineered feature, you need to test the hypothesis that it's significant; if you test enough potential features, then by random chance one or more will look good.) Feature engineering tends to work better when the new features have simple conceptual descriptions that make scientific sense. I can't guarantee that it will help you, but it's something to consider.

past meteor
#

General tip for feature engineering, you can look at the errors on the validation set to figure out what can help. A classic one is realising you need a holiday variable in forecasting

still moon
#

@solemn breach I learned something embarrassing about my model... rather about the data I'm using to train it. I inadvertently put a limit of 10 records from my 37000 record data set for the training process. So it was only learning on 10 records.

Having corrected that, unfortunately, I notice no real improvement. Loss rate is fluctuating around 1000 and accuracy is fixed on 0.0841... this is without my regularizer layer, however (thought I'd take that out and see how it does without it).

#

You told me to add variance, but the problem is I'm working with medical data like fasting blood glucose. There's only so many values you can have for such a data point...

steel forge
#

how can i take the adress only from this format? but from multiple sources as this is just an example

#

i'm thinking of using a regex but i aint sure

fresh tiger
#

Hey, I have a question regarding numpy's histogram2d function.

I have code that produces spike plots, and also contours on top of heat maps (screenshot 1 and 2 resepctively)

the plotting code for both screenshots (respectively) is as follows:

    heatmap, xedges, yedges = np.histogram2d(everyMortonValueDf['morton'].values.tolist(), everyMortonValueDf['index'].values.tolist(), bins=50)
    
    
    extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] # [-1] lets us access the last value of array.
    print(xedges[0])
    print(xedges[-1])
    print(yedges[0])
    print(yedges[-1])

    print(np.count_nonzero(heatmap.T))
    
    fig = plt.figure(figsize=(9,9))
    
    #sns.heatmap(heatmap.T, cmap="viridis")
    #plt.clf()
    #plt.imshow(heatmap.T, extent=extent, origin='lower', cmap='hot')
    #plt.show()
    plt.clf()
    plt.imshow(heatmap.T, extent=extent, origin='lower', cmap="hot", aspect='auto', interpolation="None")
    plt.colorbar()
    plt.contour(heatmap.T, extent=extent, colors="white", linewidths=0.7)

 heatmap, xedges, yedges = np.histogram2d(everyMortonValueDf['morton'].values.tolist(), everyMortonValueDf['index'].values.tolist(), bins=(31,31))
    
    X, Y = np.meshgrid(xedges[:-1], yedges[:-1])
    
    # 3D creation
    fig = plt.figure(figsize=(9,9))
    fig.suptitle('Spike plot of right lane changes')
    ax = fig.add_subplot(projection="3d")
    mappable = ax.plot_surface(X, Y, heatmap.T, cmap="coolwarm")
    ax.set_xlabel('Morton (scaled by 1e10)')
    ax.set_ylabel('index')
    ax.set_zlabel('freq')
    ax.zaxis.set_rotate_label(False)
    ax.view_init(elev=45, azim=-70)
    #ax.set_zlabel('freq')
    #ax.set_zlim(bottom=-30)

    fig.colorbar(mappable=mappable, pad=0.1)
    plt.show()

dense forge
#

do someone know a package to train a chat ai for a discord bot?

fresh tiger
#

I want to kindly confirm my understanding in terms of:

Do the spikes represent a single bin, i.e: would a spike : /\ denote an entire bin, so the highest spike would be a single bin with the highest frequency.

Or, does a spike represent more than one bin. I understand it as the aforementioned scentence. So in that case, the countour plot (screenshot 2) could be viewed as: where we have more close contours = bins that have a much higher frequency of scatter plot point occurances?

queen cradle
# fresh tiger I want to kindly confirm my understanding in terms of: Do the spikes represent ...

The meaning of a spike depends on its width. If I understand Matplotlib correctly, then the height at the center of the bin will always equal the value assigned to that bin. So if the spike is a single bin wide (e.g., a single 1 surrounded by 0's), then you get a very narrow spike contained in that bin. If you have a square of four 1 values surrounded by 0's, however, then you get a little plateau connecting the centers of the four bins. If you have a chain of spikes in a line, like you do in your picture, then you get a ridge.

molten hamlet
#

I found solution

#

plt.subplots(sharex=True) 😄
it will move all subplots to same X

sharp bone
#

I downloaded instaloader using these 3
-m pip install instaloader
pip3 install instaloader
pip install instaloader

But when I run a script that has
import instloader

it returns with "ModuleNotFoundError: No module named 'instaloader'" Why is this and how to fix?

agile cobalt
#

we will not help with scraping Instagram

sharp bone
#

I posted in wrong channel?

fossil scarab
#

has anyone used an AI to train another AI in coding? I am using a model that is in est. 85% correct but makes numerous syntax errors, I am trying to get the bot im training to be around 90% correct, but I am using the idea of human programming suggestion over direct fixes any tips?

young granite
#

can one explain to my why when i use MultiOutputRegressor(SVR()) on ~900 Sets of 30 Features and 15 Targets takes only 2min and when i turn around Feature and Target its >10min? (i do use Scaler in both cases)

plain jungle
# plain jungle Finally got it patched

Finished a video where I share about this

https://youtu.be/x2YmEX1XzGI

If anyone’s interested

Automate algebra with this this in-depth tutorial on implementing a neural network to solve math questions.

Build from scratch using the numpy library and create a dynamic model for your neural network in Python. Expand your skills even further with another tutorial on automation using the selenium library.

Video Highlights:

  • 00:00 Intro
  • 0...
▶ Play video
warped wigeon
#

Anybody know how I can improve my image classification model? I'm mostly following the tutorial, but the validation accuracy is consistently bad. This is my sequential:

model = Sequential([
    # Augmentation
    layers.RandomFlip("horizontal", input_shape=(img_height, img_width, 3)),
    layers.RandomRotation(0.1),
    layers.RandomZoom(0.1),

    # Processing
    layers.Rescaling(1. / 255, input_shape=(img_height, img_width, 3)),
    layers.Conv2D(16, 3, padding='same', activation='relu'),
    layers.MaxPooling2D(),
    layers.Conv2D(32, 3, padding='same', activation='relu'),
    layers.MaxPooling2D(),
    layers.Conv2D(64, 3, padding='same', activation='relu'),
    layers.MaxPooling2D(),
    layers.Dropout(0.2),
    layers.Flatten(),
    layers.Dense(128, activation='relu'),
    layers.Dense(num_classes)
])

My dataset consists of about 16k images, labelled with 86 labels. I tried training this with Transformers/Pytorch as well, and the output was a lot better than I expected, at maybe 0.7 accuracy, though I'm trying to port this to Tensorflow/Keras.

#

I previously tried using no dropout, a lower number of epochs, and a lower validation split, but that was much worse:

#

Should I perhaps try to decrease the learning rate?

plain jungle
#

@warped wigeon have you tried leaky ReLu or some other activation function. ReLu is good but can result in a dying node problem, and that may or may not be why your model is platooning prematurely

#

Also 86 out (label) may be a lot, try a smaller classification

warped wigeon
#

I'll try these, what would be a good batch size for this dataset?

#

Also, about how many labels would be ideal for this model? @plain jungle

plain jungle
warped wigeon
#

I might just try to train VGG16 with ImageNet weigths on this, even though it'll take like 60x longer

hasty mountain
hasty mountain
warped wigeon
#

I'm still new to ML in general, so I apologize if this code makes no sense

torpid shadow
#

hi, can anyone teach me how to work with the chatbot and spacy program?

serene scaffold
#

I don't know if there's a specific library called "chatbot" that is widely known, so I can't help you with "the chatbot".

torpid shadow
#

im trying to make a chatbot

#

im using the chatterbot and spacy

#

my program told me to get spacy

#

can i send u my code on dm/

warped wigeon
dusty bay
#

How do I change the xtick on the plot. I am using matplotlib

solemn breach
#

how does neural networks measure time per pattern?

earnest widget
#

Hi guys, I am using MobilenetV3 large model with PyTorch. The dataset I have is a total of 862 images and I cannot get access to more data. But the results are strange, it directly reaches 100% accuracy for training.

#

I have used a batch size of 16 also with learning rate and weight decay.

#

I think the training set is getting generalized quickly.

agile cobalt
#

pretty sure that memorized, not generalized
you're most likely overfitting

earnest widget
agile cobalt
#

data augmentation might help

earnest widget
#

Can't data aug actually make the performance worse at times?

agile cobalt
#

yes

#

notice the "might"

#

probably still worth a try

#

you could also try lowering the learning rate, though that I'm even less sure about

#

just wondering, what did your accuracy look like before fine tuning? or were the classes not present in the original outputs

past meteor
# young granite can one explain to my why when i use MultiOutputRegressor(SVR()) on ~900 Sets of...

A quasi important thing to know is that underlying most linear models there's an optimisation problem you can solve in the primal (the unknowns are the amount of features) and in the dual (the unknowns are the amount of data points you have). SVMs that make use of a kernel different than the linear kernel (e.g., SVR in sci-kit) solve in the dual by default so they scale poorly to having more data

#

Afaik SVMs are not multi-output by default so having 30 targets means you're making 30 models but I'd have to double check.

agile cobalt
# agile cobalt probably still worth a try

addendum on that one: make sure to pick augmentation techniques that make sense for this problem, i.e. the image after augmentation preferably looks like something that could be in your dataset, avoid doing completely random operations

earnest widget
# agile cobalt just wondering, what did your accuracy look like before fine tuning? or were the...

Yeah learning rate is already 0.001, I tried 0.0001 with weight decay also, no major difference. But lowering batch size actually made a difference in the lowering the validation loss. Currently training without any learning rate or weight decay to see what it's like. But the max augmentation I have is just the basic transformation according to the PyTorch docs for MobileNetV3 inference section: https://pytorch.org/vision/main/models/generated/torchvision.models.mobilenet_v3_large.html#torchvision.models.mobilenet_v3_large. This is what it looks with 5 epochs currently going on.

#

NO fine tuning.

agile cobalt
earnest widget
#

Yes.

#

Just the pretrained model as it is.

agile cobalt
#

...

#

are you using a pretrained model or not?

#

because if so, then you are fine tuning?

earnest widget
#

Yeah pretrained but I did not add any new parameters to it.

agile cobalt
#

I'm pretty sure that still qualifies as fine tuning

past meteor
#

What is your setup now @earnest widget you just added fully connected layers but froze the conv?

earnest widget
#

No freezing of any layers. I am just using it as is:


model.eval()```
#

With the respective weights according to the docs in PyTorch.

#

And my optimizer as ADAM.

earnest widget
past meteor
earnest widget
#

Yeah I will check it out. THanks.

#

I still think MobileNetV3 could be the reason for the low performance.

fresh tiger
cold osprey
#

Using a pretrained model and training on another dataset that is not part of the pretrained model's is fine tuning

frank blade
#

why is my scikit gridsearch always resulting in BSOD:

system_service_exception nvlddmkm.sys

queen cradle
solemn atlas
#

@past meteor can i dm you? Have some few questions, some personal questions

past meteor
#

Can we keep the chat here? I don't know all the answers, other people can answer (and correct me)

solemn atlas
#

No no it's not about the subject actually

#

That's y asked for dm

past meteor
#

I'm probably not comfortable answering anything in DM I wouldn't answer in this chat so just ask here

solemn atlas
#

Ok

cold osprey
#

not sure why ppl like to dm LUL

hasty mountain
#

Can someone help me with a riddle between training and evaluation mode behaviour?

I have a model which is based on a ResNet-18, feature extractor with convolution layers serving as downsampling layers and with dropout layers (20%) after 1 downsampling + 5 residual blocks. There's 2 convolutions per residual block, with 1 batch norm after each one.

I'm fine-tuning my model in a small dataset (1100 images), and using a batch size of 1 to make things easier when I begin self-learning stage(to create my actual dataset).

Thing is...my model is performing quite well in the training stage, and when I check its outputs and compare with the inputs and targets, things are pretty fine.
However, when I switch my model to evaluation mode...it keeps generating just a single output, no matter what the input is.

Any suggestion on what could be causing this?

#

I suspect that the BatchNormalization may be the issue. For some motive, I didn't get an error for using batch size = 1. In training mode, the Batch Norm keeps track of the running estimates of the computed mean and variance. In evaluation mode, those estimates are used for normalization.
But then...shouldn't, then, my model perform poorly both in training and evaluation mode? Why does it performs poorly exclusively in evaluation?

hasty mountain
#

I think I get it now.
In training mode, since my batch is 1, the BatchNorm computes the mean and variance of this single batch and uses it to normalize it. A normalization done especially for that sample.
But, since the evaluation uses a moving average of all mean and variances registered through training, this normalization is more generalistic, thus, lower performance

#

Math is such a strange sorcery

past meteor
#

Layernorm gives way less headache

hasty mountain
#

Yes, but I remember it wasn't good for my Unsupervised Learning Pre-training. The model gets too unstable and prone to collapse.

#

Good thing that I can turn off this moving average behaviour of Pytorch's Batch Norm

past meteor
#

How are you pretraining? The oldschool stepwise autoencoder approach?

hasty mountain
#

No, I've used Minimum Entropy

#

An idea that I got from a recent paper, which is basically using embedding layers after the feature extracting layers and using the argmax of a normalization mode to get the minimum entropy of that data

#

Also, using data augmentation techniques for the input

past meteor
#

Hadn't heard of this, I'll look it up 😮

#

This is another canonical approach: https://arxiv.org/abs/2006.07733

hasty mountain
#

They mentioned that BYOL too

past meteor
#

But I guess MinEnt is not constrained to images as BYOL is (or was?)

hasty mountain
past meteor
#

Tbh BYOL just needed you to have an augmentation. I think if you have one for your graph (which may be easy if certain permutations result in the same graph) then it would work too? I don't know

#

I've had a long day but I'll put MinEnt on top of my to-read list 🙂

#

Do you use GNNs or just regular convnets?

hasty mountain
hasty mountain
#

Since dealing with molecules kinda requires GNNs, since those are more efficient...

past meteor
#

Haven't used geometric DL myself yet but I've been pushing for a project related to it. Hopefully they'll deliver soon

hasty mountain
dusk aurora
hasty mountain
#

Maybe someone else here can help

#

But, for theory, folks here tend to recommend the 3 blue 1 brown

#

There's also his youtube channel

jolly dock
#

Learn how to use TensorFlow 2.0 in this full tutorial course for beginners. This course is designed for Python programmers looking to enhance their knowledge and skills in machine learning and artificial intelligence.

Throughout the 8 modules in this course you will learn about fundamental concepts and methods in ML & AI like core learning alg...

▶ Play video
#

would this vid help me to learn basics of tensorflow and coding an ai?

#

would you guys recommend it

#

will it worth the 7 fucking hours

spare briar
#

also would strongly recommend VICReg over BYOL or MinEnt

#

why are you using such a small batch size

agile cobalt
# jolly dock would you guys recommend it

will it teach the basics? maybe
will you learn it properly? probably not
worth the 7 hours? unlikely

we usually recommend against those ultra large videos - usually just watching without exercising what you learn won't really teach you anything

jolly dock
#

alright

#

thanks

agile cobalt
#

there are a few resources we recommend pinned + some more on our website

#

!resources

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.

agile cobalt
#

I personally recommend following a course like Andrew Ng's machine learning specialization on Coursera or Jeremy Howard's on course.fast.ai

jolly dock
#

what about modules

#

which one would you recommend me

agile cobalt
#

pytorch

jolly dock
#

why

agile cobalt
#

it is just more popular than tensorflow now (as far as I can tell)

jolly dock
#

i tought tensorflow was the best module to train ais

#

i'll do some research thanks

agile cobalt
#

either of them work just fine

sinful valve
#

Hiii I'm confused help Wich type of ai is used in medical imagery is it embedded ai or standalone ai?

undone topaz
#

im working on ocr of devanagri script and i am currently stuck on detecting the horizontal line and removing it.any idea how can i acheive this

hasty mountain
hasty mountain
# spare briar why are you using such a small batch size

Just to make things convenient.
My dataset is composed of 46,000 images, but just 1,100 are labeled. So, the unlabeled samples have N+1 label that serves as a NaN label.
So, for supervised fine-tuning, every time dataloader batches my dataset, I have to check whether each item in that batch has the NaN label and remove both the label and the image.
Batch size of 1 would allow me to simply skip that batch if that's the case

#

But it's ok. I've fixed that for a batch bigger than 1.

hasty mountain
# spare briar also would strongly recommend VICReg over BYOL or MinEnt

"This collapse problem is often avoided through implicit biases in the learning architecture, that often lack a clear justification or interpretation. In this paper, we introduce VICReg (Variance-Invariance-Covariance Regularization), a method that explicitly avoids the collapse problem with a simple regularization term on the variance of the embeddings along each dimension individually."

Seems confusing yert

#

But it's good to have an alternative in case batching isn't possible somehow.
I was considering to use MinEnt Loss on NLP with Transformers, but... this usually applies batching in an excentric way(at least in some papers I've seen "batch" = "number of input tokens per iteration")

hasty mountain
#

Now I wonder... at which point I can say that my model is "few-shot learner"? pithink

spare briar
#

batch size of 1 is extremely terrible in general, but especially if your model has batchnorm

#

your model isn't a few shot learner.

#

another thing I would suggest is to initialize your self-supervised training with a checkpoint trained on imagenet

hasty mountain
#

Meh. I don't like using pre-trained models in general. I prefer to do things by myself.

But well, the thing is: I don't have the labels for the rest of the images in my dataset. I'm using the model exactly to label them.

#

So far, I've pre-trained it on unsupervised configuration. Now I'm fine-tuning it on those images, so I can apply self-learning on the unlabeled images and add the most confident outputs, the generated pseudolabels, to my dataset as new labels.

spare briar
#

(1) it is always better in vision to start with a pretrained model, but is absolutely necessary when you have such a tiny dataset. If you don't do this you are losing a huge amount of performance.
(2) You don't need labels for the selfsupervised step, which is why we use it for the 44900 images

#

(3) Don't do pseudolabeling based on your 1100 images, just many epochs of selfsupervised learning

hasty mountain
#

The 1,100 images are indeed for supervised fine-tuning. The self-learning is on the remaining 44,900 unlabeled ones to generate the labels.

spare briar
#

dont generate labels at all is what im saying

#

do not use labels at all

#

use VICReg or BYOL

hasty mountain
#

Then how can I label my dataset?

spare briar
#

you dont

hasty mountain
spare briar
#

you only need labels for the supervised finetuning step

hasty mountain
spare briar
#

it is an option, I just explained how to do it

hasty mountain
#

VICReg/BYOL/MinEnt is for pretraining, unsupervised learning

spare briar
#

right

hasty mountain
#

I've pretrained my model already

spare briar
#

on what

hasty mountain
#

On the entire dataset, labeled and unlabeled samples.

spare briar
#

okay then all you need to do is finetune on the 1100 images

#

i honestly think you can get the most performance by labeling more images

hasty mountain
#

Yes...that's...what I'm trying to say that I'm doing already

spare briar
#

ok so what i suggest is throw away your pretrained model

#

and redo it starting with an imagenet checkpoint

hasty mountain
spare briar
#

time to get tendonytis haha

#

you could do something clever like use the embeddings from self supervised learning to accelerate your labeling

#

take embeddings, cluster them and use the clusters to guide labeling

#

anyways real labels is what you really need if you want this thing to work well

hasty mountain
spare briar
#

it doesnt label them, you do

#

the model suggests labels, you clean them up

hasty mountain
hasty mountain
spare briar
#

so that the embeddings give you better clusters that give you better labels

#

if you manually label everything i of course agree with you that the ssl step is not necessary and you should go straight to supervised learning

rich river
#

any recommendations on tutorials of GBDT?
where do you ususally refer to for resources?

icy folio
#

Hi, everyone.. I want to build my career in AI . So, from where should I start learning for AI.?

thin hull
#

Hey guys.
I got an idea to make a machine learning model that recognizes images and then recognizes text written in that image and numbers or like a price in it.

What's this concept would be called? Not just imagine recognition right?

earnest widget
thin hull
# earnest widget You mean object detection?

I think so.. my idea is that i want user to upload a picture and i want to verify if it's correct picture by it's looks let's say and the name i want to see it to save the name of that user and the price that's written on the picture

earnest widget
thin hull
#

So i need to look up for object detection right?

earnest widget
#

Yes.

thin hull
#

Is it open CV

#

Would it be possible if i do the model and add it into a form using react Django for production or that's impossible

earnest widget
#

Yeah should be possible. You want to implement into a web app/GUI?

thin hull
#

Yes

#

A web Application

earnest widget
#

Yeah it is possible.

thin hull
#

For data sets i would use kaggle for fake dataset? Or so i need to get real data set images

earnest widget
#

You can use Kaggle but if you want a specific use case, better to collect your own data.

cold osprey
#

there should also be pretrained models already which u can leverage from

thin hull
#

On kaggle or do i need to buy them

thin hull
spark nimbus
#

I find myself using this pattern quite frequently, and was wondering if there was a better/more efficient way to do it:

# Columns: a,b,c,d
# a,b,c are key columns

df['d_count'] = df.groupby([a,c], as_index=False).agg({b: list, d: 'count'}).explode(b)
```the main issues with this approach:
- you need to create a list for each entry of b, which is slow and uses a lot of memory
- you can't guarantee the indexes of the results match the indexes of the dataframe
earnest widget
earnest widget
thin hull
#

Oh okay

#

So the source code is already written? I just need to download it?

#

Quantity like the pictures must be clear right?

earnest widget
#

Yes better to get some pictures with good lighting and less distortions.

thin hull
#

Oh okay i understand

#

Thanks a lot!

#

If the model comes pretrained

#

How many images then do i need

#

Also 5k?

tall tulip
#

I'm working on AWS sagemaker and here I want to train a model using tensorflow, But I'm facing this error
ClientError: An error occurred (AccessDenied) when calling the CreateBucket operation: Access Denied
I know It's says AccessDenied to create a bucket but I don't want to create any bucket, I already have bucket which I want to use but It's creating a new bucket I think. below is my code:

#
                        role=role,
                        instance_count=1,
                        instance_type=instance_type,
#                         image_uri=image_uri,
                        model_dir='s3://your_bucket_name/models-lstm/',
                        framework_version="2.12.0",
                        py_version="py310",
                        hyperparameters={
                          'epochs': epochs
                        },
                        script_mode=False
                      )

#
## Fit the model
estimator.fit('s3://your_bucket_name/Datasets/',
              wait=False)

## this is the function in LSTM.py to load data from S3
def _load_data(base_dir):
    """Load training and testing data"""

    X_train = np.load(os.path.join(base_dir, 'X_train.npy'), allow_pickle=True)
    y_train = np.load(os.path.join(base_dir, 'y_train.npy'), allow_pickle=True)
    X_test = np.load(os.path.join(base_dir, 'X_test.npy'), allow_pickle=True)
    y_test = np.load(os.path.join(base_dir, 'y_test.npy'), allow_pickle=True)

    return X_train, y_train, X_test, y_test

## this is the function in LSTM.py to take/handle arguments
def _parse_args():
    parser = argparse.ArgumentParser()

    # Data, model, and output directories
    # model_dir is always passed in from SageMaker. By default this is a S3 path under the default bucket.
    parser.add_argument('--model_dir', type=str)
    parser.add_argument('--sm-model-dir', type=str, default=os.environ.get('SM_MODEL_DIR'))
    parser.add_argument('--train', type=str, default=os.environ.get('SM_CHANNEL_TRAINING'))
    parser.add_argument('--hosts', type=list, default=json.loads(os.environ.get('SM_HOSTS')))
    parser.add_argument('--current-host', type=str, default=os.environ.get('SM_CURRENT_HOST'))
    parser.add_argument('--epochs', type=int, default=1)

    return parser.parse_known_args()```
#

How can I resolve this I don't know what I'm doing wrong in this but it seems good but still arise error

weary parcel
#

i m doing a machine learning project
this is the code i want to run
df.groupby('parental level of education').agg('mean').plot(kind='barh',figsize=(10,10))
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.show()
this is my data
gender race/ethnicity parental level of education lunch
0 female group B bachelor's degree standard
1 female group C some college standard
2 female group B master's degree standard
3 male group A associate's degree free/reduced
4 male group C some college standard
.. ... ... ... ...
995 female group E master's degree standard
996 male group C high school free/reduced
997 female group C high school free/reduced
998 female group D some college standard
999 female group D some college free/reduced
I want to see the insights in 'parental level of education' but in the error it is saying could not convert 'malefemale' why did this code jump to 'gender' column

cold osprey
#

!code

arctic wedgeBOT
#
Formatting code on discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

unreal crescent
#

hey, I have a dataset that contains post data of different profiles. There is a row for each post. The columns are profile_id, descriptions, number of likes, comments etc.

#

I want to combine all the post descriptions of a single profile together. Right now I am doing it this way:

tall tulip
#

@unreal crescent have you tried groupby?

unreal crescent
#
def combineDesc():
    x = df1.loc[df1['profile_id'] == profileId]
    y = df2.loc[df2['profile_id'] == profileId]
    desc = x.iloc[0]['description'] + ' ' + y.iloc[0]['description']
    return desc

#

Is there a faster way to do this?

unreal crescent
#

would it work for combining strings?

tall tulip
fickle peak
#

Which is best? AutoGPT, Vicuna, GPT4All, ColossalChat, ShareGPT, and everything else...

I have GhatGPT Plus, and of course that works great, but our tokens are limited even on a paid account, also its severely censored, even if you do not want to do morally evil deeds lol.

I've installed stable-diffusion-webui and I can download and change models, it works great. I then installed Vicuna\oobabooga 13B, and it seems slow, even though I have a decent computer (AMD Ryzon 5600X 6 core 12 threads, GTX 1070 8GB, and 64GB of system ram). CPU runs ok, faster than GPU mode (which only writes one word, then I have to press continue).

I've also seen that there has been a complete explosion of self-hosted ai and the models one can get: Open Assistant, Dolly, Koala, Baize, Flan-T5-XXL, OpenChatKit, Raven RWKV, GPT4ALL, Vicuna Alpaca-LoRA, ColossalChat, GPT4ALL, AutoGPT, I've heard that buzzwords langchain and AutoGPT are the best. And that the Vicuna 13B uncensored dataset is the best to use.

Is there something I can install that is the fastest, with long memory, as I often have to write books, papers, and research for our non-profit organization?

Which ones can be trained and access the internet to be trained or do research?

Is there a 'front-end' I can install to change data models like stable diffusion?

Should I only stick to one, and which one should that be?

Unfortunately, time is severely limited, so I cannot install and test all, even though I would really have liked that.

earnest widget
#

I have images which are cropped, if I resize them to a specific size, will it stretch or mess up the aspect ratio of my images for the model?

mild dirge
#

It will strech the images yeah, how else would the size change

#

And it will change the aspect ratio if the aspect ratio of the cropped image is not the same to ratio of the new size

#

As long as you train your model on these types of images it shouldn't be too much of a problem

earnest widget
mild dirge
#

There are also models that take any size image

earnest widget
#

Well I am using MobileNetV3 since it needs to be on a camera and the model was originally trained on 224x224 so I am sticking with that.

#

Seems like the appropriate way.

night prawn
#

I continued installing tensorflow gpu with wsl but it gives me this error message
Image.

cold osprey
#

Cudnn probs

#

And the other one

#

I forgot

vital widget
#

Hello, I'm having trouble with an item in my homework "Feature engineering: show effect of each feature on clusters. Try to explain effects." I'm trying to infer Kmeans outlier. For this item, I drew the scatters of all 19 columns and colored the outliers, but this method did not seem very useful to me and I think it would be insufficient in the explanation. Anyone have a better suggestion?

umbral charm
#

I would like to create a python script to detect a certain sound and re-act of it

#

But im not too sure how it would 'detect' the sound, my guess would be its frequency

#

so i would i get python to listen to a file, wait for a certain frequency and than react to it

#

audio with python is new to me so i dont even know what libraries to have

#

any ideas?

fresh tiger
#

Hey! Not sure if this is the right place, but I currently have a dataset from which I want to extract data that, when graphically plotted against time, follows a specific semantic profile.

In this case, I would like to extract data points that when plotted, look like a smooth 3rd order polynomial plot.

So the idea is to plot all possible sequences of the data and then, based on an algorithm see if a spline can be constructed on top of that plot.

The output of this should be: smooth plots that follow a peak above 0 and below 0.

I am mainly wondering if what I am trying to do is already something common, I just can’t seem to find the right words to describe it in google and would appreciate any insights 🙂

umbral charm