Skip to content

Commit

Permalink
prepared version 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Penate-Diaz committed Mar 2, 2022
1 parent 456fb03 commit 693a2a6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 15 deletions.
33 changes: 19 additions & 14 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion src/Cid3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import kotlin.system.exitProcess


class Cid3 : Serializable {
private val version = "1.2.1"
private val version = "1.2.2"
private var createdWith = ""
enum class AttributeType {
Discrete, Continuous, Ignore
Expand Down Expand Up @@ -87,6 +87,10 @@ class Cid3 : Serializable {
@Transient
var runAnimationCalculating = true

@Transient
var runAnimationAnalysis = true


//The root of the decomposition tree
var root = TreeNode()
var rootsRandomForest = ArrayList<TreeNode>()
Expand Down Expand Up @@ -1617,7 +1621,14 @@ class Cid3 : Serializable {
if (attName.length > longestString.length) longestString = attName
}
if (longestString!!.length < 14) longestString = "--------------"

//Stop the animation
runAnimationAnalysis= false
print("\r" + "[ * ] " + "Analysis report created.")

print("\n")
print("\n")

//Print console output
if (this.criteria == Criteria.Certainty) {
var fmt = "%1$10s %2$5s %3$1s %4$" + (longestString.length).toString() + "s%n"
Expand Down Expand Up @@ -3383,6 +3394,17 @@ class Cid3 : Serializable {
me.countClasses()

if (cmd.hasOption("analysis")) {
//Print animation for creating analysis report
val consoleHelperCalculating = ConsoleHelper()
val threadCalculating = Thread {
while(me.runAnimationAnalysis) {
consoleHelperCalculating.animate()
Thread.sleep(500)
}
}
threadCalculating.priority = Thread.MAX_PRIORITY
threadCalculating.start()

me.trainData.addAll(me.testData)
me.root.data = me.trainData
me.testData.clear()
Expand Down

0 comments on commit 693a2a6

Please sign in to comment.