Skip to content

Instantly share code, notes, and snippets.

prasad83

Block or report user

Report or block prasad83

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prasad83
prasad83 / gist:ec49d63ae3e7d29b25bbd1974a34b602
Created Mar 15, 2017 — forked from ryanwitt/gist:2911560
Confusion matrix for a logistic glm model in R. Helpful for comparing glm to randomForests.
View gist:ec49d63ae3e7d29b25bbd1974a34b602
confusion.glm <- function(data, model) {
prediction <- ifelse(predict(model, data, type='response') > 0.5, TRUE, FALSE)
confusion <- table(prediction, as.logical(model$y))
confusion <- cbind(confusion, c(1 - confusion[1,1]/(confusion[1,1]+confusion[2,1]), 1 - confusion[2,2]/(confusion[2,2]+confusion[1,2])))
confusion <- as.data.frame(confusion)
names(confusion) <- c('FALSE', 'TRUE', 'class.error')
confusion
}
View frontendDevlopmentBookmarks.md
@prasad83
prasad83 / schema.xml
Created Mar 12, 2012 — forked from jeremy/schema.xml
Basecamp Solr schema
View schema.xml
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="basecamp" version="1.3">
<types>
<!-- indexed/stored verbatim -->
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true" omitTermFreqAndPositions="true"/>
<!-- "true" or "false" -->
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true" omitTermFreqAndPositions="true"/>
<!-- binary data, base64 -->
@prasad83
prasad83 / jquery.bootstrap.confirm.popover.js
Created Feb 22, 2012 — forked from dgorissen/jquery.bootstrap.confirm.popover.js
Confirmation dialog using jQuery and Bootstrap
View jquery.bootstrap.confirm.popover.js
/*
Copyright (c) 2011 Damien Antipa, http://www.nethead.at/, http://damien.antipa.at
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
You can’t perform that action at this time.