This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sklearn.metrics.pairwise import pairwise_distances | |
from sklearn.datasets import fetch_20newsgroups | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.cross_validation import StratifiedKFold | |
from nltk.stem.porter import PorterStemmer | |
from copy import copy | |
from nltk import word_tokenize | |
import networkx as nx | |
from networkx.drawing.nx_agraph import graphviz_layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -Xmx13312m -Didea.launcher.port=7533 -Didea.launcher.bin.path=/home/drishi/Downloads/idea-IC-141.2735.5/bin -Dfile.encoding=US-ASCII -classpath /usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/compilefontconfig.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/rhino.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/javazic.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-1.7.0-openjdk-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.chil; | |
import org.canova.api.records.reader.RecordReader; | |
import org.canova.api.split.FileSplit; | |
import org.canova.image.recordreader.ImageRecordReader; | |
import org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator; | |
import org.nd4j.linalg.dataset.DataSet; | |
import org.nd4j.linalg.dataset.api.iterator.DataSetIterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.chil; | |
import org.canova.api.records.reader.RecordReader; | |
import org.canova.api.split.FileSplit; | |
import org.canova.image.recordreader.ImageRecordReader; | |
import org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator; | |
import org.deeplearning4j.eval.Evaluation; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.MultiLayerConfiguration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
~ /* | |
~ * | |
~ * * Copyright 2015 Skymind,Inc. | |
~ * * | |
~ * * Licensed under the Apache License, Version 2.0 (the "License"); | |
~ * * you may not use this file except in compliance with the License. | |
~ * * You may obtain a copy of the License at | |
~ * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
at org.nd4j.linalg.util.ArrayUtil.toNDArray(ArrayUtil.java:116) | |
at org.canova.image.loader.ImageLoader.asRowVector(ImageLoader.java:100) | |
at org.canova.image.recordreader.BaseImageRecordReader.next(BaseImageRecordReader.java:244) | |
at org.canova.cli.vectorization.ImageVectorizationEngine.execute(ImageVectorizationEngine.java:44) | |
at org.canova.cli.subcommands.Vectorize.execute(Vectorize.java:287) | |
at org.canova.cli.driver.CommandLineInterfaceDriver.doMain(CommandLineInterfaceDriver.java:56) | |
at org.canova.cli.driver.CommandLineInterfaceDriver.main(CommandLineInterfaceDriver.java:79) | |
Caused by: java.lang.RuntimeException: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException | |
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:4501) | |
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:140) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "main" java.lang.IllegalArgumentException: Path /home/drishi/Canova/canova-cli/canova-0.0.0.12-SNAPSHOT/lfw does not exist! | |
at org.canova.image.recordreader.BaseImageRecordReader.initialize(BaseImageRecordReader.java:184) | |
at org.canova.image.recordreader.BaseImageRecordReader.initialize(BaseImageRecordReader.java:232) | |
at org.canova.image.format.ImageInputFormat.createReader(ImageInputFormat.java:38) | |
at org.canova.cli.subcommands.Vectorize.execute(Vectorize.java:277) | |
at org.canova.cli.driver.CommandLineInterfaceDriver.doMain(CommandLineInterfaceDriver.java:56) | |
at org.canova.cli.driver.CommandLineInterfaceDriver.main(CommandLineInterfaceDriver.java:79) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>nz.ac.waikato.cms.weka</groupId> |