Skip to content

Instantly share code, notes, and snippets.

View mcsee's full-sized avatar
🏠
Working from home

mcsee mcsee

🏠
Working from home
View GitHub Profile
<?
final class SupervisedLearningAlgorithm {
public function __construct($processId) {
}
}
<?
final class SupervisedLearningStrategy {
}
<?
private function
executeAndGetData($processId, $isUsingFastMethod = null) {
}
private function
executeAndGetData($processId, bool $isUsingFastMethod = false) {
<?
private function executeAndGetData($processId, bool $isUsingFastMethod = false) {
}
private function executeAndGetData($processId, bool $isUsingFastMethod) {
}
<?
final class SupervisedLearningStrategy {
const CONFIDENCE_INTERVAL_THRESHOLD = 0.001;
function xx() {
if ($estimatedError <= self::CONFIDENDE_INTERVAL_THRESHOLD) {
}
}
}
<?
final class SupervisedLearningStrategy {
const CONFIDENCE_INTERVAL_THRESHOLD = 0.9;
private function executeAndGetData($processId, bool $isUsingFastMethod) {
// ...
if ($estimatedError <= self::CONFIDENDE_INTERVAL_THRESHOLD) {
// ..
}
?>
function logInfo(array $infoToLog) {
SingletonLogger::info($infoToLog);
}
<?
SingletonLogger::info($infoToLog);
<?
function logInfo(array $infoToLog) {
$loggingFunction = function() use ($infoToLog) {
SingletonLogger::info($infoToLog);
};
$loggingFunction($infoToLog);
}
<?
final class SupervisedLearningAlgorithm {
public function __construct($processId, closure $loggingFunction) {
}
}