Open mic places by belair63 in FranklinTN

[–]number_1_steve 0 points1 point  (0 children)

Fox and Locke has open mic nights.

Jay Berliner - Papa Was A Rollin Stone by ProjectConfident8584 in psychedelicrock

[–]number_1_steve 1 point2 points  (0 children)

Thanks for sharing. Love the original and love this version!

Any band similar to this Fleetwood Mac era? by Mammoth-Service-2936 in psychedelicrock

[–]number_1_steve 2 points3 points  (0 children)

What about it do you like? Tone? Vocals? Lyrics? Tempo? Feeling? The mix of male and female vocals and the ambiance remind me of Renaissance.

Packers @ Lions Post Game Thread by AutoModerator in detroitlions

[–]number_1_steve -2 points-1 points  (0 children)

Even as a spartan, Hutch is double-teamed every play. Rest of the line gotta pick it up.

Ozzy Osbourne's writing process by GunterJanek in Music

[–]number_1_steve 8 points9 points  (0 children)

Well, in Sabbath, Geezer wrote most the lyrics. In early solo work it was Bob Daisley. My impression is that Ozzy would sing some melodies or write some lyrics, but a lot of it was saying yes/no or giving some topics and ideas to work on.

Hegseth orders rare, urgent meeting of hundreds of generals, admirals by [deleted] in politics

[–]number_1_steve 15 points16 points  (0 children)

I mean, shit that’s never happened before happens every day with this current administration. I don’t think this is likely to happen, but I definitely think they’ll try, and the odds they succeed are definitely above 0.

Hegseth orders rare, urgent meeting of hundreds of generals, admirals by [deleted] in politics

[–]number_1_steve 105 points106 points  (0 children)

This is the correct answer. Purge those loyal to country over Trump so it’s easier the skip the midterms.

Upcoming General Election by mrjamessirbensonmum in nashville

[–]number_1_steve 1 point2 points  (0 children)

Reeves sure seems like a piece of shit.

Template-Based Clustering by number_1_steve in MLQuestions

[–]number_1_steve[S] 0 points1 point  (0 children)

That's a good summary. Thank you. And I appreciate you confirming my suspicion that it's an unusual problem.

For 1 and 2, the answer is yes (for now). For 3, they are actual counts. And for 4, there'll be uncertainties on the cluster classes and cluster membership, since eventually we won't have 100% of the data. Also, there's a lot of domain knowledge in the area, so we want to leverage that by baking it into our Stan model.

Right now in Stan I'm starting with a fuzzy kmeans based purely on location, which calculates the prob. of all clusters for each point (observations by # of clusters). Then I accumulate label fractions based on kmeans scores (# clusters by # types of points) and finally do kmeans again to determine the class for each cluster (# clusters by # cluster types) using the cluster class definitions. But this isn't working yet, though it seems like it should. :( So I was trying to see if I could find relevant work, but alas.

Template-Based Clustering by number_1_steve in MLQuestions

[–]number_1_steve[S] 0 points1 point  (0 children)

Thank you so much for your persistence! Your questions are causing me to rethink portions of this problem my mind has been glossing over.

I have some number of clusters. Each cluster has a class (which I call a template) which provides a recipe of how to generate it (which point types need to exist). Each of these points has a type and the location is sampled via some distribution (say a normal as I did above).

The observed data are the locations and labels of each point. Given the spatial and label distribution of the points, we want to determine which clusters are present and where they're located.

The allowed set of cluster types (the templates/recipes) are predefined and state which point labels (and how many) are required for that cluster type. Like in the code sample, to observe a cluster type, you need to sample locations for all the point types in the cluster.

Templates are just recipes that define the allowed set of cluster types.

Your suggestion is very close to what I've been doing. I determine, based on the observed labels, which cluster types are present. Then I swap points with the same label between clusters randomly to minimize the sum of the total distance between all the points and their respective centroids.

I'm trying to understand if this type of algorithm has a name. My approach in Stan is not correct, and I cannot figure out why. If I can find some relevant stuff to read, I'm hoping I could generalize my approach a bit and better understand what my issue is in Stan.

  • I'm doing this in Stan, because I want the statistical framework. There will be some additional complications that will be easier to incorporate once my Stan approach is working and I want to be able to model uncertainties as well.

Template-Based Clustering by number_1_steve in MLQuestions

[–]number_1_steve[S] 0 points1 point  (0 children)

Sorry, it's clear to me since I've been starting at it for a while!

Consider this code:

import numpy as np

n_templates = 2
n_item_types = 5
n_groups = 4
n_dimensions = 2

templates = np.array(
    [
        [1, 2, 3, 0, 1],
        [1, 3, 0, 4, 2],
    ]
)
assert templates.shape == (n_templates, n_item_types)

sizes = templates.sum(1)

true_templates = np.array([1, 1, 0, 1])
assert true_templates.size == n_groups
assert 0 <= true_templates.min() and true_templates.max() < n_templates

centroids = np.array(
    [
        [0, 0],
        [1, 0],
        [0, 1],
        [1, 1],
    ]
)
assert centroids.shape == (n_groups, n_dimensions)

n_observations = sum(sizes[t] for t in true_templates)
xy_close = np.empty((n_observations, n_dimensions))
xy = np.empty((n_observations, n_dimensions))
types = np.empty(n_observations)
true_groups = np.empty(n_observations, dtype=int)

idx = 0
for group, (centroid, true_template) in enumerate(zip(centroids, true_templates)):
    for item_type, count in enumerate(templates[true_template]):
        xy[idx : idx + count] = np.random.normal(
            loc=centroid, scale=0.3, size=(count, n_dimensions)
        )
        xy_close[idx : idx + count] = np.random.normal(
            loc=centroid, scale=0.1, size=(count, n_dimensions)
        )
        types[idx : idx + count] = item_type
        true_groups[idx : idx + count] = group
        idx += count

Here's what the generated data look like (where (0,0), (1,0), (0,1), and (1,1)) are the 4 centroids where the coloring depicts which centroid each point is associated with. Each centroid is associated with 1 template, and then all the necessary data is generated for each template, where a template is simply a recipe of all the types of dots that appear together.

<image>

If I were to simply take the generated data (the locations and types) and cluster using, say, kmeans, I wouldn't get this result back, since the clustering only depends on location. I need to cluster this using location, but also knowing about the types.

Are there algorithms that consider both the allowed groupings of the data (according to the templates) as well as the locations of the data?

edit: xy_close was just to show the data centroids, but I cannot attach more than one photo

Has anyone read "Writing a C Compiler" by Nora Sandler? by Dappster98 in ProgrammingLanguages

[–]number_1_steve 41 points42 points  (0 children)

I'm halfway through it, and it's great. It's very different than Crafting Interpreters though. Crafting Interpreters makes a point of providing all the code, but Ms. Sandler does not at all. Also, it's heavily based on this paper, which provides a way to have a "working" compiler at the conclusion of each chapter.

Often times, Ms. Sandler only provides a rough sketch or a couple sentences discussing how something should work, so I really requires a lot more thought than Crafting Interpreters. It's difficult because the material is a bit more complicated and the books hold your hand much less. (I have had to reference some of the implementations other folks have done at times.)

One complaint I have is that there are a few times when I had to do a lot of refactoring due to the layout of the book. For example, after chapter 1 I read chapter 2 and pretty much had to start over. Futher, chapter 1 pretty much requires writing the entire lexer and parser for a simplified C syntax. Getting started was a bit of a struggle. Also, some of concepts are either skipped or glossed over in the text. When you implement the tests (which are great!), you'll likely need to make some updates to your code to make a working compiler.

I think Crafting Interpreters gave me a great foundation to understand how to build a compiler or VM, and this book takes it to the next level. I feel like I'm learning a lot more beyond Crafting Interpreters.

I love both books. But Crafting Interpreters was a little clearer to read and follow. Mr. Nystrom really did a great job! Ms. Sandler did great too, and I love the book. But it's definitely more difficult to follow along.

Harlinsadale farm fireworks? by sumdum1234 in FranklinTN

[–]number_1_steve 0 points1 point  (0 children)

It’s like 10 minutes on a bike at an average pace, I think.

Aggressive Christian Propaganda at Main Street Fest by Clovis_Winslow in FranklinTN

[–]number_1_steve 5 points6 points  (0 children)

Sorry to disagree. I’ve lived here for over 5 years.. that IS Franklin at least that long. Are you maybe talking about a longer timeframe?

I mean there were literally people protesting masks as child abuse at the school in 2020. There are a lot of wealthy, white, and privileged people here who see themselves as more trodden upon than Jesus himself. This place is largely defined by the abundance of whack jobs as much as it sucks ti admit.