Skip to content

Instantly share code, notes, and snippets.

View jefferythewind's full-sized avatar

Timothy DeLise jefferythewind

View GitHub Profile
@jefferythewind
jefferythewind / Custom_Multi-Class_Softmax_Log_Loss.py
Last active February 9, 2024 16:24
Mulit-Class Softmax log loss custom objective for LightGBM Classifier
import numpy as np
import lightgbm as lgb
from sklearn.datasets import load_iris
from sklearn.metrics import confusion_matrix
import time
# Load Iris dataset
iris = load_iris()
# Separate features (X) and target (y)
<?php
// no direct access
defined('_JEXEC') or die;
class plgContentHelloworld extends JPlugin
{
public function onContentAfterTitle($context, &$article, &$params, $limitstart)
{
return "<p>Hello World!</p>";
sql_query = """
SELECT main_user.id, age, gender, race, height, weight, drinks, tobacco, illegal_drugs,
prescription_drugs, network_size, likes, media, follows, followed_by, comments
FROM main_user
JOIN main_survey ON main_user.id = main_survey.id
JOIN (
select
sum(likes) as likes,
sum(comments) as comments,
survey_id as id
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
</head>
<script type="text/javascript">
jQuery(function($){
$(document).ready(function () {
GetLatestReleaseInfo();
});